From 11d70acb6e103abc443870bde9327d24828fb27d Mon Sep 17 00:00:00 2001 From: ngarg-vail Date: Wed, 8 Jan 2025 19:33:02 -0500 Subject: [PATCH] Use new generator setup (#69) * Use latest spec and generator * Update target framework & test values * Fix depedendency vuln * Update github workflow * Upgrade node deps * Add Webhook models * Update changelog --- .config/dotnet-tools.json | 12 + .github/workflows/dotnet-package.yml | 2 +- .openapi-generator/FILES | 261 +- .openapi-generator/VERSION | 2 +- CHANGELOG.md | 14 + README.md | 268 +- api/openapi.yaml | 8497 ++++++++++ appveyor.yml | 9 + docs/AccountRequest.md | 8 +- docs/AccountResult.md | 8 +- docs/AccountResultAllOf.md | 20 - docs/AccountStatus.md | 7 +- docs/AccountType.md | 7 +- docs/AddToConference.md | 9 +- docs/AddToConferenceAllOf.md | 23 - docs/AddToConferenceNotificationWebhook.md | 23 + docs/AddToQueueNotificationWebhook.md | 19 + docs/AnsweredBy.md | 7 +- docs/ApplicationList.md | 8 +- docs/ApplicationListAllOf.md | 14 - docs/ApplicationRequest.md | 8 +- docs/ApplicationResult.md | 8 +- docs/ApplicationResultAllOf.md | 22 - docs/AvailableNumber.md | 8 +- docs/AvailableNumberList.md | 8 +- docs/AvailableNumberListAllOf.md | 14 - docs/BargeInReason.md | 12 + docs/BuyIncomingNumberRequest.md | 8 +- docs/CallControlWebhook.md | 15 + docs/CallDirection.md | 7 +- docs/CallEndedReason.md | 33 + docs/CallList.md | 8 +- docs/CallListAllOf.md | 14 - docs/CallResult.md | 8 +- docs/CallResultAllOf.md | 29 - docs/CallStatus.md | 7 +- docs/CallStatusWebhook.md | 20 + docs/Capabilities.md | 9 +- docs/CompletionRequest.md | 8 +- docs/CompletionResult.md | 10 +- docs/CompletionResultStatus.md | 12 + docs/ConferenceList.md | 8 +- docs/ConferenceListAllOf.md | 14 - docs/ConferenceParticipantList.md | 8 +- docs/ConferenceParticipantListAllOf.md | 14 - docs/ConferenceParticipantResult.md | 8 +- docs/ConferenceParticipantResultAllOf.md | 20 - docs/ConferenceRecordingStatusWebhook.md | 23 + docs/ConferenceResult.md | 8 +- docs/ConferenceResultAllOf.md | 23 - docs/ConferenceStatus.md | 7 +- docs/ConferenceStatusWebhook.md | 23 + docs/CreateConference.md | 9 +- docs/CreateConferenceAllOf.md | 19 - docs/CreateConferenceRequest.md | 8 +- docs/CreateConferenceWebhook.md | 23 + docs/CreateWebRTCToken.md | 8 +- docs/DefaultApi.md | 3040 ++-- docs/Dequeue.md | 9 +- docs/DequeueWebhook.md | 21 + docs/Enqueue.md | 9 +- docs/EnqueueAllOf.md | 17 - docs/FilterLogsRequest.md | 8 +- docs/GetDigits.md | 9 +- docs/GetDigitsAllOf.md | 22 - docs/GetDigitsReason.md | 14 + docs/GetDigitsWebhook.md | 22 + docs/GetSpeech.md | 9 +- docs/GetSpeechAllOf.md | 26 - docs/GetSpeechReason.md | 6 +- docs/GetSpeechWebhook.md | 27 + docs/GrammarFileBuiltIn.md | 6 +- docs/GrammarType.md | 7 +- docs/Hangup.md | 9 +- docs/HangupAllOf.md | 14 - docs/IfMachine.md | 7 +- docs/InboundCallWebhook.md | 20 + docs/IncomingNumberList.md | 8 +- docs/IncomingNumberListAllOf.md | 14 - docs/IncomingNumberRequest.md | 8 +- docs/IncomingNumberResult.md | 8 +- docs/IncomingNumberResultAllOf.md | 26 - docs/Language.md | 6 +- docs/LeaveConferenceWebhook.md | 19 + docs/LogLevel.md | 7 +- docs/LogList.md | 8 +- docs/LogListAllOf.md | 14 - docs/LogResult.md | 8 +- docs/MachineDetectedWebhook.md | 21 + docs/MachineType.md | 10 +- docs/MakeCallRequest.md | 8 +- docs/MessageDeliveryWebhook.md | 20 + docs/MessageDirection.md | 6 +- docs/MessageRequest.md | 8 +- docs/MessageRequestAllOf.md | 18 - docs/MessageResult.md | 8 +- docs/MessageResultAllOf.md | 25 - docs/MessageStatus.md | 7 +- docs/MessageStatusWebhook.md | 21 + docs/MessagesList.md | 8 +- docs/MessagesListAllOf.md | 14 - docs/MutableResourceModel.md | 8 +- docs/OutDial.md | 9 +- docs/OutDialAllOf.md | 23 - docs/OutDialApiConnectWebhook.md | 20 + docs/OutDialConnectWebhook.md | 20 + docs/OutDialStartWebhook.md | 21 + docs/PaginationModel.md | 8 +- docs/Park.md | 9 +- docs/ParkAllOf.md | 16 - docs/Pause.md | 9 +- docs/PauseAllOf.md | 14 - docs/PerclCommand.md | 9 +- docs/PerclScript.md | 9 +- docs/Play.md | 9 +- docs/PlayAllOf.md | 16 - docs/PlayBeep.md | 7 +- docs/PlayEarlyMedia.md | 9 +- docs/PlayEarlyMediaAllOf.md | 14 - docs/QueueList.md | 8 +- docs/QueueListAllOf.md | 14 - docs/QueueMember.md | 8 +- docs/QueueMemberList.md | 8 +- docs/QueueMemberListAllOf.md | 14 - docs/QueueRequest.md | 8 +- docs/QueueResult.md | 8 +- docs/QueueResultAllOf.md | 20 - docs/QueueResultStatus.md | 6 +- docs/QueueWaitWebhook.md | 22 + docs/RecordUtterance.md | 9 +- docs/RecordUtteranceAllOf.md | 20 - docs/RecordUtteranceTermReason.md | 6 +- docs/RecordWebhook.md | 27 + docs/RecordingList.md | 8 +- docs/RecordingListAllOf.md | 14 - docs/RecordingResult.md | 8 +- docs/RecordingResultAllOf.md | 18 - docs/Redirect.md | 9 +- docs/RedirectAllOf.md | 14 - docs/RedirectWebhook.md | 20 + docs/Reject.md | 9 +- docs/RejectAllOf.md | 14 - docs/RemoveFromConference.md | 9 +- docs/RemoveFromConferenceAllOf.md | 14 - docs/RemoveFromQueueNotificationWebhook.md | 21 + docs/RequestType.md | 6 +- docs/SMSTenDLCBrand.md | 19 +- docs/SMSTenDLCBrandAltBusinessIdType.md | 14 + docs/SMSTenDLCBrandEntityType.md | 15 + docs/SMSTenDLCBrandIdentityStatus.md | 14 + docs/SMSTenDLCBrandRelationship.md | 15 + docs/SMSTenDLCBrandStockExchange.md | 37 + docs/SMSTenDLCBrandsListResult.md | 8 +- docs/SMSTenDLCBrandsListResultAllOf.md | 14 - docs/SMSTenDLCCampaign.md | 12 +- docs/SMSTenDLCCampaignStatus.md | 12 + docs/SMSTenDLCCampaignsListResult.md | 8 +- docs/SMSTenDLCCampaignsListResultAllOf.md | 14 - docs/SMSTenDLCPartnerCampaign.md | 10 +- docs/SMSTenDLCPartnerCampaignBrand.md | 8 +- docs/SMSTenDLCPartnerCampaignStatus.md | 12 + docs/SMSTenDLCPartnerCampaignsListResult.md | 8 +- ...MSTenDLCPartnerCampaignsListResultAllOf.md | 14 - docs/SMSTollFreeCampaign.md | 10 +- docs/SMSTollFreeCampaignRegistrationStatus.md | 15 + docs/SMSTollFreeCampaignsListResult.md | 8 +- docs/SMSTollFreeCampaignsListResultAllOf.md | 14 - docs/Say.md | 9 +- docs/SayAllOf.md | 17 - docs/SendDigits.md | 9 +- docs/SendDigitsAllOf.md | 16 - docs/SetDTMFPassThrough.md | 9 +- docs/SetDTMFPassThroughAllOf.md | 14 - docs/SetListen.md | 9 +- docs/SetListenAllOf.md | 14 - docs/SetTalk.md | 9 +- docs/SetTalkAllOf.md | 14 - docs/Sms.md | 9 +- docs/SmsAllOf.md | 17 - docs/StartRecordCall.md | 9 +- docs/TFN.md | 9 +- docs/TerminateConference.md | 9 +- docs/TerminateConferenceAllOf.md | 14 - docs/TranscribeReason.md | 14 + docs/TranscribeTermReason.md | 11 + docs/TranscribeUtterance.md | 13 +- docs/TranscribeUtteranceAllOf.md | 19 - docs/TranscribeUtteranceAllOfRecord.md | 16 - docs/TranscribeUtteranceRecord.md | 8 +- docs/TranscribeWebhook.md | 32 + docs/Unpark.md | 9 +- docs/UpdateCallRequest.md | 8 +- docs/UpdateCallRequestStatus.md | 7 +- docs/UpdateConferenceParticipantRequest.md | 8 +- docs/UpdateConferenceRequest.md | 8 +- docs/UpdateConferenceRequestStatus.md | 7 +- docs/Webhook.md | 10 + freeclimb.sln | 10 +- package.json | 8 +- src/freeclimb.Test/Api/DefaultApiTests.cs | 1250 +- src/freeclimb.Test/Api/SmokeTests.cs | 75 - .../Enums/AccountStatusTests.cs | 41 +- src/freeclimb.Test/Enums/AccountTypeTests.cs | 32 +- src/freeclimb.Test/Enums/AnsweredByTests.cs | 32 +- .../Enums/BargeInReasonTests.cs | 133 + .../Enums/CallDirectionTests.cs | 41 +- .../Enums/CallEndedReasonTests.cs | 633 + src/freeclimb.Test/Enums/CallStatusTests.cs | 32 +- .../Enums/CompletionResultStatusTests.cs | 108 + .../Enums/ConferenceStatusTests.cs | 44 +- .../Enums/GetDigitsReasonTests.cs | 158 + .../Enums/GetSpeechReasonTests.cs | 50 +- .../Enums/GrammarFileBuiltInTests.cs | 77 +- src/freeclimb.Test/Enums/GrammarTypeTests.cs | 32 +- src/freeclimb.Test/Enums/IfMachineTests.cs | 32 +- src/freeclimb.Test/Enums/LanguageTests.cs | 32 +- src/freeclimb.Test/Enums/LogLevelTests.cs | 32 +- src/freeclimb.Test/Enums/MachineTypeTests.cs | 51 +- .../Enums/MessageDirectionTests.cs | 38 +- .../Enums/MessageStatusTests.cs | 62 +- src/freeclimb.Test/Enums/PlayBeepTests.cs | 32 +- .../Enums/QueueResultStatusTests.cs | 44 +- .../Enums/RecordUtteranceTermReasonTests.cs | 44 +- src/freeclimb.Test/Enums/RequestTypeTests.cs | 89 +- .../SMSTenDLCBrandAltBusinessIdTypeTests.cs | 158 + .../Enums/SMSTenDLCBrandEntityTypeTests.cs | 183 + .../SMSTenDLCBrandIdentityStatusTests.cs | 159 + .../Enums/SMSTenDLCBrandRelationshipTests.cs | 183 + .../Enums/SMSTenDLCBrandStockExchangeTests.cs | 733 + .../Enums/SMSTenDLCCampaignStatusTests.cs | 108 + .../SMSTenDLCPartnerCampaignStatusTests.cs | 108 + ...TollFreeCampaignRegistrationStatusTests.cs | 203 + .../Enums/TranscribeReasonTests.cs | 183 + .../Enums/TranscribeTermReasonTests.cs | 108 + .../Enums/UpdateCallRequestStatusTests.cs | 38 +- .../UpdateConferenceRequestStatusTests.cs | 38 +- .../Model/AccountRequestTests.cs | 163 +- .../Model/AccountResultAllOfTests.cs | 333 - .../Model/AccountResultTests.cs | 322 +- .../Model/AddToConferenceAllOfTests.cs | 380 - ...AddToConferenceNotificationWebhookTests.cs | 232 + .../Model/AddToConferenceTests.cs | 293 +- .../AddToQueueNotificationWebhookTests.cs | 183 + .../Model/ApplicationListAllOfTests.cs | 195 - .../Model/ApplicationListTests.cs | 280 +- .../Model/ApplicationRequestTests.cs | 238 +- .../Model/ApplicationResultAllOfTests.cs | 358 - .../Model/ApplicationResultTests.cs | 330 +- .../Model/AvailableNumberListAllOfTests.cs | 195 - .../Model/AvailableNumberListTests.cs | 280 +- .../Model/AvailableNumberTests.cs | 256 +- .../Model/BuyIncomingNumberRequestTests.cs | 178 +- .../Model/CallControlWebhookTests.cs | 119 + .../Model/CallListAllOfTests.cs | 195 - src/freeclimb.Test/Model/CallListTests.cs | 279 +- .../Model/CallResultAllOfTests.cs | 545 - src/freeclimb.Test/Model/CallResultTests.cs | 477 +- .../Model/CallStatusWebhookTests.cs | 236 + src/freeclimb.Test/Model/CapabilitiesTests.cs | 218 +- .../Model/CompletionRequestTests.cs | 148 +- .../Model/CompletionResultTests.cs | 162 +- .../Model/ConferenceListAllOfTests.cs | 195 - .../Model/ConferenceListTests.cs | 280 +- .../ConferenceParticipantListAllOfTests.cs | 195 - .../Model/ConferenceParticipantListTests.cs | 280 +- .../ConferenceParticipantResultAllOfTests.cs | 314 - .../Model/ConferenceParticipantResultTests.cs | 308 +- .../ConferenceRecordingStatusWebhookTests.cs | 232 + .../Model/ConferenceResultAllOfTests.cs | 405 - .../Model/ConferenceResultTests.cs | 375 +- .../Model/ConferenceStatusWebhookTests.cs | 231 + .../Model/CreateConferenceAllOfTests.cs | 298 - .../Model/CreateConferenceRequestTests.cs | 218 +- .../Model/CreateConferenceTests.cs | 235 +- .../Model/CreateConferenceWebhookTests.cs | 231 + .../Model/CreateWebRTCTokenTests.cs | 180 +- src/freeclimb.Test/Model/DequeueTests.cs | 35 +- .../Model/DequeueWebhookTests.cs | 203 + src/freeclimb.Test/Model/EnqueueAllOfTests.cs | 248 - src/freeclimb.Test/Model/EnqueueTests.cs | 193 +- .../Model/FilterLogsRequestTests.cs | 146 +- .../Model/GetDigitsAllOfTests.cs | 371 - src/freeclimb.Test/Model/GetDigitsTests.cs | 294 +- .../Model/GetDigitsWebhookTests.cs | 220 + .../Model/GetSpeechAllOfTests.cs | 437 - src/freeclimb.Test/Model/GetSpeechTests.cs | 334 +- .../Model/GetSpeechWebhookTests.cs | 279 + src/freeclimb.Test/Model/HangupAllOfTests.cs | 182 - src/freeclimb.Test/Model/HangupTests.cs | 146 +- .../Model/InboundCallWebhookTests.cs | 192 + .../Model/IncomingNumberListAllOfTests.cs | 195 - .../Model/IncomingNumberListTests.cs | 280 +- .../Model/IncomingNumberRequestTests.cs | 178 +- .../Model/IncomingNumberResultAllOfTests.cs | 472 - .../Model/IncomingNumberResultTests.cs | 424 +- .../Model/LeaveConferenceWebhookTests.cs | 181 + src/freeclimb.Test/Model/LogListAllOfTests.cs | 195 - src/freeclimb.Test/Model/LogListTests.cs | 279 +- src/freeclimb.Test/Model/LogResultTests.cs | 258 +- .../Model/MachineDetectedWebhookTests.cs | 205 + .../Model/MakeCallRequestTests.cs | 287 +- .../Model/MessageDeliveryWebhookTests.cs | 174 + .../Model/MessageRequestAllOfTests.cs | 283 - .../Model/MessageRequestTests.cs | 284 +- .../Model/MessageResultAllOfTests.cs | 445 - .../Model/MessageResultTests.cs | 399 +- .../Model/MessageStatusWebhookTests.cs | 205 + .../Model/MessagesListAllOfTests.cs | 195 - src/freeclimb.Test/Model/MessagesListTests.cs | 279 +- .../Model/MutableResourceModelTests.cs | 195 +- src/freeclimb.Test/Model/OutDialAllOfTests.cs | 382 - .../Model/OutDialApiConnectWebhookTests.cs | 192 + .../Model/OutDialConnectWebhookTests.cs | 192 + .../Model/OutDialStartWebhookTests.cs | 203 + src/freeclimb.Test/Model/OutDialTests.cs | 291 +- .../Model/PaginationModelTests.cs | 250 +- src/freeclimb.Test/Model/ParkAllOfTests.cs | 226 - src/freeclimb.Test/Model/ParkTests.cs | 178 +- src/freeclimb.Test/Model/PauseAllOfTests.cs | 182 - src/freeclimb.Test/Model/PauseTests.cs | 148 +- src/freeclimb.Test/Model/PerclCommandTests.cs | 370 +- src/freeclimb.Test/Model/PerclScriptTests.cs | 99 +- src/freeclimb.Test/Model/PlayAllOfTests.cs | 226 - .../Model/PlayEarlyMediaAllOfTests.cs | 182 - .../Model/PlayEarlyMediaTests.cs | 146 +- src/freeclimb.Test/Model/PlayTests.cs | 182 +- .../Model/QueueListAllOfTests.cs | 195 - src/freeclimb.Test/Model/QueueListTests.cs | 279 +- .../Model/QueueMemberListAllOfTests.cs | 195 - .../Model/QueueMemberListTests.cs | 279 +- src/freeclimb.Test/Model/QueueMemberTests.cs | 212 +- src/freeclimb.Test/Model/QueueRequestTests.cs | 165 +- .../Model/QueueResultAllOfTests.cs | 327 - src/freeclimb.Test/Model/QueueResultTests.cs | 318 +- .../Model/QueueWaitWebhookTests.cs | 214 + .../Model/RecordUtteranceAllOfTests.cs | 314 - .../Model/RecordUtteranceTests.cs | 248 +- .../Model/RecordWebhookTests.cs | 276 + .../Model/RecordingListAllOfTests.cs | 195 - .../Model/RecordingListTests.cs | 280 +- .../Model/RecordingResultAllOfTests.cs | 270 - .../Model/RecordingResultTests.cs | 272 +- .../Model/RedirectAllOfTests.cs | 182 - src/freeclimb.Test/Model/RedirectTests.cs | 146 +- .../Model/RedirectWebhookTests.cs | 192 + src/freeclimb.Test/Model/RejectAllOfTests.cs | 182 - src/freeclimb.Test/Model/RejectTests.cs | 146 +- .../Model/RemoveFromConferenceTests.cs | 35 +- ...RemoveFromQueueNotificationWebhookTests.cs | 210 + .../Model/SMSTenDLCBrandTests.cs | 818 +- .../SMSTenDLCBrandsListResultAllOfTests.cs | 195 - .../Model/SMSTenDLCBrandsListResultTests.cs | 279 +- .../Model/SMSTenDLCCampaignTests.cs | 717 +- .../SMSTenDLCCampaignsListResultAllOfTests.cs | 195 - .../SMSTenDLCCampaignsListResultTests.cs | 280 +- .../SMSTenDLCPartnerCampaignBrandTests.cs | 336 +- .../Model/SMSTenDLCPartnerCampaignTests.cs | 601 +- ...DLCPartnerCampaignsListResultAllOfTests.cs | 195 - ...MSTenDLCPartnerCampaignsListResultTests.cs | 280 +- .../Model/SMSTollFreeCampaignTests.cs | 269 +- ...MSTollFreeCampaignsListResultAllOfTests.cs | 195 - .../SMSTollFreeCampaignsListResultTests.cs | 280 +- src/freeclimb.Test/Model/SayAllOfTests.cs | 248 - src/freeclimb.Test/Model/SayTests.cs | 197 +- .../Model/SendDigitsAllOfTests.cs | 226 - src/freeclimb.Test/Model/SendDigitsTests.cs | 182 +- .../Model/SetDTMFPassThroughAllOfTests.cs | 182 - .../Model/SetDTMFPassThroughTests.cs | 150 +- .../Model/SetListenAllOfTests.cs | 182 - src/freeclimb.Test/Model/SetListenTests.cs | 148 +- src/freeclimb.Test/Model/SetTalkAllOfTests.cs | 182 - src/freeclimb.Test/Model/SetTalkTests.cs | 148 +- src/freeclimb.Test/Model/SmsAllOfTests.cs | 248 - src/freeclimb.Test/Model/SmsTests.cs | 193 +- .../Model/StartRecordCallTests.cs | 35 +- src/freeclimb.Test/Model/TFNTests.cs | 146 +- .../Model/TerminateConferenceTests.cs | 35 +- .../TranscribeUtteranceAllOfRecordTests.cs | 226 - .../Model/TranscribeUtteranceAllOfTests.cs | 318 - .../Model/TranscribeUtteranceRecordTests.cs | 92 + .../Model/TranscribeUtteranceTests.cs | 261 +- .../Model/TranscribeWebhookTests.cs | 340 + src/freeclimb.Test/Model/UnparkTests.cs | 35 +- .../Model/UpdateCallRequestTests.cs | 153 +- ...UpdateConferenceParticipantRequestTests.cs | 184 +- .../Model/UpdateConferenceRequestTests.cs | 191 +- src/freeclimb.Test/Model/WebhookTests.cs | 323 + src/freeclimb.Test/TestHelpers.cs | 316 + .../Utils/RequestVerifierTests.cs | 188 +- .../Utils/SignatureInformationTests.cs | 32 +- src/freeclimb.Test/freeclimb.Test.csproj | 10 +- src/freeclimb/Api/DefaultApi.cs | 14118 ++++++---------- src/freeclimb/Client/ApiClient.cs | 696 +- src/freeclimb/Client/ApiException.cs | 12 +- src/freeclimb/Client/ApiResponse.cs | 22 +- src/freeclimb/Client/ClientUtils.cs | 155 +- src/freeclimb/Client/Configuration.cs | 259 +- src/freeclimb/Client/GlobalConfiguration.cs | 14 +- src/freeclimb/Client/HttpMethod.cs | 8 +- src/freeclimb/Client/IAsynchronousClient.cs | 56 +- .../Client/IReadableConfiguration.cs | 29 + src/freeclimb/Client/ISynchronousClient.cs | 42 +- src/freeclimb/Client/Multimap.cs | 3 +- src/freeclimb/Client/RequestOptions.cs | 12 +- src/freeclimb/Client/RetryConfiguration.cs | 4 +- src/freeclimb/Enums/AccountStatus.cs | 54 +- src/freeclimb/Enums/AccountType.cs | 48 +- src/freeclimb/Enums/AnsweredBy.cs | 48 +- src/freeclimb/Enums/BargeInReason.cs | 100 + src/freeclimb/Enums/CallDirection.cs | 54 +- src/freeclimb/Enums/CallEndedReason.cs | 341 + src/freeclimb/Enums/CallStatus.cs | 84 +- src/freeclimb/Enums/CompletionResultStatus.cs | 89 + src/freeclimb/Enums/ConferenceStatus.cs | 60 +- src/freeclimb/Enums/Extensions.cs | 21 - src/freeclimb/Enums/GetDigitsReason.cs | 113 + src/freeclimb/Enums/GetSpeechReason.cs | 72 +- src/freeclimb/Enums/GrammarFileBuiltIn.cs | 126 +- src/freeclimb/Enums/GrammarType.cs | 48 +- src/freeclimb/Enums/IfMachine.cs | 48 +- src/freeclimb/Enums/Language.cs | 192 +- src/freeclimb/Enums/LogLevel.cs | 54 +- src/freeclimb/Enums/MachineType.cs | 56 +- src/freeclimb/Enums/MessageDirection.cs | 48 +- src/freeclimb/Enums/MessageStatus.cs | 102 +- src/freeclimb/Enums/PlayBeep.cs | 62 +- src/freeclimb/Enums/QueueResultStatus.cs | 60 +- .../Enums/RecordUtteranceTermReason.cs | 60 +- src/freeclimb/Enums/Reflection.cs | 89 - src/freeclimb/Enums/RequestType.cs | 174 +- .../Enums/SMSTenDLCBrandAltBusinessIdType.cs | 113 + .../Enums/SMSTenDLCBrandEntityType.cs | 125 + .../Enums/SMSTenDLCBrandIdentityStatus.cs | 113 + .../Enums/SMSTenDLCBrandRelationship.cs | 125 + .../Enums/SMSTenDLCBrandStockExchange.cs | 389 + .../Enums/SMSTenDLCCampaignStatus.cs | 89 + .../Enums/SMSTenDLCPartnerCampaignStatus.cs | 89 + .../SMSTollFreeCampaignRegistrationStatus.cs | 125 + src/freeclimb/Enums/TranscribeReason.cs | 124 + src/freeclimb/Enums/TranscribeTermReason.cs | 88 + .../Enums/UpdateCallRequestStatus.cs | 48 +- .../Enums/UpdateConferenceRequestStatus.cs | 48 +- src/freeclimb/Model/AbstractOpenAPISchema.cs | 40 +- src/freeclimb/Model/AccountRequest.cs | 80 +- src/freeclimb/Model/AccountResult.cs | 192 +- src/freeclimb/Model/AccountResultAllOf.cs | 252 - src/freeclimb/Model/AddToConference.cs | 216 +- src/freeclimb/Model/AddToConferenceAllOf.cs | 311 - .../AddToConferenceNotificationWebhook.cs | 293 + .../Model/AddToQueueNotificationWebhook.cs | 242 + src/freeclimb/Model/ApplicationList.cs | 166 +- src/freeclimb/Model/ApplicationListAllOf.cs | 147 - src/freeclimb/Model/ApplicationRequest.cs | 150 +- src/freeclimb/Model/ApplicationResult.cs | 224 +- src/freeclimb/Model/ApplicationResultAllOf.cs | 302 - src/freeclimb/Model/AvailableNumber.cs | 150 +- src/freeclimb/Model/AvailableNumberList.cs | 166 +- .../Model/AvailableNumberListAllOf.cs | 147 - .../Model/BuyIncomingNumberRequest.cs | 108 +- src/freeclimb/Model/CallControlWebhook.cs | 192 + src/freeclimb/Model/CallList.cs | 166 +- src/freeclimb/Model/CallListAllOf.cs | 147 - src/freeclimb/Model/CallResult.cs | 305 +- src/freeclimb/Model/CallResultAllOf.cs | 427 - src/freeclimb/Model/CallStatusWebhook.cs | 254 + src/freeclimb/Model/Capabilities.cs | 160 +- src/freeclimb/Model/CompletionRequest.cs | 83 +- src/freeclimb/Model/CompletionResult.cs | 121 +- src/freeclimb/Model/ConferenceList.cs | 166 +- src/freeclimb/Model/ConferenceListAllOf.cs | 147 - .../Model/ConferenceParticipantList.cs | 167 +- .../Model/ConferenceParticipantListAllOf.cs | 147 - .../Model/ConferenceParticipantResult.cs | 198 +- .../Model/ConferenceParticipantResultAllOf.cs | 262 - .../Model/ConferenceRecordingStatusWebhook.cs | 293 + src/freeclimb/Model/ConferenceResult.cs | 231 +- src/freeclimb/Model/ConferenceResultAllOf.cs | 312 - .../Model/ConferenceStatusWebhook.cs | 293 + src/freeclimb/Model/CreateConference.cs | 172 +- src/freeclimb/Model/CreateConferenceAllOf.cs | 238 - .../Model/CreateConferenceRequest.cs | 118 +- .../Model/CreateConferenceWebhook.cs | 293 + src/freeclimb/Model/CreateWebRTCToken.cs | 120 +- src/freeclimb/Model/Dequeue.cs | 91 +- src/freeclimb/Model/DequeueWebhook.cs | 268 + src/freeclimb/Model/Enqueue.cs | 170 +- src/freeclimb/Model/EnqueueAllOf.cs | 219 - src/freeclimb/Model/FilterLogsRequest.cs | 78 +- src/freeclimb/Model/GetDigits.cs | 194 +- src/freeclimb/Model/GetDigitsAllOf.cs | 293 - src/freeclimb/Model/GetDigitsWebhook.cs | 280 + src/freeclimb/Model/GetSpeech.cs | 251 +- src/freeclimb/Model/GetSpeechAllOf.cs | 364 - src/freeclimb/Model/GetSpeechWebhook.cs | 345 + src/freeclimb/Model/Hangup.cs | 100 +- src/freeclimb/Model/HangupAllOf.cs | 142 - src/freeclimb/Model/InboundCallWebhook.cs | 254 + src/freeclimb/Model/IncomingNumberList.cs | 166 +- .../Model/IncomingNumberListAllOf.cs | 147 - src/freeclimb/Model/IncomingNumberRequest.cs | 98 +- src/freeclimb/Model/IncomingNumberResult.cs | 276 +- .../Model/IncomingNumberResultAllOf.cs | 382 - src/freeclimb/Model/LeaveConferenceWebhook.cs | 242 + src/freeclimb/Model/LogList.cs | 166 +- src/freeclimb/Model/LogListAllOf.cs | 147 - src/freeclimb/Model/LogResult.cs | 148 +- src/freeclimb/Model/MachineDetectedWebhook.cs | 267 + src/freeclimb/Model/MakeCallRequest.cs | 200 +- src/freeclimb/Model/MessageDeliveryWebhook.cs | 257 + src/freeclimb/Model/MessageRequest.cs | 201 +- src/freeclimb/Model/MessageRequestAllOf.cs | 245 - src/freeclimb/Model/MessageResult.cs | 262 +- src/freeclimb/Model/MessageResultAllOf.cs | 363 - src/freeclimb/Model/MessageStatusWebhook.cs | 269 + src/freeclimb/Model/MessagesList.cs | 166 +- src/freeclimb/Model/MessagesListAllOf.cs | 148 - src/freeclimb/Model/MutableResourceModel.cs | 107 +- src/freeclimb/Model/OutDial.cs | 251 +- src/freeclimb/Model/OutDialAllOf.cs | 330 - .../Model/OutDialApiConnectWebhook.cs | 255 + src/freeclimb/Model/OutDialConnectWebhook.cs | 255 + src/freeclimb/Model/OutDialStartWebhook.cs | 268 + src/freeclimb/Model/PaginationModel.cs | 150 +- src/freeclimb/Model/Park.cs | 150 +- src/freeclimb/Model/ParkAllOf.cs | 195 - src/freeclimb/Model/Pause.cs | 99 +- src/freeclimb/Model/PauseAllOf.cs | 143 - src/freeclimb/Model/PerclCommand.cs | 67 +- src/freeclimb/Model/PerclScript.cs | 66 +- src/freeclimb/Model/Play.cs | 133 +- src/freeclimb/Model/PlayAllOf.cs | 183 - src/freeclimb/Model/PlayEarlyMedia.cs | 110 +- src/freeclimb/Model/PlayEarlyMediaAllOf.cs | 151 - src/freeclimb/Model/QueueList.cs | 166 +- src/freeclimb/Model/QueueListAllOf.cs | 147 - src/freeclimb/Model/QueueMember.cs | 124 +- src/freeclimb/Model/QueueMemberList.cs | 166 +- src/freeclimb/Model/QueueMemberListAllOf.cs | 147 - src/freeclimb/Model/QueueRequest.cs | 76 +- src/freeclimb/Model/QueueResult.cs | 198 +- src/freeclimb/Model/QueueResultAllOf.cs | 262 - src/freeclimb/Model/QueueWaitWebhook.cs | 281 + src/freeclimb/Model/RecordUtterance.cs | 171 +- src/freeclimb/Model/RecordUtteranceAllOf.cs | 251 - src/freeclimb/Model/RecordWebhook.cs | 345 + src/freeclimb/Model/RecordingList.cs | 166 +- src/freeclimb/Model/RecordingListAllOf.cs | 147 - src/freeclimb/Model/RecordingResult.cs | 172 +- src/freeclimb/Model/RecordingResultAllOf.cs | 222 - src/freeclimb/Model/Redirect.cs | 110 +- src/freeclimb/Model/RedirectAllOf.cs | 151 - src/freeclimb/Model/RedirectWebhook.cs | 255 + src/freeclimb/Model/Reject.cs | 100 +- src/freeclimb/Model/RejectAllOf.cs | 142 - src/freeclimb/Model/RemoveFromConference.cs | 91 +- .../RemoveFromQueueNotificationWebhook.cs | 267 + src/freeclimb/Model/SMSTenDLCBrand.cs | 980 +- .../Model/SMSTenDLCBrandsListResult.cs | 166 +- .../Model/SMSTenDLCBrandsListResultAllOf.cs | 147 - src/freeclimb/Model/SMSTenDLCCampaign.cs | 660 +- .../Model/SMSTenDLCCampaignsListResult.cs | 166 +- .../SMSTenDLCCampaignsListResultAllOf.cs | 147 - .../Model/SMSTenDLCPartnerCampaign.cs | 538 +- .../Model/SMSTenDLCPartnerCampaignBrand.cs | 272 +- .../SMSTenDLCPartnerCampaignsListResult.cs | 167 +- ...MSTenDLCPartnerCampaignsListResultAllOf.cs | 147 - src/freeclimb/Model/SMSTollFreeCampaign.cs | 237 +- .../Model/SMSTollFreeCampaignsListResult.cs | 166 +- .../SMSTollFreeCampaignsListResultAllOf.cs | 147 - src/freeclimb/Model/Say.cs | 144 +- src/freeclimb/Model/SayAllOf.cs | 203 - src/freeclimb/Model/SendDigits.cs | 131 +- src/freeclimb/Model/SendDigitsAllOf.cs | 183 - src/freeclimb/Model/SetDTMFPassThrough.cs | 99 +- .../Model/SetDTMFPassThroughAllOf.cs | 138 - src/freeclimb/Model/SetListen.cs | 96 +- src/freeclimb/Model/SetListenAllOf.cs | 138 - src/freeclimb/Model/SetTalk.cs | 96 +- src/freeclimb/Model/SetTalkAllOf.cs | 138 - src/freeclimb/Model/Sms.cs | 170 +- src/freeclimb/Model/SmsAllOf.cs | 219 - src/freeclimb/Model/StartRecordCall.cs | 91 +- src/freeclimb/Model/TFN.cs | 78 +- src/freeclimb/Model/TerminateConference.cs | 91 +- src/freeclimb/Model/TranscribeUtterance.cs | 171 +- .../Model/TranscribeUtteranceAllOf.cs | 239 - ...Record.cs => TranscribeUtteranceRecord.cs} | 120 +- src/freeclimb/Model/TranscribeWebhook.cs | 420 + src/freeclimb/Model/Unpark.cs | 91 +- src/freeclimb/Model/UpdateCallRequest.cs | 69 +- .../UpdateConferenceParticipantRequest.cs | 86 +- .../Model/UpdateConferenceRequest.cs | 92 +- src/freeclimb/Model/Webhook.cs | 144 + src/freeclimb/Utils/IPagination.cs | 22 +- src/freeclimb/Utils/RequestVerifier.cs | 31 +- src/freeclimb/Utils/SignatureInformation.cs | 3 + src/freeclimb/freeclimb.csproj | 22 +- yarn.lock | 187 +- 598 files changed, 44162 insertions(+), 62658 deletions(-) create mode 100644 .config/dotnet-tools.json create mode 100644 api/openapi.yaml create mode 100644 appveyor.yml delete mode 100644 docs/AccountResultAllOf.md delete mode 100644 docs/AddToConferenceAllOf.md create mode 100644 docs/AddToConferenceNotificationWebhook.md create mode 100644 docs/AddToQueueNotificationWebhook.md delete mode 100644 docs/ApplicationListAllOf.md delete mode 100644 docs/ApplicationResultAllOf.md delete mode 100644 docs/AvailableNumberListAllOf.md create mode 100644 docs/BargeInReason.md create mode 100644 docs/CallControlWebhook.md create mode 100644 docs/CallEndedReason.md delete mode 100644 docs/CallListAllOf.md delete mode 100644 docs/CallResultAllOf.md create mode 100644 docs/CallStatusWebhook.md create mode 100644 docs/CompletionResultStatus.md delete mode 100644 docs/ConferenceListAllOf.md delete mode 100644 docs/ConferenceParticipantListAllOf.md delete mode 100644 docs/ConferenceParticipantResultAllOf.md create mode 100644 docs/ConferenceRecordingStatusWebhook.md delete mode 100644 docs/ConferenceResultAllOf.md create mode 100644 docs/ConferenceStatusWebhook.md delete mode 100644 docs/CreateConferenceAllOf.md create mode 100644 docs/CreateConferenceWebhook.md create mode 100644 docs/DequeueWebhook.md delete mode 100644 docs/EnqueueAllOf.md delete mode 100644 docs/GetDigitsAllOf.md create mode 100644 docs/GetDigitsReason.md create mode 100644 docs/GetDigitsWebhook.md delete mode 100644 docs/GetSpeechAllOf.md create mode 100644 docs/GetSpeechWebhook.md delete mode 100644 docs/HangupAllOf.md create mode 100644 docs/InboundCallWebhook.md delete mode 100644 docs/IncomingNumberListAllOf.md delete mode 100644 docs/IncomingNumberResultAllOf.md create mode 100644 docs/LeaveConferenceWebhook.md delete mode 100644 docs/LogListAllOf.md create mode 100644 docs/MachineDetectedWebhook.md create mode 100644 docs/MessageDeliveryWebhook.md delete mode 100644 docs/MessageRequestAllOf.md delete mode 100644 docs/MessageResultAllOf.md create mode 100644 docs/MessageStatusWebhook.md delete mode 100644 docs/MessagesListAllOf.md delete mode 100644 docs/OutDialAllOf.md create mode 100644 docs/OutDialApiConnectWebhook.md create mode 100644 docs/OutDialConnectWebhook.md create mode 100644 docs/OutDialStartWebhook.md delete mode 100644 docs/ParkAllOf.md delete mode 100644 docs/PauseAllOf.md delete mode 100644 docs/PlayAllOf.md delete mode 100644 docs/PlayEarlyMediaAllOf.md delete mode 100644 docs/QueueListAllOf.md delete mode 100644 docs/QueueMemberListAllOf.md delete mode 100644 docs/QueueResultAllOf.md create mode 100644 docs/QueueWaitWebhook.md delete mode 100644 docs/RecordUtteranceAllOf.md create mode 100644 docs/RecordWebhook.md delete mode 100644 docs/RecordingListAllOf.md delete mode 100644 docs/RecordingResultAllOf.md delete mode 100644 docs/RedirectAllOf.md create mode 100644 docs/RedirectWebhook.md delete mode 100644 docs/RejectAllOf.md delete mode 100644 docs/RemoveFromConferenceAllOf.md create mode 100644 docs/RemoveFromQueueNotificationWebhook.md create mode 100644 docs/SMSTenDLCBrandAltBusinessIdType.md create mode 100644 docs/SMSTenDLCBrandEntityType.md create mode 100644 docs/SMSTenDLCBrandIdentityStatus.md create mode 100644 docs/SMSTenDLCBrandRelationship.md create mode 100644 docs/SMSTenDLCBrandStockExchange.md delete mode 100644 docs/SMSTenDLCBrandsListResultAllOf.md create mode 100644 docs/SMSTenDLCCampaignStatus.md delete mode 100644 docs/SMSTenDLCCampaignsListResultAllOf.md create mode 100644 docs/SMSTenDLCPartnerCampaignStatus.md delete mode 100644 docs/SMSTenDLCPartnerCampaignsListResultAllOf.md create mode 100644 docs/SMSTollFreeCampaignRegistrationStatus.md delete mode 100644 docs/SMSTollFreeCampaignsListResultAllOf.md delete mode 100644 docs/SayAllOf.md delete mode 100644 docs/SendDigitsAllOf.md delete mode 100644 docs/SetDTMFPassThroughAllOf.md delete mode 100644 docs/SetListenAllOf.md delete mode 100644 docs/SetTalkAllOf.md delete mode 100644 docs/SmsAllOf.md delete mode 100644 docs/TerminateConferenceAllOf.md create mode 100644 docs/TranscribeReason.md create mode 100644 docs/TranscribeTermReason.md delete mode 100644 docs/TranscribeUtteranceAllOf.md delete mode 100644 docs/TranscribeUtteranceAllOfRecord.md create mode 100644 docs/TranscribeWebhook.md create mode 100644 docs/Webhook.md delete mode 100644 src/freeclimb.Test/Api/SmokeTests.cs create mode 100644 src/freeclimb.Test/Enums/BargeInReasonTests.cs create mode 100644 src/freeclimb.Test/Enums/CallEndedReasonTests.cs create mode 100644 src/freeclimb.Test/Enums/CompletionResultStatusTests.cs create mode 100644 src/freeclimb.Test/Enums/GetDigitsReasonTests.cs create mode 100644 src/freeclimb.Test/Enums/SMSTenDLCBrandAltBusinessIdTypeTests.cs create mode 100644 src/freeclimb.Test/Enums/SMSTenDLCBrandEntityTypeTests.cs create mode 100644 src/freeclimb.Test/Enums/SMSTenDLCBrandIdentityStatusTests.cs create mode 100644 src/freeclimb.Test/Enums/SMSTenDLCBrandRelationshipTests.cs create mode 100644 src/freeclimb.Test/Enums/SMSTenDLCBrandStockExchangeTests.cs create mode 100644 src/freeclimb.Test/Enums/SMSTenDLCCampaignStatusTests.cs create mode 100644 src/freeclimb.Test/Enums/SMSTenDLCPartnerCampaignStatusTests.cs create mode 100644 src/freeclimb.Test/Enums/SMSTollFreeCampaignRegistrationStatusTests.cs create mode 100644 src/freeclimb.Test/Enums/TranscribeReasonTests.cs create mode 100644 src/freeclimb.Test/Enums/TranscribeTermReasonTests.cs delete mode 100644 src/freeclimb.Test/Model/AccountResultAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/AddToConferenceAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/AddToConferenceNotificationWebhookTests.cs create mode 100644 src/freeclimb.Test/Model/AddToQueueNotificationWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/ApplicationListAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/ApplicationResultAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/AvailableNumberListAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/CallControlWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/CallListAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/CallResultAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/CallStatusWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/ConferenceListAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/ConferenceParticipantListAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/ConferenceParticipantResultAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/ConferenceRecordingStatusWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/ConferenceResultAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/ConferenceStatusWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/CreateConferenceAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/CreateConferenceWebhookTests.cs create mode 100644 src/freeclimb.Test/Model/DequeueWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/EnqueueAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/GetDigitsAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/GetDigitsWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/GetSpeechAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/GetSpeechWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/HangupAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/InboundCallWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/IncomingNumberListAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/IncomingNumberResultAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/LeaveConferenceWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/LogListAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/MachineDetectedWebhookTests.cs create mode 100644 src/freeclimb.Test/Model/MessageDeliveryWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/MessageRequestAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/MessageResultAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/MessageStatusWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/MessagesListAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/OutDialAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/OutDialApiConnectWebhookTests.cs create mode 100644 src/freeclimb.Test/Model/OutDialConnectWebhookTests.cs create mode 100644 src/freeclimb.Test/Model/OutDialStartWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/ParkAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/PauseAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/PlayAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/PlayEarlyMediaAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/QueueListAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/QueueMemberListAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/QueueResultAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/QueueWaitWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/RecordUtteranceAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/RecordWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/RecordingListAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/RecordingResultAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/RedirectAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/RedirectWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/RejectAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/RemoveFromQueueNotificationWebhookTests.cs delete mode 100644 src/freeclimb.Test/Model/SMSTenDLCBrandsListResultAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/SMSTenDLCCampaignsListResultAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignsListResultAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/SMSTollFreeCampaignsListResultAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/SayAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/SendDigitsAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/SetDTMFPassThroughAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/SetListenAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/SetTalkAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/SmsAllOfTests.cs delete mode 100644 src/freeclimb.Test/Model/TranscribeUtteranceAllOfRecordTests.cs delete mode 100644 src/freeclimb.Test/Model/TranscribeUtteranceAllOfTests.cs create mode 100644 src/freeclimb.Test/Model/TranscribeUtteranceRecordTests.cs create mode 100644 src/freeclimb.Test/Model/TranscribeWebhookTests.cs create mode 100644 src/freeclimb.Test/Model/WebhookTests.cs create mode 100644 src/freeclimb.Test/TestHelpers.cs create mode 100644 src/freeclimb/Enums/BargeInReason.cs create mode 100644 src/freeclimb/Enums/CallEndedReason.cs create mode 100644 src/freeclimb/Enums/CompletionResultStatus.cs delete mode 100644 src/freeclimb/Enums/Extensions.cs create mode 100644 src/freeclimb/Enums/GetDigitsReason.cs delete mode 100644 src/freeclimb/Enums/Reflection.cs create mode 100644 src/freeclimb/Enums/SMSTenDLCBrandAltBusinessIdType.cs create mode 100644 src/freeclimb/Enums/SMSTenDLCBrandEntityType.cs create mode 100644 src/freeclimb/Enums/SMSTenDLCBrandIdentityStatus.cs create mode 100644 src/freeclimb/Enums/SMSTenDLCBrandRelationship.cs create mode 100644 src/freeclimb/Enums/SMSTenDLCBrandStockExchange.cs create mode 100644 src/freeclimb/Enums/SMSTenDLCCampaignStatus.cs create mode 100644 src/freeclimb/Enums/SMSTenDLCPartnerCampaignStatus.cs create mode 100644 src/freeclimb/Enums/SMSTollFreeCampaignRegistrationStatus.cs create mode 100644 src/freeclimb/Enums/TranscribeReason.cs create mode 100644 src/freeclimb/Enums/TranscribeTermReason.cs delete mode 100644 src/freeclimb/Model/AccountResultAllOf.cs delete mode 100644 src/freeclimb/Model/AddToConferenceAllOf.cs create mode 100644 src/freeclimb/Model/AddToConferenceNotificationWebhook.cs create mode 100644 src/freeclimb/Model/AddToQueueNotificationWebhook.cs delete mode 100644 src/freeclimb/Model/ApplicationListAllOf.cs delete mode 100644 src/freeclimb/Model/ApplicationResultAllOf.cs delete mode 100644 src/freeclimb/Model/AvailableNumberListAllOf.cs create mode 100644 src/freeclimb/Model/CallControlWebhook.cs delete mode 100644 src/freeclimb/Model/CallListAllOf.cs delete mode 100644 src/freeclimb/Model/CallResultAllOf.cs create mode 100644 src/freeclimb/Model/CallStatusWebhook.cs delete mode 100644 src/freeclimb/Model/ConferenceListAllOf.cs delete mode 100644 src/freeclimb/Model/ConferenceParticipantListAllOf.cs delete mode 100644 src/freeclimb/Model/ConferenceParticipantResultAllOf.cs create mode 100644 src/freeclimb/Model/ConferenceRecordingStatusWebhook.cs delete mode 100644 src/freeclimb/Model/ConferenceResultAllOf.cs create mode 100644 src/freeclimb/Model/ConferenceStatusWebhook.cs delete mode 100644 src/freeclimb/Model/CreateConferenceAllOf.cs create mode 100644 src/freeclimb/Model/CreateConferenceWebhook.cs create mode 100644 src/freeclimb/Model/DequeueWebhook.cs delete mode 100644 src/freeclimb/Model/EnqueueAllOf.cs delete mode 100644 src/freeclimb/Model/GetDigitsAllOf.cs create mode 100644 src/freeclimb/Model/GetDigitsWebhook.cs delete mode 100644 src/freeclimb/Model/GetSpeechAllOf.cs create mode 100644 src/freeclimb/Model/GetSpeechWebhook.cs delete mode 100644 src/freeclimb/Model/HangupAllOf.cs create mode 100644 src/freeclimb/Model/InboundCallWebhook.cs delete mode 100644 src/freeclimb/Model/IncomingNumberListAllOf.cs delete mode 100644 src/freeclimb/Model/IncomingNumberResultAllOf.cs create mode 100644 src/freeclimb/Model/LeaveConferenceWebhook.cs delete mode 100644 src/freeclimb/Model/LogListAllOf.cs create mode 100644 src/freeclimb/Model/MachineDetectedWebhook.cs create mode 100644 src/freeclimb/Model/MessageDeliveryWebhook.cs delete mode 100644 src/freeclimb/Model/MessageRequestAllOf.cs delete mode 100644 src/freeclimb/Model/MessageResultAllOf.cs create mode 100644 src/freeclimb/Model/MessageStatusWebhook.cs delete mode 100644 src/freeclimb/Model/MessagesListAllOf.cs delete mode 100644 src/freeclimb/Model/OutDialAllOf.cs create mode 100644 src/freeclimb/Model/OutDialApiConnectWebhook.cs create mode 100644 src/freeclimb/Model/OutDialConnectWebhook.cs create mode 100644 src/freeclimb/Model/OutDialStartWebhook.cs delete mode 100644 src/freeclimb/Model/ParkAllOf.cs delete mode 100644 src/freeclimb/Model/PauseAllOf.cs delete mode 100644 src/freeclimb/Model/PlayAllOf.cs delete mode 100644 src/freeclimb/Model/PlayEarlyMediaAllOf.cs delete mode 100644 src/freeclimb/Model/QueueListAllOf.cs delete mode 100644 src/freeclimb/Model/QueueMemberListAllOf.cs delete mode 100644 src/freeclimb/Model/QueueResultAllOf.cs create mode 100644 src/freeclimb/Model/QueueWaitWebhook.cs delete mode 100644 src/freeclimb/Model/RecordUtteranceAllOf.cs create mode 100644 src/freeclimb/Model/RecordWebhook.cs delete mode 100644 src/freeclimb/Model/RecordingListAllOf.cs delete mode 100644 src/freeclimb/Model/RecordingResultAllOf.cs delete mode 100644 src/freeclimb/Model/RedirectAllOf.cs create mode 100644 src/freeclimb/Model/RedirectWebhook.cs delete mode 100644 src/freeclimb/Model/RejectAllOf.cs create mode 100644 src/freeclimb/Model/RemoveFromQueueNotificationWebhook.cs delete mode 100644 src/freeclimb/Model/SMSTenDLCBrandsListResultAllOf.cs delete mode 100644 src/freeclimb/Model/SMSTenDLCCampaignsListResultAllOf.cs delete mode 100644 src/freeclimb/Model/SMSTenDLCPartnerCampaignsListResultAllOf.cs delete mode 100644 src/freeclimb/Model/SMSTollFreeCampaignsListResultAllOf.cs delete mode 100644 src/freeclimb/Model/SayAllOf.cs delete mode 100644 src/freeclimb/Model/SendDigitsAllOf.cs delete mode 100644 src/freeclimb/Model/SetDTMFPassThroughAllOf.cs delete mode 100644 src/freeclimb/Model/SetListenAllOf.cs delete mode 100644 src/freeclimb/Model/SetTalkAllOf.cs delete mode 100644 src/freeclimb/Model/SmsAllOf.cs delete mode 100644 src/freeclimb/Model/TranscribeUtteranceAllOf.cs rename src/freeclimb/Model/{TranscribeUtteranceAllOfRecord.cs => TranscribeUtteranceRecord.cs} (53%) create mode 100644 src/freeclimb/Model/TranscribeWebhook.cs create mode 100644 src/freeclimb/Model/Webhook.cs diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 00000000..f219db9d --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "csharpier": { + "version": "0.30.5", + "commands": [ + "dotnet-csharpier" + ] + } + } +} \ No newline at end of file diff --git a/.github/workflows/dotnet-package.yml b/.github/workflows/dotnet-package.yml index 9d169d42..5caff9be 100644 --- a/.github/workflows/dotnet-package.yml +++ b/.github/workflows/dotnet-package.yml @@ -33,7 +33,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v2 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index edecb122..d8d76930 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,303 +1,289 @@ .gitignore README.md +api/openapi.yaml appveyor.yml 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.sln git_push.sh +src/freeclimb.Test/Api/DefaultApiTests.cs src/freeclimb.Test/Model/AccountRequestTests.cs -src/freeclimb.Test/Model/AccountResultAllOfTests.cs src/freeclimb.Test/Model/AccountResultTests.cs src/freeclimb.Test/Model/AccountStatusTests.cs src/freeclimb.Test/Model/AccountTypeTests.cs -src/freeclimb.Test/Model/AddToConferenceAllOfTests.cs +src/freeclimb.Test/Model/AddToConferenceNotificationWebhookTests.cs src/freeclimb.Test/Model/AddToConferenceTests.cs +src/freeclimb.Test/Model/AddToQueueNotificationWebhookTests.cs src/freeclimb.Test/Model/AnsweredByTests.cs -src/freeclimb.Test/Model/ApplicationListAllOfTests.cs src/freeclimb.Test/Model/ApplicationListTests.cs src/freeclimb.Test/Model/ApplicationRequestTests.cs -src/freeclimb.Test/Model/ApplicationResultAllOfTests.cs src/freeclimb.Test/Model/ApplicationResultTests.cs -src/freeclimb.Test/Model/AvailableNumberListAllOfTests.cs src/freeclimb.Test/Model/AvailableNumberListTests.cs src/freeclimb.Test/Model/AvailableNumberTests.cs +src/freeclimb.Test/Model/BargeInReasonTests.cs src/freeclimb.Test/Model/BuyIncomingNumberRequestTests.cs +src/freeclimb.Test/Model/CallControlWebhookTests.cs src/freeclimb.Test/Model/CallDirectionTests.cs -src/freeclimb.Test/Model/CallListAllOfTests.cs +src/freeclimb.Test/Model/CallEndedReasonTests.cs src/freeclimb.Test/Model/CallListTests.cs -src/freeclimb.Test/Model/CallResultAllOfTests.cs src/freeclimb.Test/Model/CallResultTests.cs src/freeclimb.Test/Model/CallStatusTests.cs +src/freeclimb.Test/Model/CallStatusWebhookTests.cs src/freeclimb.Test/Model/CapabilitiesTests.cs src/freeclimb.Test/Model/CompletionRequestTests.cs +src/freeclimb.Test/Model/CompletionResultStatusTests.cs src/freeclimb.Test/Model/CompletionResultTests.cs -src/freeclimb.Test/Model/ConferenceListAllOfTests.cs src/freeclimb.Test/Model/ConferenceListTests.cs -src/freeclimb.Test/Model/ConferenceParticipantListAllOfTests.cs src/freeclimb.Test/Model/ConferenceParticipantListTests.cs -src/freeclimb.Test/Model/ConferenceParticipantResultAllOfTests.cs src/freeclimb.Test/Model/ConferenceParticipantResultTests.cs -src/freeclimb.Test/Model/ConferenceResultAllOfTests.cs +src/freeclimb.Test/Model/ConferenceRecordingStatusWebhookTests.cs src/freeclimb.Test/Model/ConferenceResultTests.cs src/freeclimb.Test/Model/ConferenceStatusTests.cs -src/freeclimb.Test/Model/CreateConferenceAllOfTests.cs +src/freeclimb.Test/Model/ConferenceStatusWebhookTests.cs src/freeclimb.Test/Model/CreateConferenceRequestTests.cs src/freeclimb.Test/Model/CreateConferenceTests.cs +src/freeclimb.Test/Model/CreateConferenceWebhookTests.cs src/freeclimb.Test/Model/CreateWebRTCTokenTests.cs src/freeclimb.Test/Model/DequeueTests.cs -src/freeclimb.Test/Model/EnqueueAllOfTests.cs +src/freeclimb.Test/Model/DequeueWebhookTests.cs src/freeclimb.Test/Model/EnqueueTests.cs src/freeclimb.Test/Model/FilterLogsRequestTests.cs -src/freeclimb.Test/Model/GetDigitsAllOfTests.cs +src/freeclimb.Test/Model/GetDigitsReasonTests.cs src/freeclimb.Test/Model/GetDigitsTests.cs -src/freeclimb.Test/Model/GetSpeechAllOfTests.cs +src/freeclimb.Test/Model/GetDigitsWebhookTests.cs src/freeclimb.Test/Model/GetSpeechReasonTests.cs src/freeclimb.Test/Model/GetSpeechTests.cs +src/freeclimb.Test/Model/GetSpeechWebhookTests.cs src/freeclimb.Test/Model/GrammarFileBuiltInTests.cs src/freeclimb.Test/Model/GrammarTypeTests.cs -src/freeclimb.Test/Model/HangupAllOfTests.cs src/freeclimb.Test/Model/HangupTests.cs src/freeclimb.Test/Model/IfMachineTests.cs -src/freeclimb.Test/Model/IncomingNumberListAllOfTests.cs +src/freeclimb.Test/Model/InboundCallWebhookTests.cs src/freeclimb.Test/Model/IncomingNumberListTests.cs src/freeclimb.Test/Model/IncomingNumberRequestTests.cs -src/freeclimb.Test/Model/IncomingNumberResultAllOfTests.cs src/freeclimb.Test/Model/IncomingNumberResultTests.cs src/freeclimb.Test/Model/LanguageTests.cs +src/freeclimb.Test/Model/LeaveConferenceWebhookTests.cs src/freeclimb.Test/Model/LogLevelTests.cs -src/freeclimb.Test/Model/LogListAllOfTests.cs src/freeclimb.Test/Model/LogListTests.cs src/freeclimb.Test/Model/LogResultTests.cs +src/freeclimb.Test/Model/MachineDetectedWebhookTests.cs src/freeclimb.Test/Model/MachineTypeTests.cs src/freeclimb.Test/Model/MakeCallRequestTests.cs +src/freeclimb.Test/Model/MessageDeliveryWebhookTests.cs src/freeclimb.Test/Model/MessageDirectionTests.cs -src/freeclimb.Test/Model/MessageRequestAllOfTests.cs src/freeclimb.Test/Model/MessageRequestTests.cs -src/freeclimb.Test/Model/MessageResultAllOfTests.cs src/freeclimb.Test/Model/MessageResultTests.cs src/freeclimb.Test/Model/MessageStatusTests.cs -src/freeclimb.Test/Model/MessagesListAllOfTests.cs +src/freeclimb.Test/Model/MessageStatusWebhookTests.cs src/freeclimb.Test/Model/MessagesListTests.cs src/freeclimb.Test/Model/MutableResourceModelTests.cs -src/freeclimb.Test/Model/OutDialAllOfTests.cs +src/freeclimb.Test/Model/OutDialApiConnectWebhookTests.cs +src/freeclimb.Test/Model/OutDialConnectWebhookTests.cs +src/freeclimb.Test/Model/OutDialStartWebhookTests.cs src/freeclimb.Test/Model/OutDialTests.cs src/freeclimb.Test/Model/PaginationModelTests.cs -src/freeclimb.Test/Model/ParkAllOfTests.cs src/freeclimb.Test/Model/ParkTests.cs -src/freeclimb.Test/Model/PauseAllOfTests.cs src/freeclimb.Test/Model/PauseTests.cs src/freeclimb.Test/Model/PerclCommandTests.cs src/freeclimb.Test/Model/PerclScriptTests.cs -src/freeclimb.Test/Model/PlayAllOfTests.cs src/freeclimb.Test/Model/PlayBeepTests.cs -src/freeclimb.Test/Model/PlayEarlyMediaAllOfTests.cs src/freeclimb.Test/Model/PlayEarlyMediaTests.cs src/freeclimb.Test/Model/PlayTests.cs -src/freeclimb.Test/Model/QueueListAllOfTests.cs src/freeclimb.Test/Model/QueueListTests.cs -src/freeclimb.Test/Model/QueueMemberListAllOfTests.cs src/freeclimb.Test/Model/QueueMemberListTests.cs src/freeclimb.Test/Model/QueueMemberTests.cs src/freeclimb.Test/Model/QueueRequestTests.cs -src/freeclimb.Test/Model/QueueResultAllOfTests.cs src/freeclimb.Test/Model/QueueResultStatusTests.cs src/freeclimb.Test/Model/QueueResultTests.cs -src/freeclimb.Test/Model/RecordUtteranceAllOfTests.cs +src/freeclimb.Test/Model/QueueWaitWebhookTests.cs src/freeclimb.Test/Model/RecordUtteranceTermReasonTests.cs src/freeclimb.Test/Model/RecordUtteranceTests.cs -src/freeclimb.Test/Model/RecordingListAllOfTests.cs +src/freeclimb.Test/Model/RecordWebhookTests.cs src/freeclimb.Test/Model/RecordingListTests.cs -src/freeclimb.Test/Model/RecordingResultAllOfTests.cs src/freeclimb.Test/Model/RecordingResultTests.cs -src/freeclimb.Test/Model/RedirectAllOfTests.cs src/freeclimb.Test/Model/RedirectTests.cs -src/freeclimb.Test/Model/RejectAllOfTests.cs +src/freeclimb.Test/Model/RedirectWebhookTests.cs src/freeclimb.Test/Model/RejectTests.cs src/freeclimb.Test/Model/RemoveFromConferenceTests.cs +src/freeclimb.Test/Model/RemoveFromQueueNotificationWebhookTests.cs src/freeclimb.Test/Model/RequestTypeTests.cs +src/freeclimb.Test/Model/SMSTenDLCBrandAltBusinessIdTypeTests.cs +src/freeclimb.Test/Model/SMSTenDLCBrandEntityTypeTests.cs +src/freeclimb.Test/Model/SMSTenDLCBrandIdentityStatusTests.cs +src/freeclimb.Test/Model/SMSTenDLCBrandRelationshipTests.cs +src/freeclimb.Test/Model/SMSTenDLCBrandStockExchangeTests.cs src/freeclimb.Test/Model/SMSTenDLCBrandTests.cs -src/freeclimb.Test/Model/SMSTenDLCBrandsListResultAllOfTests.cs src/freeclimb.Test/Model/SMSTenDLCBrandsListResultTests.cs +src/freeclimb.Test/Model/SMSTenDLCCampaignStatusTests.cs src/freeclimb.Test/Model/SMSTenDLCCampaignTests.cs -src/freeclimb.Test/Model/SMSTenDLCCampaignsListResultAllOfTests.cs src/freeclimb.Test/Model/SMSTenDLCCampaignsListResultTests.cs src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignBrandTests.cs +src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignStatusTests.cs src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignTests.cs -src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignsListResultAllOfTests.cs src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignsListResultTests.cs +src/freeclimb.Test/Model/SMSTollFreeCampaignRegistrationStatusTests.cs src/freeclimb.Test/Model/SMSTollFreeCampaignTests.cs -src/freeclimb.Test/Model/SMSTollFreeCampaignsListResultAllOfTests.cs src/freeclimb.Test/Model/SMSTollFreeCampaignsListResultTests.cs -src/freeclimb.Test/Model/SayAllOfTests.cs src/freeclimb.Test/Model/SayTests.cs -src/freeclimb.Test/Model/SendDigitsAllOfTests.cs src/freeclimb.Test/Model/SendDigitsTests.cs -src/freeclimb.Test/Model/SetDTMFPassThroughAllOfTests.cs src/freeclimb.Test/Model/SetDTMFPassThroughTests.cs -src/freeclimb.Test/Model/SetListenAllOfTests.cs src/freeclimb.Test/Model/SetListenTests.cs -src/freeclimb.Test/Model/SetTalkAllOfTests.cs src/freeclimb.Test/Model/SetTalkTests.cs -src/freeclimb.Test/Model/SmsAllOfTests.cs src/freeclimb.Test/Model/SmsTests.cs src/freeclimb.Test/Model/StartRecordCallTests.cs src/freeclimb.Test/Model/TFNTests.cs src/freeclimb.Test/Model/TerminateConferenceTests.cs -src/freeclimb.Test/Model/TranscribeUtteranceAllOfRecordTests.cs -src/freeclimb.Test/Model/TranscribeUtteranceAllOfTests.cs +src/freeclimb.Test/Model/TranscribeReasonTests.cs +src/freeclimb.Test/Model/TranscribeTermReasonTests.cs +src/freeclimb.Test/Model/TranscribeUtteranceRecordTests.cs src/freeclimb.Test/Model/TranscribeUtteranceTests.cs +src/freeclimb.Test/Model/TranscribeWebhookTests.cs src/freeclimb.Test/Model/UnparkTests.cs src/freeclimb.Test/Model/UpdateCallRequestStatusTests.cs src/freeclimb.Test/Model/UpdateCallRequestTests.cs src/freeclimb.Test/Model/UpdateConferenceParticipantRequestTests.cs src/freeclimb.Test/Model/UpdateConferenceRequestStatusTests.cs src/freeclimb.Test/Model/UpdateConferenceRequestTests.cs +src/freeclimb.Test/Model/WebhookTests.cs src/freeclimb.Test/freeclimb.Test.csproj src/freeclimb/Api/DefaultApi.cs src/freeclimb/Client/ApiClient.cs @@ -309,7 +295,6 @@ src/freeclimb/Client/ExceptionFactory.cs src/freeclimb/Client/GlobalConfiguration.cs src/freeclimb/Client/HttpMethod.cs src/freeclimb/Client/IApiAccessor.cs -src/freeclimb/Client/IAsynchronousClient.cs src/freeclimb/Client/IReadableConfiguration.cs src/freeclimb/Client/ISynchronousClient.cs src/freeclimb/Client/Multimap.cs @@ -319,149 +304,141 @@ src/freeclimb/Client/RetryConfiguration.cs src/freeclimb/Model/AbstractOpenAPISchema.cs src/freeclimb/Model/AccountRequest.cs src/freeclimb/Model/AccountResult.cs -src/freeclimb/Model/AccountResultAllOf.cs src/freeclimb/Model/AccountStatus.cs src/freeclimb/Model/AccountType.cs src/freeclimb/Model/AddToConference.cs -src/freeclimb/Model/AddToConferenceAllOf.cs +src/freeclimb/Model/AddToConferenceNotificationWebhook.cs +src/freeclimb/Model/AddToQueueNotificationWebhook.cs src/freeclimb/Model/AnsweredBy.cs src/freeclimb/Model/ApplicationList.cs -src/freeclimb/Model/ApplicationListAllOf.cs src/freeclimb/Model/ApplicationRequest.cs src/freeclimb/Model/ApplicationResult.cs -src/freeclimb/Model/ApplicationResultAllOf.cs src/freeclimb/Model/AvailableNumber.cs src/freeclimb/Model/AvailableNumberList.cs -src/freeclimb/Model/AvailableNumberListAllOf.cs +src/freeclimb/Model/BargeInReason.cs src/freeclimb/Model/BuyIncomingNumberRequest.cs +src/freeclimb/Model/CallControlWebhook.cs src/freeclimb/Model/CallDirection.cs +src/freeclimb/Model/CallEndedReason.cs src/freeclimb/Model/CallList.cs -src/freeclimb/Model/CallListAllOf.cs src/freeclimb/Model/CallResult.cs -src/freeclimb/Model/CallResultAllOf.cs src/freeclimb/Model/CallStatus.cs +src/freeclimb/Model/CallStatusWebhook.cs src/freeclimb/Model/Capabilities.cs src/freeclimb/Model/CompletionRequest.cs src/freeclimb/Model/CompletionResult.cs +src/freeclimb/Model/CompletionResultStatus.cs src/freeclimb/Model/ConferenceList.cs -src/freeclimb/Model/ConferenceListAllOf.cs src/freeclimb/Model/ConferenceParticipantList.cs -src/freeclimb/Model/ConferenceParticipantListAllOf.cs src/freeclimb/Model/ConferenceParticipantResult.cs -src/freeclimb/Model/ConferenceParticipantResultAllOf.cs +src/freeclimb/Model/ConferenceRecordingStatusWebhook.cs src/freeclimb/Model/ConferenceResult.cs -src/freeclimb/Model/ConferenceResultAllOf.cs src/freeclimb/Model/ConferenceStatus.cs +src/freeclimb/Model/ConferenceStatusWebhook.cs src/freeclimb/Model/CreateConference.cs -src/freeclimb/Model/CreateConferenceAllOf.cs src/freeclimb/Model/CreateConferenceRequest.cs +src/freeclimb/Model/CreateConferenceWebhook.cs src/freeclimb/Model/CreateWebRTCToken.cs src/freeclimb/Model/Dequeue.cs +src/freeclimb/Model/DequeueWebhook.cs src/freeclimb/Model/Enqueue.cs -src/freeclimb/Model/EnqueueAllOf.cs src/freeclimb/Model/FilterLogsRequest.cs src/freeclimb/Model/GetDigits.cs -src/freeclimb/Model/GetDigitsAllOf.cs +src/freeclimb/Model/GetDigitsReason.cs +src/freeclimb/Model/GetDigitsWebhook.cs src/freeclimb/Model/GetSpeech.cs -src/freeclimb/Model/GetSpeechAllOf.cs src/freeclimb/Model/GetSpeechReason.cs +src/freeclimb/Model/GetSpeechWebhook.cs src/freeclimb/Model/GrammarFileBuiltIn.cs src/freeclimb/Model/GrammarType.cs src/freeclimb/Model/Hangup.cs -src/freeclimb/Model/HangupAllOf.cs src/freeclimb/Model/IfMachine.cs +src/freeclimb/Model/InboundCallWebhook.cs src/freeclimb/Model/IncomingNumberList.cs -src/freeclimb/Model/IncomingNumberListAllOf.cs src/freeclimb/Model/IncomingNumberRequest.cs src/freeclimb/Model/IncomingNumberResult.cs -src/freeclimb/Model/IncomingNumberResultAllOf.cs src/freeclimb/Model/Language.cs +src/freeclimb/Model/LeaveConferenceWebhook.cs src/freeclimb/Model/LogLevel.cs src/freeclimb/Model/LogList.cs -src/freeclimb/Model/LogListAllOf.cs src/freeclimb/Model/LogResult.cs +src/freeclimb/Model/MachineDetectedWebhook.cs src/freeclimb/Model/MachineType.cs src/freeclimb/Model/MakeCallRequest.cs +src/freeclimb/Model/MessageDeliveryWebhook.cs src/freeclimb/Model/MessageDirection.cs src/freeclimb/Model/MessageRequest.cs -src/freeclimb/Model/MessageRequestAllOf.cs src/freeclimb/Model/MessageResult.cs -src/freeclimb/Model/MessageResultAllOf.cs src/freeclimb/Model/MessageStatus.cs +src/freeclimb/Model/MessageStatusWebhook.cs src/freeclimb/Model/MessagesList.cs -src/freeclimb/Model/MessagesListAllOf.cs src/freeclimb/Model/MutableResourceModel.cs src/freeclimb/Model/OutDial.cs -src/freeclimb/Model/OutDialAllOf.cs +src/freeclimb/Model/OutDialApiConnectWebhook.cs +src/freeclimb/Model/OutDialConnectWebhook.cs +src/freeclimb/Model/OutDialStartWebhook.cs src/freeclimb/Model/PaginationModel.cs src/freeclimb/Model/Park.cs -src/freeclimb/Model/ParkAllOf.cs src/freeclimb/Model/Pause.cs -src/freeclimb/Model/PauseAllOf.cs src/freeclimb/Model/PerclCommand.cs src/freeclimb/Model/PerclScript.cs src/freeclimb/Model/Play.cs -src/freeclimb/Model/PlayAllOf.cs src/freeclimb/Model/PlayBeep.cs src/freeclimb/Model/PlayEarlyMedia.cs -src/freeclimb/Model/PlayEarlyMediaAllOf.cs src/freeclimb/Model/QueueList.cs -src/freeclimb/Model/QueueListAllOf.cs src/freeclimb/Model/QueueMember.cs src/freeclimb/Model/QueueMemberList.cs -src/freeclimb/Model/QueueMemberListAllOf.cs src/freeclimb/Model/QueueRequest.cs src/freeclimb/Model/QueueResult.cs -src/freeclimb/Model/QueueResultAllOf.cs src/freeclimb/Model/QueueResultStatus.cs +src/freeclimb/Model/QueueWaitWebhook.cs src/freeclimb/Model/RecordUtterance.cs -src/freeclimb/Model/RecordUtteranceAllOf.cs src/freeclimb/Model/RecordUtteranceTermReason.cs +src/freeclimb/Model/RecordWebhook.cs src/freeclimb/Model/RecordingList.cs -src/freeclimb/Model/RecordingListAllOf.cs src/freeclimb/Model/RecordingResult.cs -src/freeclimb/Model/RecordingResultAllOf.cs src/freeclimb/Model/Redirect.cs -src/freeclimb/Model/RedirectAllOf.cs +src/freeclimb/Model/RedirectWebhook.cs src/freeclimb/Model/Reject.cs -src/freeclimb/Model/RejectAllOf.cs src/freeclimb/Model/RemoveFromConference.cs +src/freeclimb/Model/RemoveFromQueueNotificationWebhook.cs src/freeclimb/Model/RequestType.cs src/freeclimb/Model/SMSTenDLCBrand.cs +src/freeclimb/Model/SMSTenDLCBrandAltBusinessIdType.cs +src/freeclimb/Model/SMSTenDLCBrandEntityType.cs +src/freeclimb/Model/SMSTenDLCBrandIdentityStatus.cs +src/freeclimb/Model/SMSTenDLCBrandRelationship.cs +src/freeclimb/Model/SMSTenDLCBrandStockExchange.cs src/freeclimb/Model/SMSTenDLCBrandsListResult.cs -src/freeclimb/Model/SMSTenDLCBrandsListResultAllOf.cs src/freeclimb/Model/SMSTenDLCCampaign.cs +src/freeclimb/Model/SMSTenDLCCampaignStatus.cs src/freeclimb/Model/SMSTenDLCCampaignsListResult.cs -src/freeclimb/Model/SMSTenDLCCampaignsListResultAllOf.cs src/freeclimb/Model/SMSTenDLCPartnerCampaign.cs src/freeclimb/Model/SMSTenDLCPartnerCampaignBrand.cs +src/freeclimb/Model/SMSTenDLCPartnerCampaignStatus.cs src/freeclimb/Model/SMSTenDLCPartnerCampaignsListResult.cs -src/freeclimb/Model/SMSTenDLCPartnerCampaignsListResultAllOf.cs src/freeclimb/Model/SMSTollFreeCampaign.cs +src/freeclimb/Model/SMSTollFreeCampaignRegistrationStatus.cs src/freeclimb/Model/SMSTollFreeCampaignsListResult.cs -src/freeclimb/Model/SMSTollFreeCampaignsListResultAllOf.cs src/freeclimb/Model/Say.cs -src/freeclimb/Model/SayAllOf.cs src/freeclimb/Model/SendDigits.cs -src/freeclimb/Model/SendDigitsAllOf.cs src/freeclimb/Model/SetDTMFPassThrough.cs -src/freeclimb/Model/SetDTMFPassThroughAllOf.cs src/freeclimb/Model/SetListen.cs -src/freeclimb/Model/SetListenAllOf.cs src/freeclimb/Model/SetTalk.cs -src/freeclimb/Model/SetTalkAllOf.cs src/freeclimb/Model/Sms.cs -src/freeclimb/Model/SmsAllOf.cs src/freeclimb/Model/StartRecordCall.cs src/freeclimb/Model/TFN.cs src/freeclimb/Model/TerminateConference.cs +src/freeclimb/Model/TranscribeReason.cs +src/freeclimb/Model/TranscribeTermReason.cs src/freeclimb/Model/TranscribeUtterance.cs -src/freeclimb/Model/TranscribeUtteranceAllOf.cs -src/freeclimb/Model/TranscribeUtteranceAllOfRecord.cs +src/freeclimb/Model/TranscribeUtteranceRecord.cs +src/freeclimb/Model/TranscribeWebhook.cs src/freeclimb/Model/Unpark.cs src/freeclimb/Model/UpdateCallRequest.cs src/freeclimb/Model/UpdateCallRequestStatus.cs src/freeclimb/Model/UpdateConferenceParticipantRequest.cs src/freeclimb/Model/UpdateConferenceRequest.cs src/freeclimb/Model/UpdateConferenceRequestStatus.cs +src/freeclimb/Model/Webhook.cs src/freeclimb/freeclimb.csproj diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 1e20ec35..4bc5d618 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 b9f6bb26..41966137 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.10.0] - 2024-12-16 diff --git a/README.md b/README.md index ae10d30a..1da30d57 100644 --- a/README.md +++ b/README.md @@ -5,18 +5,19 @@ FreeClimb is a cloud-based application programming interface (API) that puts the This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- SDK version: 4.10.0 -- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen +- SDK version: 5.0.0 +- Generator version: 7.9.0 +- Build package: org.openapitools.codegen.languages.CSharpClientCodegen For more information, please visit [https://www.freeclimb.com/support/](https://www.freeclimb.com/support/) - + ## Frameworks supported - + ## Dependencies -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.13.0 or later -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 12.0.3 or later +- [RestSharp](https://www.nuget.org/packages/RestSharp) - 112.0.0 or later +- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.2 or later - [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later - [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.0 or later @@ -31,7 +32,7 @@ Install-Package System.ComponentModel.Annotations NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742). NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See [RestSharp#1406](https://github.com/restsharp/RestSharp/issues/1406). - + ## Installation Run the following command to generate the DLL - [Mac/Linux] `/bin/sh build.sh` @@ -43,7 +44,7 @@ using freeclimb.Api; using freeclimb.Client; using freeclimb.Model; ``` - + ## Packaging A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages. @@ -56,7 +57,7 @@ nuget pack -Build -OutputDirectory out freeclimb.csproj Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual. - + ## Usage To use the API client with a HTTP proxy, setup a `System.Net.WebProxy` @@ -67,7 +68,7 @@ webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials; c.Proxy = webProxy; ``` - + ## Getting Started ```csharp @@ -88,17 +89,18 @@ namespace Example config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Password = "YOUR_API_KEY"; var apiInstance = new DefaultApi(config); var buyIncomingNumberRequest = new BuyIncomingNumberRequest(); // BuyIncomingNumberRequest | Incoming Number transaction details + try { // Buy a Phone Number IncomingNumberResult result = apiInstance.BuyAPhoneNumber(buyIncomingNumberRequest); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { @@ -112,7 +114,7 @@ namespace Example } ``` - + ## Documentation for API Endpoints All URIs are relative to *https://www.freeclimb.com/apiserver* @@ -176,169 +178,158 @@ Class | Method | HTTP request | Description *DefaultApi* | [**UpdateAnAccount**](docs/DefaultApi.md#updateanaccount) | **POST** /Accounts/{accountId} | Manage an account *DefaultApi* | [**UpdateAnApplication**](docs/DefaultApi.md#updateanapplication) | **POST** /Accounts/{accountId}/Applications/{applicationId} | Update an application *DefaultApi* | [**UpdateAnIncomingNumber**](docs/DefaultApi.md#updateanincomingnumber) | **POST** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Update an Incoming Number -*DefaultApi* | [**GetNextPage**](docs/DefaultApi.md#GetNextPage) | **GET** | Get next page of paginated resource - + + ## Documentation for Models - [Model.AccountRequest](docs/AccountRequest.md) - [Model.AccountResult](docs/AccountResult.md) - - [Model.AccountResultAllOf](docs/AccountResultAllOf.md) + - [Model.AccountStatus](docs/AccountStatus.md) + - [Model.AccountType](docs/AccountType.md) - [Model.AddToConference](docs/AddToConference.md) - - [Model.AddToConferenceAllOf](docs/AddToConferenceAllOf.md) + - [Model.AddToConferenceNotificationWebhook](docs/AddToConferenceNotificationWebhook.md) + - [Model.AddToQueueNotificationWebhook](docs/AddToQueueNotificationWebhook.md) + - [Model.AnsweredBy](docs/AnsweredBy.md) - [Model.ApplicationList](docs/ApplicationList.md) - - [Model.ApplicationListAllOf](docs/ApplicationListAllOf.md) - [Model.ApplicationRequest](docs/ApplicationRequest.md) - [Model.ApplicationResult](docs/ApplicationResult.md) - - [Model.ApplicationResultAllOf](docs/ApplicationResultAllOf.md) - [Model.AvailableNumber](docs/AvailableNumber.md) - [Model.AvailableNumberList](docs/AvailableNumberList.md) - - [Model.AvailableNumberListAllOf](docs/AvailableNumberListAllOf.md) + - [Model.BargeInReason](docs/BargeInReason.md) - [Model.BuyIncomingNumberRequest](docs/BuyIncomingNumberRequest.md) + - [Model.CallControlWebhook](docs/CallControlWebhook.md) + - [Model.CallDirection](docs/CallDirection.md) + - [Model.CallEndedReason](docs/CallEndedReason.md) - [Model.CallList](docs/CallList.md) - - [Model.CallListAllOf](docs/CallListAllOf.md) - [Model.CallResult](docs/CallResult.md) - - [Model.CallResultAllOf](docs/CallResultAllOf.md) + - [Model.CallStatus](docs/CallStatus.md) + - [Model.CallStatusWebhook](docs/CallStatusWebhook.md) - [Model.Capabilities](docs/Capabilities.md) - [Model.CompletionRequest](docs/CompletionRequest.md) - [Model.CompletionResult](docs/CompletionResult.md) + - [Model.CompletionResultStatus](docs/CompletionResultStatus.md) - [Model.ConferenceList](docs/ConferenceList.md) - - [Model.ConferenceListAllOf](docs/ConferenceListAllOf.md) - [Model.ConferenceParticipantList](docs/ConferenceParticipantList.md) - - [Model.ConferenceParticipantListAllOf](docs/ConferenceParticipantListAllOf.md) - [Model.ConferenceParticipantResult](docs/ConferenceParticipantResult.md) - - [Model.ConferenceParticipantResultAllOf](docs/ConferenceParticipantResultAllOf.md) + - [Model.ConferenceRecordingStatusWebhook](docs/ConferenceRecordingStatusWebhook.md) - [Model.ConferenceResult](docs/ConferenceResult.md) - - [Model.ConferenceResultAllOf](docs/ConferenceResultAllOf.md) + - [Model.ConferenceStatus](docs/ConferenceStatus.md) + - [Model.ConferenceStatusWebhook](docs/ConferenceStatusWebhook.md) - [Model.CreateConference](docs/CreateConference.md) - - [Model.CreateConferenceAllOf](docs/CreateConferenceAllOf.md) - [Model.CreateConferenceRequest](docs/CreateConferenceRequest.md) + - [Model.CreateConferenceWebhook](docs/CreateConferenceWebhook.md) - [Model.CreateWebRTCToken](docs/CreateWebRTCToken.md) - [Model.Dequeue](docs/Dequeue.md) + - [Model.DequeueWebhook](docs/DequeueWebhook.md) - [Model.Enqueue](docs/Enqueue.md) - - [Model.EnqueueAllOf](docs/EnqueueAllOf.md) - [Model.FilterLogsRequest](docs/FilterLogsRequest.md) - [Model.GetDigits](docs/GetDigits.md) - - [Model.GetDigitsAllOf](docs/GetDigitsAllOf.md) + - [Model.GetDigitsReason](docs/GetDigitsReason.md) + - [Model.GetDigitsWebhook](docs/GetDigitsWebhook.md) - [Model.GetSpeech](docs/GetSpeech.md) - - [Model.GetSpeechAllOf](docs/GetSpeechAllOf.md) + - [Model.GetSpeechReason](docs/GetSpeechReason.md) + - [Model.GetSpeechWebhook](docs/GetSpeechWebhook.md) + - [Model.GrammarFileBuiltIn](docs/GrammarFileBuiltIn.md) + - [Model.GrammarType](docs/GrammarType.md) - [Model.Hangup](docs/Hangup.md) - - [Model.HangupAllOf](docs/HangupAllOf.md) + - [Model.IfMachine](docs/IfMachine.md) + - [Model.InboundCallWebhook](docs/InboundCallWebhook.md) - [Model.IncomingNumberList](docs/IncomingNumberList.md) - - [Model.IncomingNumberListAllOf](docs/IncomingNumberListAllOf.md) - [Model.IncomingNumberRequest](docs/IncomingNumberRequest.md) - [Model.IncomingNumberResult](docs/IncomingNumberResult.md) - - [Model.IncomingNumberResultAllOf](docs/IncomingNumberResultAllOf.md) + - [Model.Language](docs/Language.md) + - [Model.LeaveConferenceWebhook](docs/LeaveConferenceWebhook.md) + - [Model.LogLevel](docs/LogLevel.md) - [Model.LogList](docs/LogList.md) - - [Model.LogListAllOf](docs/LogListAllOf.md) - [Model.LogResult](docs/LogResult.md) + - [Model.MachineDetectedWebhook](docs/MachineDetectedWebhook.md) + - [Model.MachineType](docs/MachineType.md) - [Model.MakeCallRequest](docs/MakeCallRequest.md) + - [Model.MessageDeliveryWebhook](docs/MessageDeliveryWebhook.md) + - [Model.MessageDirection](docs/MessageDirection.md) - [Model.MessageRequest](docs/MessageRequest.md) - - [Model.MessageRequestAllOf](docs/MessageRequestAllOf.md) - [Model.MessageResult](docs/MessageResult.md) - - [Model.MessageResultAllOf](docs/MessageResultAllOf.md) + - [Model.MessageStatus](docs/MessageStatus.md) + - [Model.MessageStatusWebhook](docs/MessageStatusWebhook.md) - [Model.MessagesList](docs/MessagesList.md) - - [Model.MessagesListAllOf](docs/MessagesListAllOf.md) - [Model.MutableResourceModel](docs/MutableResourceModel.md) - [Model.OutDial](docs/OutDial.md) - - [Model.OutDialAllOf](docs/OutDialAllOf.md) + - [Model.OutDialApiConnectWebhook](docs/OutDialApiConnectWebhook.md) + - [Model.OutDialConnectWebhook](docs/OutDialConnectWebhook.md) + - [Model.OutDialStartWebhook](docs/OutDialStartWebhook.md) - [Model.PaginationModel](docs/PaginationModel.md) - [Model.Park](docs/Park.md) - - [Model.ParkAllOf](docs/ParkAllOf.md) - [Model.Pause](docs/Pause.md) - - [Model.PauseAllOf](docs/PauseAllOf.md) - [Model.PerclCommand](docs/PerclCommand.md) - [Model.PerclScript](docs/PerclScript.md) - [Model.Play](docs/Play.md) - - [Model.PlayAllOf](docs/PlayAllOf.md) + - [Model.PlayBeep](docs/PlayBeep.md) - [Model.PlayEarlyMedia](docs/PlayEarlyMedia.md) - - [Model.PlayEarlyMediaAllOf](docs/PlayEarlyMediaAllOf.md) - [Model.QueueList](docs/QueueList.md) - - [Model.QueueListAllOf](docs/QueueListAllOf.md) - [Model.QueueMember](docs/QueueMember.md) - [Model.QueueMemberList](docs/QueueMemberList.md) - - [Model.QueueMemberListAllOf](docs/QueueMemberListAllOf.md) - [Model.QueueRequest](docs/QueueRequest.md) - [Model.QueueResult](docs/QueueResult.md) - - [Model.QueueResultAllOf](docs/QueueResultAllOf.md) + - [Model.QueueResultStatus](docs/QueueResultStatus.md) + - [Model.QueueWaitWebhook](docs/QueueWaitWebhook.md) - [Model.RecordUtterance](docs/RecordUtterance.md) - - [Model.RecordUtteranceAllOf](docs/RecordUtteranceAllOf.md) + - [Model.RecordUtteranceTermReason](docs/RecordUtteranceTermReason.md) + - [Model.RecordWebhook](docs/RecordWebhook.md) - [Model.RecordingList](docs/RecordingList.md) - - [Model.RecordingListAllOf](docs/RecordingListAllOf.md) - [Model.RecordingResult](docs/RecordingResult.md) - - [Model.RecordingResultAllOf](docs/RecordingResultAllOf.md) - [Model.Redirect](docs/Redirect.md) - - [Model.RedirectAllOf](docs/RedirectAllOf.md) + - [Model.RedirectWebhook](docs/RedirectWebhook.md) - [Model.Reject](docs/Reject.md) - - [Model.RejectAllOf](docs/RejectAllOf.md) - [Model.RemoveFromConference](docs/RemoveFromConference.md) + - [Model.RemoveFromQueueNotificationWebhook](docs/RemoveFromQueueNotificationWebhook.md) + - [Model.RequestType](docs/RequestType.md) - [Model.SMSTenDLCBrand](docs/SMSTenDLCBrand.md) + - [Model.SMSTenDLCBrandAltBusinessIdType](docs/SMSTenDLCBrandAltBusinessIdType.md) + - [Model.SMSTenDLCBrandEntityType](docs/SMSTenDLCBrandEntityType.md) + - [Model.SMSTenDLCBrandIdentityStatus](docs/SMSTenDLCBrandIdentityStatus.md) + - [Model.SMSTenDLCBrandRelationship](docs/SMSTenDLCBrandRelationship.md) + - [Model.SMSTenDLCBrandStockExchange](docs/SMSTenDLCBrandStockExchange.md) - [Model.SMSTenDLCBrandsListResult](docs/SMSTenDLCBrandsListResult.md) - - [Model.SMSTenDLCBrandsListResultAllOf](docs/SMSTenDLCBrandsListResultAllOf.md) - [Model.SMSTenDLCCampaign](docs/SMSTenDLCCampaign.md) + - [Model.SMSTenDLCCampaignStatus](docs/SMSTenDLCCampaignStatus.md) - [Model.SMSTenDLCCampaignsListResult](docs/SMSTenDLCCampaignsListResult.md) - - [Model.SMSTenDLCCampaignsListResultAllOf](docs/SMSTenDLCCampaignsListResultAllOf.md) - [Model.SMSTenDLCPartnerCampaign](docs/SMSTenDLCPartnerCampaign.md) - [Model.SMSTenDLCPartnerCampaignBrand](docs/SMSTenDLCPartnerCampaignBrand.md) + - [Model.SMSTenDLCPartnerCampaignStatus](docs/SMSTenDLCPartnerCampaignStatus.md) - [Model.SMSTenDLCPartnerCampaignsListResult](docs/SMSTenDLCPartnerCampaignsListResult.md) - - [Model.SMSTenDLCPartnerCampaignsListResultAllOf](docs/SMSTenDLCPartnerCampaignsListResultAllOf.md) - [Model.SMSTollFreeCampaign](docs/SMSTollFreeCampaign.md) + - [Model.SMSTollFreeCampaignRegistrationStatus](docs/SMSTollFreeCampaignRegistrationStatus.md) - [Model.SMSTollFreeCampaignsListResult](docs/SMSTollFreeCampaignsListResult.md) - - [Model.SMSTollFreeCampaignsListResultAllOf](docs/SMSTollFreeCampaignsListResultAllOf.md) - [Model.Say](docs/Say.md) - - [Model.SayAllOf](docs/SayAllOf.md) - [Model.SendDigits](docs/SendDigits.md) - - [Model.SendDigitsAllOf](docs/SendDigitsAllOf.md) - [Model.SetDTMFPassThrough](docs/SetDTMFPassThrough.md) - - [Model.SetDTMFPassThroughAllOf](docs/SetDTMFPassThroughAllOf.md) - [Model.SetListen](docs/SetListen.md) - - [Model.SetListenAllOf](docs/SetListenAllOf.md) - [Model.SetTalk](docs/SetTalk.md) - - [Model.SetTalkAllOf](docs/SetTalkAllOf.md) - [Model.Sms](docs/Sms.md) - - [Model.SmsAllOf](docs/SmsAllOf.md) - [Model.StartRecordCall](docs/StartRecordCall.md) - [Model.TFN](docs/TFN.md) - [Model.TerminateConference](docs/TerminateConference.md) + - [Model.TranscribeReason](docs/TranscribeReason.md) + - [Model.TranscribeTermReason](docs/TranscribeTermReason.md) - [Model.TranscribeUtterance](docs/TranscribeUtterance.md) - - [Model.TranscribeUtteranceAllOf](docs/TranscribeUtteranceAllOf.md) - - [Model.TranscribeUtteranceAllOfRecord](docs/TranscribeUtteranceAllOfRecord.md) + - [Model.TranscribeUtteranceRecord](docs/TranscribeUtteranceRecord.md) + - [Model.TranscribeWebhook](docs/TranscribeWebhook.md) - [Model.Unpark](docs/Unpark.md) - [Model.UpdateCallRequest](docs/UpdateCallRequest.md) + - [Model.UpdateCallRequestStatus](docs/UpdateCallRequestStatus.md) - [Model.UpdateConferenceParticipantRequest](docs/UpdateConferenceParticipantRequest.md) - [Model.UpdateConferenceRequest](docs/UpdateConferenceRequest.md) + - [Model.UpdateConferenceRequestStatus](docs/UpdateConferenceRequestStatus.md) + - [Model.Webhook](docs/Webhook.md) - -## Documentation for Enums - - - [Enums.AccountStatus](docs/AccountStatus.md) - - [Enums.AccountType](docs/AccountType.md) - - [Enums.AnsweredBy](docs/AnsweredBy.md) - - [Enums.CallDirection](docs/CallDirection.md) - - [Enums.CallStatus](docs/CallStatus.md) - - [Enums.ConferenceStatus](docs/ConferenceStatus.md) - - [Enums.GetSpeechReason](docs/GetSpeechReason.md) - - [Enums.GrammarFileBuiltIn](docs/GrammarFileBuiltIn.md) - - [Enums.GrammarType](docs/GrammarType.md) - - [Enums.IfMachine](docs/IfMachine.md) - - [Enums.Language](docs/Language.md) - - [Enums.LogLevel](docs/LogLevel.md) - - [Enums.MachineType](docs/MachineType.md) - - [Enums.MessageDirection](docs/MessageDirection.md) - - [Enums.MessageStatus](docs/MessageStatus.md) - - [Enums.PlayBeep](docs/PlayBeep.md) - - [Enums.QueueResultStatus](docs/QueueResultStatus.md) - - [Enums.RecordUtteranceTermReason](docs/RecordUtteranceTermReason.md) - - [Enums.RequestType](docs/RequestType.md) - - [Enums.UpdateCallRequestStatus](docs/UpdateCallRequestStatus.md) - - [Enums.UpdateConferenceRequestStatus](docs/UpdateConferenceRequestStatus.md) - - - + ## Documentation for Authorization - + +Authentication schemes defined for the API: + ### fc - **Type**: HTTP basic authentication @@ -349,86 +340,71 @@ Class | Method | HTTP request | Description ### These methods are not required unless being used for debugging/logging purposes -- To serialize (turn value into enum), we would need to use the reflection method GetEnumByValue where you pass the enum as a type and value into the method to get the associated enum. +- To deserialize (turn value into enum), every enum class has a {classname}ValueConverter class that allows for deserialization into the enum class. - GetMemberValue - - This is an extension method, so you can turn an enum directly into a value - - Get a value from an enum + For example ```csharp - using System.Collections.Generic; - using System.Diagnostics; - using System; - using System.Linq; - using System.IO; - using freeclimb.Api; - using freeclimb.Client; - using freeclimb.Model; - using System.Reflection; - using Newtonsoft.Json; - using freeclimb.Enums; namespace Example { - public class GetMemberValueExample - { - public static void Main() - { - AccountStatus status = AccountStatus.ACTIVE; - string expectedValue = StringValueAccountStatusTestValue(); - string calculatedValue = status.GetMemberValue(); - Assert.Equal(expectedValue, calculatedValue); - } - private string StringValueAccountStatusTestValue() + public class DeserializeEnumExample { - return "active"; + public static void Main() + { + AccountStatus accountStatus = AccountStatusValueConverter.FromString("active"); + Assert.IsType(accountStatus); + } } } - - } ``` -- To deserialize a value (turn enum into value), we would need to use the extension method GetMemberValue where you pass the enum as a parameter into the method to get the associated value. +- To serialize an enum to a value, simply use `nameof` with your enum instance - GetEnumByValue - - Reflection.GetEnumByValue(expectedValue) - - Get an Enum value from string + For example ```csharp - using System.Collections.Generic; - using System.Diagnostics; - using System; - using System.Linq; - using System.IO; - using freeclimb.Api; - using freeclimb.Client; - using freeclimb.Model; - using System.Reflection; - using Newtonsoft.Json; - using freeclimb.Enums; namespace Example { - public class GetEnumByValueExample - { - public static void Main() + public class SerializeEnumExample { - string stringToConvertToEnum = "active"; - AccountStatus calculatedEnumValue = Reflection.GetEnumByValue(expectedValue); - AccountStatus expectedValue = AccountStatus.ACTIVE; - Assert.Equal(expectedValue, calculatedEnumValue); + public static void Main() + { + AccountStatus accountStatus = AccountStatus.ACTIVE; + string statusValue = nameof(accountStatus); + Assert.Equal("active", statusValue); + } } } - - } ``` +## Using 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. +PerCL commands are a part of the model schema and can be serialized into JSON like so: + +```csharp +using freeclimb.Model; + +namespace Example +{ + public class UsingPerclExample + { + public static void Main() + { + CreateConference create = new CreateConference("", false, PlayBeep.ALWAYS, false, "", ""); + List commands = new List(); + commands.Add(create); + PerclScript script = new PerclScript(commands); + string expectedJSONString = "[{\"CreateConference\":{\"actionUrl\":\"\",\"alias\":false,\"playBeep\":\"always\",\"record\":false,\"statusCallbackUrl\":\"\",\"waitUrl\":\"\"}}]"; + Assert.Equal(expectedJSONString, script.ToJson()); + } + } +} +``` ## Documentation for verifying request signature diff --git a/api/openapi.yaml b/api/openapi.yaml new file mode 100644 index 00000000..3655da10 --- /dev/null +++ b/api/openapi.yaml @@ -0,0 +1,8497 @@ +openapi: 3.0.0 +info: + contact: + email: support@freeclimb.com + name: FreeClimb API Support + url: https://www.freeclimb.com/support/ + 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." + title: FreeClimb API + version: 1.0.0 +servers: +- url: https://www.freeclimb.com/apiserver +security: +- fc: [] +paths: + /Accounts/{accountId}: + get: + deprecated: false + operationId: get-an-account + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AccountResult' + description: Account Details + summary: Get an Account + tags: [] + post: + operationId: update-an-account + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AccountRequest' + description: Account details to update + responses: + "204": + description: Successful Account update + summary: Manage an account + tags: [] + /Accounts/{accountId}/Applications/{applicationId}: + delete: + deprecated: false + operationId: delete-an-application + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this application resource. + explode: false + in: path + name: applicationId + required: true + schema: + type: string + style: simple + responses: + "204": + description: Successful application deletion + summary: Delete an application + tags: [] + get: + deprecated: false + operationId: get-an-application + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: A string that uniquely identifies this application resource. + explode: false + in: path + name: applicationId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationResult' + description: Application Details + summary: Get an Application + tags: [] + post: + deprecated: false + operationId: update-an-application + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: A string that uniquely identifies this application resource. + explode: false + in: path + name: applicationId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationRequest' + description: Application details to update. + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationResult' + description: Update Application + summary: Update an application + tags: [] + /Accounts/{accountId}/Applications: + get: + deprecated: false + operationId: list-applications + parameters: + - description: Return only applications with aliases that exactly match this + value. + explode: true + in: query + name: alias + required: false + schema: + type: string + style: form + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationList' + description: List of Applications + summary: List applications + tags: [] + x-is-paginated: true + post: + deprecated: false + operationId: create-an-application + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationRequest' + description: Application Details + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ApplicationResult' + description: Application successfuly created + summary: Create an application + tags: [] + /AvailablePhoneNumbers: + get: + deprecated: false + operationId: list-available-numbers + parameters: + - description: "PCRE-compatible regular expression to filter against `phoneNumber`\ + \ field, which is in E.164 format." + explode: true + in: query + name: phoneNumber + required: false + schema: + type: string + style: form + - description: State or province of this phone number. + explode: true + in: query + name: region + required: false + schema: + type: string + style: form + - description: Country of this phone number. + explode: true + in: query + name: country + required: false + schema: + type: string + style: form + - description: Indicates whether the phone number can handle Calls. Typically + set to true for all numbers. + explode: true + in: query + name: voiceEnabled + required: false + schema: + default: true + type: boolean + style: form + - description: Indication of whether the phone number can handle sending and + receiving SMS messages. Typically set to true for all numbers. + explode: true + in: query + name: smsEnabled + required: false + schema: + default: true + type: boolean + style: form + - description: "" + explode: true + in: query + name: capabilities.voice + required: false + schema: + type: boolean + style: form + - description: "" + explode: true + in: query + name: capabilities.sms + required: false + schema: + type: boolean + style: form + - description: "" + explode: true + in: query + name: capabilities.tollFree + required: false + schema: + type: boolean + style: form + - description: "" + explode: true + in: query + name: capabilities.tenDLC + required: false + schema: + type: boolean + style: form + - description: "" + explode: true + in: query + name: capabilities.shortCode + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AvailableNumberList' + description: Available Numbers List + summary: List available numbers + tags: [] + x-is-paginated: true + /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}: + delete: + deprecated: false + operationId: delete-an-incoming-number + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this phone number resource. + explode: false + in: path + name: phoneNumberId + required: true + schema: + type: string + style: simple + responses: + "204": + description: Successful Incoming Number deletion. + summary: Delete an Incoming Number + tags: [] + get: + deprecated: false + operationId: get-an-incoming-number + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this phone number resource. + explode: false + in: path + name: phoneNumberId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/IncomingNumberResult' + description: Incoming Phone Number result. + summary: Get an Incoming Number + tags: [] + post: + deprecated: false + operationId: update-an-incoming-number + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this phone number resource. + explode: false + in: path + name: phoneNumberId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IncomingNumberRequest' + description: Incoming Number details to update + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/IncomingNumberResult' + description: Updated Incoming Phone Number + summary: Update an Incoming Number + tags: [] + /Accounts/{accountId}/IncomingPhoneNumbers: + get: + deprecated: false + operationId: list-incoming-numbers + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: Only show incoming phone number resources that match this PCRE-compatible + regular expression. + explode: true + in: query + name: phoneNumber + required: false + schema: + type: string + style: form + - description: Only show incoming phone numbers with aliases that exactly match + this value. + explode: true + in: query + name: alias + required: false + schema: + type: string + style: form + - description: State or province of this phone number. + explode: true + in: query + name: region + required: false + schema: + type: string + style: form + - description: Country of this phone number. + explode: true + in: query + name: country + required: false + schema: + type: string + style: form + - 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. + explode: true + in: query + name: applicationId + required: false + schema: + type: string + style: form + - description: Indication of whether the phone number has an application linked + to it. + explode: true + in: query + name: hasApplication + required: false + schema: + default: false + type: boolean + style: form + - deprecated: true + description: Indicates whether the phone number can handle Calls. Typically + set to true for all numbers. + explode: true + in: query + name: voiceEnabled + required: false + schema: + default: true + type: boolean + style: form + - deprecated: true + description: Indication of whether the phone number can handle sending and + receiving SMS messages. Typically set to true for all numbers. + explode: true + in: query + name: smsEnabled + required: false + schema: + default: true + type: boolean + style: form + - description: Indication of whether the phone number has a campaign associated + with it + explode: true + in: query + name: hasCampaign + required: false + schema: + type: boolean + style: form + - description: "" + explode: true + in: query + name: capabilities.voice + required: false + schema: + type: boolean + style: form + - description: "" + explode: true + in: query + name: capabilities.sms + required: false + schema: + type: boolean + style: form + - description: "" + explode: true + in: query + name: capabilities.tollFree + required: false + schema: + type: boolean + style: form + - description: "" + explode: true + in: query + name: capabilities.tenDLC + required: false + schema: + type: boolean + style: form + - description: "" + explode: true + in: query + name: capabilities.shortCode + required: false + schema: + type: boolean + style: form + - description: Only show incoming phone number resources that have been assigned + to the provided TFNCampaign ID. + explode: true + in: query + name: tfn.campaignId + required: false + schema: + type: string + style: form + - 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. + explode: true + in: query + name: offnet + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/IncomingNumberList' + description: List of Incoming Phone Numbers + summary: List Incoming Numbers + tags: [] + x-is-paginated: true + post: + deprecated: false + operationId: buy-a-phone-number + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BuyIncomingNumberRequest' + description: Incoming Number transaction details + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/IncomingNumberResult' + description: Successful Incoming Number transaction + summary: Buy a Phone Number + tags: [] + /Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion: + post: + deprecated: false + operationId: create-knowledge-base-completion + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: A string that uniquely identifies the KnowledgeBase resource. + explode: false + in: path + name: knowledgeBaseId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionRequest' + description: Completion request details + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CompletionResult' + description: KnowledgeaBase completion response + summary: Query the knowledge base + tags: [] + /Accounts/{accountId}/Calls/{callId}: + get: + deprecated: false + operationId: get-a-call + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this call resource. + explode: false + in: path + name: callId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallResult' + description: Call Resource + summary: Get a Call + tags: [] + post: + deprecated: false + operationId: update-a-live-call + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this call resource. + explode: false + in: path + name: callId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCallRequest' + description: Call details to update + required: true + responses: + "202": + description: Successfully queued call + summary: Update a Live Call + tags: [] + /Accounts/{accountId}/Calls: + get: + deprecated: false + operationId: list-calls + parameters: + - description: "If active is set to true then all calls of the nature queued,\ + \ ringing, inProgress are returned in the query." + explode: true + in: query + name: active + required: false + schema: + default: false + type: boolean + style: form + - description: Only show Calls to this phone number. + explode: true + in: query + name: to + required: false + schema: + type: string + style: form + - description: Only show Calls from this phone number. + explode: true + in: query + name: from + required: false + schema: + type: string + style: form + - description: "Only show Calls currently in this status. May be `queued`, `ringing`,\ + \ `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`." + explode: true + in: query + name: status + required: false + schema: + $ref: '#/components/schemas/CallStatus' + style: form + - description: "Only show Calls that started at or after this time, given as\ + \ YYYY-MM-DD hh:mm:ss." + explode: true + in: query + name: startTime + required: false + schema: + type: string + style: form + - description: "Only show Calls that ended at or before this time, given as\ + \ YYYY-MM- DD hh:mm:ss." + explode: true + in: query + name: endTime + required: false + schema: + type: string + style: form + - description: Only show Calls spawned by the call with this ID. + explode: true + in: query + name: parentCallId + required: false + schema: + type: string + style: form + - description: Only show calls belonging to the given applicationId. This parameter + can be repeated to return calls from multiple Applications. + explode: true + in: query + name: applicationId + required: false + schema: + items: + pattern: "^AP[0-9a-fA-F]{40}$" + type: string + maxItems: 16 + type: array + style: form + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallList' + description: Successful retrieved call list + summary: List Calls + tags: [] + x-is-paginated: true + post: + deprecated: false + operationId: make-a-call + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MakeCallRequest' + description: Call details for making a call + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CallResult' + description: Call that was created + summary: Make a Call + tags: [] + /Accounts/{accountId}/Calls/{callId}/Recordings: + get: + deprecated: false + operationId: list-call-recordings + parameters: + - description: "Only show recordings created on the specified date, in the form\ + \ *YYYY-MM-DD*." + explode: true + in: query + name: dateCreated + required: false + schema: + type: string + style: form + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this call resource. + explode: false + in: path + name: callId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RecordingList' + description: List of recordings for a call + summary: List Call Recordings + tags: [] + x-is-paginated: true + /Accounts/{accountId}/Calls/{callId}/Logs: + get: + deprecated: false + operationId: list-call-logs + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this call resource. + explode: false + in: path + name: callId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LogList' + description: Logs for this call + summary: List Call Logs + tags: [] + x-is-paginated: true + /Accounts/{accountId}/Calls/WebRTC/Token: + post: + operationId: make-a-webrtc-jwt + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateWebRTCToken' + description: Information needed to craft a JWT compatible with the platforms + WebRTC APIs + required: true + responses: + "200": + content: + text/plain: + schema: + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjEyMzQ1Njc4LCJjdXN0b20iOnsidG8iOiIrMTEyMjMzMzQ0NDQiLCJmcm9tIjoiKzE0NDQ0MzMzMjIxIiwidXNlcyI6MX19.H3UKv7poe0adLoFpilxOtC5dGsE5eb2ZxiuygDPs23E + type: string + description: The created JWT + summary: Make a JWT for WebRTC calling + /Accounts/{accountId}/Conferences: + get: + deprecated: false + operationId: list-conferences + parameters: + - description: "Only show conferences that currently have the specified status.\ + \ Valid values: `empty`, `populated`, `inProgress`, or `terminated`." + explode: true + in: query + name: status + required: false + schema: + type: string + style: form + - description: List Conferences whose alias exactly matches this string. + explode: true + in: query + name: alias + required: false + schema: + type: string + style: form + - description: "Only show Conferences that were created on the specified date,\ + \ in the form *YYYY-MM-DD*." + explode: true + in: query + name: dateCreated + required: false + schema: + type: string + style: form + - description: "Only show Conferences that were last updated on the specified\ + \ date, in the form *YYYY-MM-DD*." + explode: true + in: query + name: dateUpdated + required: false + schema: + type: string + style: form + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ConferenceList' + description: List of Conferences + summary: List Conferences + tags: [] + x-is-paginated: true + post: + deprecated: false + operationId: create-a-conference + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateConferenceRequest' + description: Conference to create + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ConferenceResult' + description: Details of created conference + summary: Create a Conference + tags: [] + /Accounts/{accountId}/Conferences/{conferenceId}: + get: + deprecated: false + operationId: get-a-conference + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: A string that uniquely identifies this conference resource. + explode: false + in: path + name: conferenceId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ConferenceResult' + description: Successfully retrieved conference + summary: Get a Conference + tags: [] + post: + deprecated: false + operationId: update-a-conference + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this conference resource. + explode: false + in: path + name: conferenceId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConferenceRequest' + description: Conference Details to update + responses: + "204": + description: Successful conference details update + summary: Update a Conference + tags: [] + /Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}: + delete: + deprecated: false + operationId: remove-a-participant + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: ID of the conference this participant is in. + explode: false + in: path + name: conferenceId + required: true + schema: + type: string + style: simple + - description: ID of the Call associated with this participant. + explode: false + in: path + name: callId + required: true + schema: + type: string + style: simple + responses: + "204": + description: Successfully deleted conference participant + summary: Remove a Participant + tags: [] + get: + deprecated: false + operationId: get-a-participant + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: ID of the conference this participant is in. + explode: false + in: path + name: conferenceId + required: true + schema: + type: string + style: simple + - description: ID of the Call associated with this participant. + explode: false + in: path + name: callId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ConferenceParticipantResult' + description: Successfully retrieved conference participant + summary: Get a Participant + tags: [] + post: + deprecated: false + operationId: update-a-participant + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: ID of the conference this participant is in. + explode: false + in: path + name: conferenceId + required: true + schema: + type: string + style: simple + - description: ID of the Call associated with this participant. + explode: false + in: path + name: callId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConferenceParticipantRequest' + description: Conference participant details to update + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ConferenceParticipantResult' + description: Successfully retrieved conference participant + summary: Update a Participant + tags: [] + /Accounts/{accountId}/Conferences/{conferenceId}/Participants: + get: + deprecated: false + operationId: list-participants + parameters: + - description: Only show Participants with the talk privilege. + explode: true + in: query + name: talk + required: false + schema: + type: boolean + style: form + - description: Only show Participants with the listen privilege. + explode: true + in: query + name: listen + required: false + schema: + type: boolean + style: form + - description: Only show Participants with the dtmfPassThrough privilege. + explode: true + in: query + name: dtmfPassThrough + required: false + schema: + type: boolean + style: form + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: ID of the conference this participant is in. + explode: false + in: path + name: conferenceId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ConferenceParticipantList' + description: Successfully retrieved conference participant list + summary: List Participants + tags: [] + x-is-paginated: true + /Accounts/{accountId}/Conferences/{conferenceId}/Recordings: + get: + deprecated: false + operationId: list-conference-recordings + parameters: + - description: Show only Recordings made during the Call with this ID. + explode: true + in: query + name: callId + required: false + schema: + type: string + style: form + - description: "Only show Recordings created on this date, formatted as *YYYY-MM-DD*." + explode: true + in: query + name: dateCreated + required: false + schema: + type: string + style: form + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: Show only Recordings made during the conference with this ID. + explode: false + in: path + name: conferenceId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RecordingList' + description: List of Recordings + summary: List Conference Recordings + tags: [] + x-is-paginated: true + /Accounts/{accountId}/Queues/{queueId}: + get: + deprecated: false + operationId: get-a-queue + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: A string that uniquely identifies this queue resource. + explode: false + in: path + name: queueId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueResult' + description: Successfully retrieved queue + summary: Get a Queue + tags: [] + post: + deprecated: false + operationId: update-a-queue + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: A string that uniquely identifies this Queue resource. + explode: false + in: path + name: queueId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueRequest' + description: Queue Details to update + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueResult' + description: Successfully updated queue + summary: Update a Queue + tags: [] + /Accounts/{accountId}/Queues: + get: + deprecated: false + operationId: list-active-queues + parameters: + - description: Return only the Queue resources with aliases that exactly match + this name. + explode: true + in: query + name: alias + required: false + schema: + type: string + style: form + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueList' + description: Successfuly retrieved queue list + summary: List Active Queues + tags: [] + x-is-paginated: true + post: + deprecated: false + operationId: create-a-queue + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueueRequest' + description: Queue details used to create a queue + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueResult' + description: Successfuly created queue + summary: Create a Queue + tags: [] + /Accounts/{accountId}/Queues/{queueId}/Members/Front: + get: + deprecated: false + operationId: get-head-member + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies the Queue that the Member belongs + to. + explode: false + in: path + name: queueId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueMember' + description: Successfully retrieved queue member + summary: Get Head Member + tags: [] + post: + deprecated: false + operationId: dequeue-head-member + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this queue resource. + explode: false + in: path + name: queueId + required: true + schema: + type: string + style: simple + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueMember' + description: Accepted dequeue request + summary: Dequeue Head Member + tags: [] + /Accounts/{accountId}/Queues/{queueId}/Members: + get: + deprecated: false + operationId: list-members + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies the Queue that the Member belongs + to. + explode: false + in: path + name: queueId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueMemberList' + description: Successfully retrieved queue member list + summary: List Members + tags: [] + x-is-paginated: true + /Accounts/{accountId}/Queues/{queueId}/Members/{callId}: + get: + deprecated: false + operationId: get-a-member + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies the Queue that the Member belongs + to. + explode: false + in: path + name: queueId + required: true + schema: + type: string + style: simple + - description: ID of the Call that the Member belongs to + explode: false + in: path + name: callId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueMember' + description: Successfully retrieved a queue member + summary: Get a Member + tags: [] + post: + deprecated: false + operationId: dequeue-a-member + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies the Queue that the Member belongs + to. + explode: false + in: path + name: queueId + required: true + schema: + type: string + style: simple + - description: ID if the Call that the Member belongs to + explode: false + in: path + name: callId + required: true + schema: + type: string + style: simple + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/QueueMember' + description: Accepted dequeue request + summary: Dequeue a Member + tags: [] + /Accounts/{accountId}/Logs: + get: + deprecated: false + operationId: list-all-account-logs + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LogList' + description: Successfully retrieved log list + summary: List All Account Logs + tags: [] + x-is-paginated: true + post: + deprecated: false + operationId: filter-logs + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FilterLogsRequest' + description: Filter logs request paramters + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LogList' + description: Successfully retrieved log list + summary: Filter Logs + tags: [] + x-is-paginated: true + /Accounts/{accountId}/Recordings: + get: + deprecated: false + operationId: list-recordings + parameters: + - description: Show only Recordings made during the Call with this ID. + explode: true + in: query + name: callId + required: false + schema: + type: string + style: form + - description: Show only Recordings made during the conference with this ID. + explode: true + in: query + name: conferenceId + required: false + schema: + type: string + style: form + - description: "Only show Recordings created on this date, formatted as *YYYY-MM-DD*." + explode: true + in: query + name: dateCreated + required: false + schema: + type: string + style: form + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RecordingList' + description: List of Recordings + summary: List Recordings + tags: [] + x-is-paginated: true + /Accounts/{accountId}/Recordings/{recordingId}: + delete: + deprecated: false + operationId: delete-a-recording + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this recording resource. + explode: false + in: path + name: recordingId + required: true + schema: + type: string + style: simple + responses: + "204": + description: Recording Deleted + summary: Delete a Recording + tags: [] + get: + deprecated: false + operationId: get-a-recording + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this recording resource. + explode: false + in: path + name: recordingId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RecordingResult' + description: "" + summary: Get a Recording + tags: [] + /Accounts/{accountId}/Recordings/{recordingId}/Stream: + get: + deprecated: false + operationId: stream-a-recording-file + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this recording resource. + explode: false + in: path + name: recordingId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + audio/x-wav: + schema: + format: binary + type: string + description: Streaming a Recording represented with audio/x-wav mime-type + summary: Stream a Recording File + tags: [] + /Accounts/{accountId}/Recordings/{recordingId}/Download: + get: + deprecated: false + operationId: download-a-recording-file + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this recording resource. + explode: false + in: path + name: recordingId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + audio/x-wav: + schema: + format: binary + type: string + description: Download a Recording file represented with audio/x-wav mime-type + summary: Download a Recording File + tags: [] + /Accounts/{accountId}/Messages: + get: + deprecated: false + operationId: list-sms-messages + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: Only show Messages to this phone number. + explode: true + in: query + name: to + required: false + schema: + type: string + style: form + - description: Only show Messages from this phone number. + explode: true + in: query + name: from + required: false + schema: + type: string + style: form + - description: "Only show Messages sent at or after this time (GMT), given as\ + \ *YYYY-MM-DD hh:mm:ss*." + explode: true + in: query + name: beginTime + required: false + schema: + type: string + style: form + - description: "Only show messages sent at or before this time (GMT), given\ + \ as *YYYY-MM-DD hh:mm*.." + explode: true + in: query + name: endTime + required: false + schema: + type: string + style: form + - description: Either `inbound` or `outbound`. Only show Messages that were + either *sent from* or *received by* FreeClimb. + explode: true + in: query + name: direction + required: false + schema: + $ref: '#/components/schemas/MessageDirection' + style: form + - description: Only show messages associated with this campaign ID. + explode: true + in: query + name: campaignId + required: false + schema: + type: string + style: form + - description: Only show messages associated with this brand ID + explode: true + in: query + name: brandId + required: false + schema: + type: string + style: form + - description: Only show messages that were sent as part of a 10DLC campaign. + explode: true + in: query + name: is10DLC + required: false + schema: + type: boolean + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessagesList' + description: List of messages + summary: List SMS Messages + tags: [] + x-is-paginated: true + post: + deprecated: false + operationId: send-an-sms-message + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MessageRequest' + description: Details to create a message + required: true + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResult' + description: The message has been accepted. + summary: Send an SMS Message + tags: [] + /Accounts/{accountId}/Messages/{messageId}: + get: + deprecated: false + operationId: get-an-sms-message + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this Message resource. + explode: false + in: path + name: messageId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResult' + description: The specific SMS message that’s been processed by FreeClimb + summary: Get an SMS Message + tags: [] + /Accounts/{accountId}/Messages/10DLC/Campaigns: + get: + deprecated: false + operationId: get-tenDLC-sms-campaigns + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: The unique identifier for a brand + explode: true + in: query + name: brandId + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + example: + total: 1 + start: 0 + end: 0 + page: 0 + numPages: 1 + pageSize: 100 + nextPageUri: null + campaigns: + - campaignId: C3TMRFL + accountId: ACe39970fb7c31c747c67148900b4d9da60a41e532 + cspId: SKGC6G0 + brandId: BVCEBIJ + usecase: 2FA + description: bmabry mock campaign. + subUsecases: [] + resellerId: null + sample1: Your verification code from FreeClimb is 000000. It expires + in 10 minutes. + sample2: null + sample3: null + sample4: null + sample5: null + messageFlow: null + helpMessage: null + referenceId: null + status: EXPIRED + mock: true + autoRenewal: false + embeddedLink: false + embeddedPhone: false + affiliateMarketing: false + numberPool: false + ageGated: false + directLending: false + subscriberOptin: true + subscriberOptout: false + subscriberHelp: true + createDate: 2022-07-05T15:17:05Z + billedDate: 2022-07-05T00:00:00Z + nextRenewalOrExpirationDate: null + schema: + $ref: '#/components/schemas/SMSTenDLCCampaignsListResult' + description: The list SMS 10DLC campaigns + summary: Get list of SMS 10DLC Campaigns + tags: [] + x-is-paginated: true + /Accounts/{accountId}/Messages/10DLC/Campaigns/{campaignId}: + get: + deprecated: false + operationId: get-tenDLC-sms-campaign + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this campaign resource. + explode: false + in: path + name: campaignId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SMSTenDLCCampaign' + description: The specific SMS 10DLC Campaign that’s been processed by FreeClimb + summary: Get a 10DLC SMS Campaign + tags: [] + /Accounts/{accountId}/Messages/10DLC/PartnerCampaigns: + get: + deprecated: false + operationId: get-tenDLC-sms-partnerCampaigns + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: The unique identifier for a brand + explode: true + in: query + name: brandId + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + example: + total: 1 + start: 0 + end: 0 + page: 0 + numPages: 1 + pageSize: 100 + nextPageUri: null + sharedCampaigns: + - campaignId: CX56XX4 + accountId: ACe39970fb7c31c747c67148900b4d9da60a41e532 + brandId: BX56XX4 + usecase: 2FA + description: mock campaign. + sample1: Your verification code from FreeClimb is 000000. It expires + in 10 minutes. + sample2: null + sample3: null + sample4: null + sample5: null + messageFlow: null + helpMessage: null + status: EXPIRED + embeddedLink: false + embeddedPhone: false + affiliateMarketing: false + numberPool: false + ageGated: false + directLending: false + subscriberOptin: true + subscriberOptout: false + subscriberHelp: true + createDate: 2022-07-05T15:17:05Z + optinKeywords: START + optoutKeywords: STOP + helpKeywords: HELP + optinMessage: "" + optoutMessage: "" + brand: + optionalAttributes: {} + brandId: BVCEBIJ + firstName: "" + lastName: "" + displayName: FreeClimb LLC(mock) + companyName: FreeClimb LLC + phone: "+18475722071" + email: bmabry@vailsys.com + website: https://www.freeclimb.com/ + evpVettingScore: 22 + schema: + $ref: '#/components/schemas/SMSTenDLCPartnerCampaignsListResult' + description: The list SMS 10DLC partner campaigns + summary: Get list of SMS 10DLC Partner Campaigns + tags: [] + x-is-paginated: true + /Accounts/{accountId}/Messages/10DLC/PartnerCampaigns/{campaignId}: + get: + deprecated: false + operationId: get-tenDLC-sms-partnerCampaign + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this campaign resource. + explode: false + in: path + name: campaignId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SMSTenDLCPartnerCampaign' + description: The specific SMS 10DLC Partner Campaign that’s been processed + by FreeClimb + summary: Get a 10DLC SMS Partner Campaign + tags: [] + /Accounts/{accountId}/Messages/10DLC/Brands: + get: + deprecated: false + operationId: get-tenDLC-sms-brands + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + responses: + "200": + content: + application/json: + example: + total: 1 + start: 0 + end: 0 + page: 0 + numPages: 1 + pageSize: 100 + nextPageUri: null + brands: + - mock: true + optionalAttributes: {} + accountId: AC1234512345123451234512345123451234512345 + brandId: BVCEBIJ + cspId: SKGC6G0 + firstName: "" + lastName: "" + displayName: FreeClimb LLC(mock) + companyName: FreeClimb LLC + ein: "843793747" + einIssuingCountry: US + phone: "+18475722071" + street: 570 Lake Cook Rd Ste 400 + city: Deerfield + state: IL + postalCode: "60015" + country: US + email: bmabry@vailsys.com + stockSymbol: "" + stockExchange: ASX + ipAddress: 127.0.0.1 + website: https://www.freeclimb.com/ + vertical: TECHNOLOGY + universalEin: US_843793747 + referenceId: ACdeadbeef + entityType: PRIVATE_PROFIT + brandRelationship: SMALL_ACCOUNT + identityStatus: VERIFIED + createDate: 2022-07-01T20:29:23Z + schema: + $ref: '#/components/schemas/SMSTenDLCBrandsListResult' + description: The list SMS 10DLC brands + summary: Get list of SMS 10DLC Brands + tags: [] + x-is-paginated: true + /Accounts/{accountId}/Messages/10DLC/Brands/{brandId}: + get: + deprecated: false + operationId: get-tenDLC-sms-brand + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this brand resource. + explode: false + in: path + name: brandId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SMSTenDLCBrand' + description: The specific SMS 10DLC Brand that’s been processed by FreeClimb + summary: Get a 10DLC SMS Brand + tags: [] + /Accounts/{accountId}/Messages/TollFree/Campaigns: + get: + deprecated: false + operationId: get-tollFree-sms-campaigns + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + responses: + "200": + content: + application/json: + example: + total: 1 + start: 0 + end: 0 + page: 0 + numPages: 1 + pageSize: 100 + nextPageUri: null + tfnCampaigns: + - accountId: ACe39970fb7c31c747c67148900b4d9da60a41e532 + campaignId: cmptfn_387ec3f6e03b340553f35f29c8f118cdf3eae08a + useCase: example use case + registrationStatus: PENDING + dateCreated: 1704839615 + dateUpdated: 1704839615 + revision: 1 + schema: + $ref: '#/components/schemas/SMSTollFreeCampaignsListResult' + description: The list toll-free campaigns + summary: Get list of TollFree Campaigns + tags: [] + x-is-paginated: true + /Accounts/{accountId}/Messages/TollFree/Campaigns/{campaignId}: + get: + deprecated: false + operationId: get-tollFree-sms-campaign + parameters: + - description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + - description: String that uniquely identifies this TollFree Campaign resource. + explode: false + in: path + name: campaignId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SMSTollFreeCampaign' + description: The specific SMS TollFree Campaign that’s been processed by + FreeClimb + summary: Get a TollFree SMS Campaign + tags: [] +components: + parameters: + AccountId: + description: ID of the account + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + x-account-id: true + Capabilities.Voice: + description: "" + explode: true + in: query + name: capabilities.voice + required: false + schema: + type: boolean + style: form + Capabilities.Sms: + description: "" + explode: true + in: query + name: capabilities.sms + required: false + schema: + type: boolean + style: form + Capabilities.TollFree: + description: "" + explode: true + in: query + name: capabilities.tollFree + required: false + schema: + type: boolean + style: form + Capabilities.TenDLC: + description: "" + explode: true + in: query + name: capabilities.tenDLC + required: false + schema: + type: boolean + style: form + Capabilities.ShortCode: + description: "" + explode: true + in: query + name: capabilities.shortCode + required: false + schema: + type: boolean + style: form + schemas: + AccountStatus: + description: "The status of this account. It is one of: active, suspended, or\ + \ closed." + enum: + - closed + - suspended + - active + nullable: true + type: string + x-enum: true + x-enum-varnames: + - CLOSED + - SUSPENDED + - ACTIVE + x-enum-mapping: + - enum: closed + varname: CLOSED + - enum: suspended + varname: SUSPENDED + - enum: active + varname: ACTIVE + AccountType: + description: "The type of this account. It is one of: trial or full." + enum: + - trial + - full + nullable: true + type: string + x-enum: true + x-enum-varnames: + - TRIAL + - FULL + x-enum-mapping: + - enum: trial + varname: TRIAL + - enum: full + varname: FULL + AnsweredBy: + description: "If this Call was initiated with answering machine detection, either\ + \ `human` or `machine`. Empty otherwise." + enum: + - human + - machine + nullable: true + type: string + x-enum: true + x-enum-varnames: + - HUMAN + - MACHINE + x-enum-mapping: + - enum: human + varname: HUMAN + - enum: machine + varname: MACHINE + CallDirection: + 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." + enum: + - inbound + - outboundAPI + - outboundDial + nullable: true + type: string + x-enum: true + x-enum-varnames: + - INBOUND + - OUTBOUND_API + - OUTBOUND_DIAL + x-enum-mapping: + - enum: inbound + varname: INBOUND + - enum: outboundAPI + varname: OUTBOUND_API + - enum: outboundDial + varname: OUTBOUND_DIAL + CallStatus: + 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." + enum: + - queued + - ringing + - inProgress + - canceled + - completed + - failed + - busy + - noAnswer + nullable: true + type: string + x-enum: true + x-enum-varnames: + - QUEUED + - RINGING + - IN_PROGRESS + - CANCELED + - COMPLETED + - FAILED + - BUSY + - NO_ANSWER + x-enum-mapping: + - enum: queued + varname: QUEUED + - enum: ringing + varname: RINGING + - enum: inProgress + varname: IN_PROGRESS + - enum: canceled + varname: CANCELED + - enum: completed + varname: COMPLETED + - enum: failed + varname: FAILED + - enum: busy + varname: BUSY + - enum: noAnswer + varname: NO_ANSWER + CallEndedReason: + description: Enhanced status for the Call with additional information where + available. + enum: + - busy + - failed + - noAnswer + - callCanceled + - farEndHangup + - appHangup + - appReject + - appNoPercl + - appInvalidPercl + - conferenceTerminated + - conferenceEmptied + - removedFromConference + - machineDetected + - webhookFailed + - webhookInvalidResponse + - voiceDisabled + - configErrorNoApplication + - configErrorNoVoiceUrl + - maxRedirectsError + - perclProcessingError + - internalError + - grpcHangup + - maxDuration + nullable: true + type: string + x-enum: true + x-enum-varnames: + - BUSY + - FAILED + - NO_ANSWER + - CALL_CANCELED + - FAR_END_HANGUP + - APP_HANGUP + - APP_REJECT + - APP_NO_PERCL + - APP_INVALID_PERCL + - CONFERENCE_TERMINATED + - CONFERENCE_EMPTIED + - REMOVED_FROM_CONFERENCE + - MACHINE_DETECTED + - WEBHOOK_FAILED + - WEBHOOK_INVALID_RESPONSE + - VOICE_DISABLED + - CONFIG_ERROR_NO_APPLICATION + - CONFIG_ERROR_NO_VOICE_URL + - MAX_REDIRECTS_ERROR + - PERCL_PROCESSING_ERROR + - INTERNAL_ERROR + - GRPC_HANGUP + - MAX_DURATION + x-enum-mapping: + - enum: busy + varname: BUSY + - enum: failed + varname: FAILED + - enum: noAnswer + varname: NO_ANSWER + - enum: callCanceled + varname: CALL_CANCELED + - enum: farEndHangup + varname: FAR_END_HANGUP + - enum: appHangup + varname: APP_HANGUP + - enum: appReject + varname: APP_REJECT + - enum: appNoPercl + varname: APP_NO_PERCL + - enum: appInvalidPercl + varname: APP_INVALID_PERCL + - enum: conferenceTerminated + varname: CONFERENCE_TERMINATED + - enum: conferenceEmptied + varname: CONFERENCE_EMPTIED + - enum: removedFromConference + varname: REMOVED_FROM_CONFERENCE + - enum: machineDetected + varname: MACHINE_DETECTED + - enum: webhookFailed + varname: WEBHOOK_FAILED + - enum: webhookInvalidResponse + varname: WEBHOOK_INVALID_RESPONSE + - enum: voiceDisabled + varname: VOICE_DISABLED + - enum: configErrorNoApplication + varname: CONFIG_ERROR_NO_APPLICATION + - enum: configErrorNoVoiceUrl + varname: CONFIG_ERROR_NO_VOICE_URL + - enum: maxRedirectsError + varname: MAX_REDIRECTS_ERROR + - enum: perclProcessingError + varname: PERCL_PROCESSING_ERROR + - enum: internalError + varname: INTERNAL_ERROR + - enum: grpcHangup + varname: GRPC_HANGUP + - enum: maxDuration + varname: MAX_DURATION + GetDigitsReason: + 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." + enum: + - finishKey + - timeout + - maxDigits + - tone + type: string + x-enum: true + x-enum-varnames: + - FINISH_KEY + - TIMEOUT + - MAX_DIGITS + - TONE + x-enum-mapping: + - enum: finishKey + varname: FINISH_KEY + - enum: timeout + varname: TIMEOUT + - enum: maxDigits + varname: MAX_DIGITS + - enum: tone + varname: TONE + ConferenceStatus: + description: "The status of the Conference. One of: creating, empty, populated,\ + \ inProgress, or terminated." + enum: + - empty + - populated + - inProgress + - terminated + nullable: true + type: string + x-enum: true + x-enum-varnames: + - EMPTY + - POPULATED + - IN_PROGRESS + - TERMINATED + x-enum-mapping: + - enum: empty + varname: EMPTY + - enum: populated + varname: POPULATED + - enum: inProgress + varname: IN_PROGRESS + - enum: terminated + varname: TERMINATED + GetSpeechReason: + enum: + - error + - hangup + - digit + - noInput + - noMatch + - recognition + type: string + x-enum: true + x-enum-varnames: + - ERROR + - HANGUP + - DIGIT + - NO_INPUT + - NO_MATCH + - RECOGNITION + x-enum-mapping: + - enum: error + varname: ERROR + - enum: hangup + varname: HANGUP + - enum: digit + varname: DIGIT + - enum: noInput + varname: NO_INPUT + - enum: noMatch + varname: NO_MATCH + - enum: recognition + varname: RECOGNITION + GrammarFileBuiltIn: + enum: + - ALPHNUM6 + - ANY_DIG + - DIG1 + - DIG2 + - DIG3 + - DIG4 + - DIG5 + - DIG6 + - DIG7 + - DIG8 + - DIG9 + - DIG10 + - DIG11 + - UP_TO_20_DIGIT_SEQUENCE + - VERSAY_YESNO + type: string + x-enum: true + 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-mapping: + - enum: ALPHNUM6 + varname: ALPHNUM6 + - enum: ANY_DIG + varname: ANY_DIG + - enum: DIG1 + varname: DIG1 + - enum: DIG2 + varname: DIG2 + - enum: DIG3 + varname: DIG3 + - enum: DIG4 + varname: DIG4 + - enum: DIG5 + varname: DIG5 + - enum: DIG6 + varname: DIG6 + - enum: DIG7 + varname: DIG7 + - enum: DIG8 + varname: DIG8 + - enum: DIG9 + varname: DIG9 + - enum: DIG10 + varname: DIG10 + - enum: DIG11 + varname: DIG11 + - enum: UP_TO_20_DIGIT_SEQUENCE + varname: UP_TO_20_DIGIT_SEQUENCE + - enum: VERSAY_YESNO + varname: VERSAY_YESNO + GrammarType: + 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. + enum: + - URL + - BUILTIN + nullable: true + type: string + x-enum: true + x-enum-varnames: + - URL + - BUILT_IN + x-enum-mapping: + - enum: URL + varname: URL + - enum: BUILTIN + varname: BUILT_IN + IfMachine: + 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." + enum: + - redirect + - hangup + type: string + x-enum: true + x-enum-varnames: + - REDIRECT + - HANGUP + x-enum-mapping: + - enum: redirect + varname: REDIRECT + - enum: hangup + varname: HANGUP + Language: + enum: + - ca-ES + - da-DK + - de-DE + - en-AU + - en-CA + - en-GB + - en-IN + - en-US + - es-ES + - es-MX + - fi-FI + - fr-CA + - fr-FR + - it-IT + - ja-JP + - ko-KR + - nb-NO + - nl-NL + - pl-PL + - pt-BR + - pt-PT + - ru-RU + - sv-SE + - zh-CN + - zh-HK + - zh-TW + type: string + x-enum: true + 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-mapping: + - enum: ca-ES + varname: CATALAN + - enum: da-DK + varname: DANISH + - enum: de-DE + varname: GERMAN + - enum: en-AU + varname: ENGLISH_AU + - enum: en-CA + varname: ENGLISH_CA + - enum: en-GB + varname: ENGLISH_UK + - enum: en-IN + varname: ENGLISH_IN + - enum: en-US + varname: ENGLISH_US + - enum: es-ES + varname: ENGLISH_ES + - enum: es-MX + varname: ENGLISH_MX + - enum: fi-FI + varname: FINNISH + - enum: fr-CA + varname: FRENCH_CA + - enum: fr-FR + varname: FRENCH_FR + - enum: it-IT + varname: ITALIAN + - enum: ja-JP + varname: JAPANESE + - enum: ko-KR + varname: KOREAN + - enum: nb-NO + varname: NORWEGIAN + - enum: nl-NL + varname: DUTCH + - enum: pl-PL + varname: POLISH + - enum: pt-BR + varname: PORTUGESE_BR + - enum: pt-PT + varname: PORTUGESE_PT + - enum: ru-RU + varname: RUSSIAN + - enum: sv-SE + varname: SWEDISH + - enum: zh-CN + varname: CHINESE_CN + - enum: zh-HK + varname: CHINESE_HK + - enum: zh-TW + varname: CHINESE_TW + LogLevel: + description: "Level of the log. Possible values are info, warning, and error." + enum: + - info + - warning + - error + nullable: true + type: string + x-enum: true + x-enum-varnames: + - INFO + - WARNING + - ERROR + x-enum-mapping: + - enum: info + varname: INFO + - enum: warning + varname: WARNING + - enum: error + varname: ERROR + MachineType: + enum: + - answering machine + - fax modem + type: string + x-enum: true + x-enum-varnames: + - ANSWERING_MACHINE + - FAX_MODEM + x-enum-mapping: + - enum: answering machine + varname: ANSWERING_MACHINE + - enum: fax modem + varname: FAX_MODEM + MessageDirection: + enum: + - inbound + - outbound + type: string + x-enum: true + x-enum-varnames: + - INBOUND + - OUTBOUND + x-enum-mapping: + - enum: inbound + varname: INBOUND + - enum: outbound + varname: OUTBOUND + MessageStatus: + description: "Indicates the state of the message through the message lifecycle\ + \ including: new, queued, rejected, sending, sent, failed, received, undelivered,\ + \ expired, deleted, and unknown" + enum: + - new + - queued + - rejected + - sending + - sent + - failed + - received + - undelivered + - expired + - deleted + - unknown + nullable: true + type: string + x-enum: true + x-enum-varnames: + - NEW + - QUEUED + - REJECTED + - SENDING + - SENT + - FAILED + - RECEIVED + - UNDELIVERED + - EXPIRED + - DELETED + - UNKNOWN + x-enum-mapping: + - enum: new + varname: NEW + - enum: queued + varname: QUEUED + - enum: rejected + varname: REJECTED + - enum: sending + varname: SENDING + - enum: sent + varname: SENT + - enum: failed + varname: FAILED + - enum: received + varname: RECEIVED + - enum: undelivered + varname: UNDELIVERED + - enum: expired + varname: EXPIRED + - enum: deleted + varname: DELETED + - enum: unknown + varname: UNKNOWN + PlayBeep: + 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` " + enum: + - always + - never + - entryOnly + - exitOnly + nullable: true + type: string + x-enum: true + x-enum-varnames: + - ALWAYS + - NEVER + - ENTRY_ONLY + - EXIT_ONLY + x-enum-mapping: + - enum: always + varname: ALWAYS + - enum: never + varname: NEVER + - enum: entryOnly + varname: ENTRY_ONLY + - enum: exitOnly + varname: EXIT_ONLY + x-enum-default-attr: ALWAYS + QueueResultStatus: + enum: + - queueFull + - dequeued + - hangup + - systemError + type: string + x-enum: true + x-enum-varnames: + - QUEUE_FULL + - DEQUEUED + - HANGUP + - SYSTEM_ERROR + x-enum-mapping: + - enum: queueFull + varname: QUEUE_FULL + - enum: dequeued + varname: DEQUEUED + - enum: hangup + varname: HANGUP + - enum: systemError + varname: SYSTEM_ERROR + RecordUtteranceTermReason: + enum: + - finishKey + - timeout + - hangup + - maxLength + type: string + x-enum: true + x-enum-varnames: + - FINISH_KEY + - TIMEOUT + - HANGUP + - MAX_LENGTH + x-enum-mapping: + - enum: finishKey + varname: FINISH_KEY + - enum: timeout + varname: TIMEOUT + - enum: hangup + varname: HANGUP + - enum: maxLength + varname: MAX_LENGTH + BargeInReason: + enum: + - noBargeIn + - bargeInByDTMF + - bargeInByEnergy + type: string + x-enum: true + x-enum-varnames: + - NO_BARGE_IN + - BARGE_IN_BY_DTMF + - BARGE_IN_BY_ENERGY + x-enum-mapping: + - enum: noBargeIn + varname: NO_BARGE_IN + - enum: bargeInByDTMF + varname: BARGE_IN_BY_DTMF + - enum: bargeInByEnergy + varname: BARGE_IN_BY_ENERGY + TranscribeTermReason: + enum: + - error + - completed + type: string + x-enum: true + x-enum-varnames: + - ERROR + - COMPLETED + x-enum-mapping: + - enum: error + varname: ERROR + - enum: completed + varname: COMPLETED + TranscribeReason: + enum: + - internalError + - hangup + - maxLength + - digit + - noInput + type: string + x-enum: true + x-enum-varnames: + - INTERNAL_ERROR + - HANGUP + - MAX_LENGTH + - DIGIT + - NO_INPUT + x-enum-mapping: + - enum: internalError + varname: INTERNAL_ERROR + - enum: hangup + varname: HANGUP + - enum: maxLength + varname: MAX_LENGTH + - enum: digit + varname: DIGIT + - enum: noInput + varname: NO_INPUT + RequestType: + enum: + - inboundCall + - record + - getDigits + - getSpeech + - redirect + - pause + - outDialStart + - outDialConnect + - outDialApiConnect + - machineDetected + - dequeue + - queueWait + - addToQueueNotification + - removeFromQueueNotification + - callStatus + - createConference + - conferenceStatus + - leaveConference + - addToConferenceNotification + - conferenceRecordingStatus + - conferenceCallControl + - messageDelivery + - messageStatus + type: string + x-enum: true + 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-mapping: + - enum: inboundCall + varname: INBOUND_CALL + - enum: record + varname: RECORD + - enum: getDigits + varname: GET_DIGITS + - enum: getSpeech + varname: GET_SPEECH + - enum: redirect + varname: REDIRECT + - enum: pause + varname: PAUSE + - enum: outDialStart + varname: OUT_DIAL_START + - enum: outDialConnect + varname: OUT_DIAL_CONNECT + - enum: outDialApiConnect + varname: OUT_DIAL_API_CONNECT + - enum: machineDetected + varname: MACHINE_DETECTED + - enum: dequeue + varname: DEQUEUE + - enum: queueWait + varname: QUEUE_WAIT + - enum: addToQueueNotification + varname: ADD_TO_QUEUE_NOTIFICATION + - enum: removeFromQueueNotification + varname: REMOVE_FROM_QUEUE_NOTIFICATION + - enum: callStatus + varname: CALL_STATUS + - enum: createConference + varname: CREATE_CONFERENCE + - enum: conferenceStatus + varname: CONFERENCE_STATUS + - enum: leaveConference + varname: LEAVE_CONFERENCE + - enum: addToConferenceNotification + varname: ADD_TO_CONFERENCE_NOTIFICATION + - enum: conferenceRecordingStatus + varname: CONFERENCE_RECORDING_STATUS + - enum: conferenceCallControl + varname: CONFERENCE_CALL_CONTROL + - enum: messageDelivery + varname: MESSAGE_DELIVERY + - enum: messageStatus + varname: MESSAGE_STATUS + UpdateCallRequestStatus: + 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. + enum: + - canceled + - completed + type: string + x-enum: true + x-enum-varnames: + - CANCELED + - COMPLETED + x-enum-mapping: + - enum: canceled + varname: CANCELED + - enum: completed + varname: COMPLETED + UpdateConferenceRequestStatus: + description: "New status of the conference. Valid values: `empty` or `terminated`.\ + \ For more information, see **Status Parameter** below.**" + enum: + - empty + - terminated + type: string + x-enum: true + x-enum-varnames: + - EMPTY + - TERMINATED + x-enum-mapping: + - enum: empty + varname: EMPTY + - enum: terminated + varname: TERMINATED + SMSTollFreeCampaignRegistrationStatus: + 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 + type: string + x-enum: true + x-enum-varnames: + - UNREGISTERED + - INITIATED + - PENDING + - DECLINED + - REGISTERED + x-enum-mapping: + - enum: UNREGISTERED + varname: UNREGISTERED + - enum: INITIATED + varname: INITIATED + - enum: PENDING + varname: PENDING + - enum: DECLINED + varname: DECLINED + - enum: REGISTERED + varname: REGISTERED + SMSTenDLCCampaignStatus: + description: "Current campaign status. Possible values: ACTIVE, EXPIRED. A newly\ + \ created campaign defaults to ACTIVE status. " + enum: + - ACTIVE + - EXPIRED + type: string + x-enum: true + x-enum-varnames: + - ACTIVE + - EXPIRED + x-enum-mapping: + - enum: ACTIVE + varname: ACTIVE + - enum: EXPIRED + varname: EXPIRED + SMSTenDLCPartnerCampaignStatus: + description: "Current campaign status. Possible values: ACTIVE, EXPIRED. A newly\ + \ created campaign defaults to ACTIVE status. " + enum: + - ACTIVE + - EXPIRED + type: string + x-enum: true + x-enum-varnames: + - ACTIVE + - EXPIRED + x-enum-mapping: + - enum: ACTIVE + varname: ACTIVE + - enum: EXPIRED + varname: EXPIRED + SMSTenDLCBrandEntityType: + description: Entity type behind the brand. This is the form of business establishment. + enum: + - PRIVATE_PROFIT + - PUBLIC_PROFIT + - NON_PROFIT + - GOVERNMENT + - SOLE_PROPRIETOR + maxLength: 20 + type: string + x-enum: true + x-enum-varnames: + - PRIVATE_PROFIT + - PUBLIC_PROFIT + - NON_PROFIT + - GOVERNMENT + - SOLE_PROPRIETOR + x-enum-mapping: + - enum: PRIVATE_PROFIT + varname: PRIVATE_PROFIT + - enum: PUBLIC_PROFIT + varname: PUBLIC_PROFIT + - enum: NON_PROFIT + varname: NON_PROFIT + - enum: GOVERNMENT + varname: GOVERNMENT + - enum: SOLE_PROPRIETOR + varname: SOLE_PROPRIETOR + SMSTenDLCBrandRelationship: + description: Brand relationship to the CSP + enum: + - BASIC_ACCOUNT + - SMALL_ACCOUNT + - MEDIUM_ACCOUNT + - LARGE_ACCOUNT + - KEY_ACCOUNT + type: string + x-enum: true + x-enum-varnames: + - BASIC_ACCOUNT + - SMALL_ACCOUNT + - MEDIUM_ACCOUNT + - LARGE_ACCOUNT + - KEY_ACCOUNT + x-enum-mapping: + - enum: BASIC_ACCOUNT + varname: BASIC_ACCOUNT + - enum: SMALL_ACCOUNT + varname: SMALL_ACCOUNT + - enum: MEDIUM_ACCOUNT + varname: MEDIUM_ACCOUNT + - enum: LARGE_ACCOUNT + varname: LARGE_ACCOUNT + - enum: KEY_ACCOUNT + varname: KEY_ACCOUNT + SMSTenDLCBrandStockExchange: + description: (Required for public company) stock exchange. + 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 + example: NASDAQ + type: string + x-enum: true + 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 + x-enum-mapping: + - enum: NONE + varname: NONE + - enum: NASDAQ + varname: NASDAQ + - enum: NYSE + varname: NYSE + - enum: AMEX + varname: AMEX + - enum: AMX + varname: AMX + - enum: ASX + varname: ASX + - enum: B3 + varname: B3 + - enum: BME + varname: BME + - enum: BSE + varname: BSE + - enum: FRA + varname: FRA + - enum: ICEX + varname: ICEX + - enum: JPX + varname: JPX + - enum: JSE + varname: JSE + - enum: KRX + varname: KRX + - enum: LON + varname: LON + - enum: NSE + varname: NSE + - enum: OMX + varname: OMX + - enum: SEHK + varname: SEHK + - enum: SGX + varname: SGX + - enum: SSE + varname: SSE + - enum: STO + varname: STO + - enum: SWX + varname: SWX + - enum: SZSE + varname: SZSE + - enum: TSX + varname: TSX + - enum: TWSE + varname: TWSE + - enum: VSE + varname: VSE + - enum: OTHER + varname: OTHER + SMSTenDLCBrandAltBusinessIdType: + description: The type of the Alternative business identifier + enum: + - NONE + - DUNS + - GIIN + - LEI + type: string + x-enum: true + x-enum-varnames: + - NONE + - DUNS + - GIIN + - LEI + x-enum-mapping: + - enum: NONE + varname: NONE + - enum: DUNS + varname: DUNS + - enum: GIIN + varname: GIIN + - enum: LEI + varname: LEI + SMSTenDLCBrandIdentityStatus: + description: TCR assessment of the brand identification status. + enum: + - SELF_DECLARED + - UNVERIFIED + - VERIFIED + - VETTED_VERIFIED + type: string + x-enum: true + x-enum-varnames: + - SELF_DECLARED + - UNVERIFIED + - VERIFIED + - VETTED_VERIFIED + x-enum-mapping: + - enum: SELF_DECLARED + varname: SELF_DECLARED + - enum: UNVERIFIED + varname: UNVERIFIED + - enum: VERIFIED + varname: VERIFIED + - enum: VETTED_VERIFIED + varname: VETTED_VERIFIED + CompletionResultStatus: + description: "Completion result status. Possible values: success, no_context" + enum: + - success + - no_context + type: string + x-enum: true + x-enum-varnames: + - SUCCESS + - NO_CONTEXT + x-enum-mapping: + - enum: success + varname: SUCCESS + - enum: no_context + varname: NO_CONTEXT + SMSTenDLCOptionalAttributes: + additionalProperties: true + description: Optional brand attributes. Please refer to GET /enum/optionalAttributeNames + for dictionary of optional attribute names. + type: object + x-is-map: true + x-is-hash: true + PerclScript: + description: A PerCL script to be returned to the FreeClimb servers in FreeClimb + applications + properties: + commands: + description: A JSON array of PerCL commands + items: + $ref: '#/components/schemas/PerclCommand' + type: array + x-is-list: true + type: object + x-percl-script: true + PerclCommand: + description: An individual command used in a PerCLScript. + discriminator: + 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' + propertyName: command + properties: + command: + description: Name of PerCL Command (this is automatically derived from mapping + configuration and should not be manually supplied in any arguments) + type: string + x-percl-command-base: true + x-is-no-property: true + type: object + x-percl-command-base: true + Webhook: + discriminator: + 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' + propertyName: requestType + properties: + requestType: + description: Type of webhook request + type: string + x-is-no-property: true + x-webhook-base: true + type: object + x-webhook-base: true + AddToConferenceNotificationWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + 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. + type: string + callId: + description: "Unique ID for this Call, generated by FreeClimb." + type: string + accountId: + description: Account ID associated with your account. + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to you and to which this Call is + directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: Unique ID of the Conference. + type: string + queueId: + description: "This is only populated if the request pertains to a Queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + status: + $ref: '#/components/schemas/ConferenceStatus' + recordingUrl: + description: URL of the Conference’s recorded audio. Populated only if + a Recording exists and the Conference was emptied. + format: uri + type: string + x-is-uri: true + x-is-url: true + recordingId: + description: Unique ID of the Recording from this Conference. Populated + only if a recording exists and the Conference was emptied. + type: string + recordingDurationSec: + 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." + type: integer + type: object + 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. + x-webhook: addToConferenceNotification + AddToQueueNotificationWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + 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. + type: string + callId: + description: "Unique ID for this Call, generated by FreeClimb." + type: string + accountId: + description: Account ID associated with your account. + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to you and to which this Call is + directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: Unique ID of the Conference. + type: string + queueId: + description: "This is only populated if the request pertains to a Queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + type: object + 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. + x-webhook: addToQueueNotification + CallControlWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + description: Context or reason why this request is being made. Will be + callControl. + type: string + callId: + description: "Unique ID for this Call, generated by FreeClimb." + type: string + accountId: + description: Account ID associated with your account. + type: string + conferenceId: + description: Unique ID of the Conference. + type: string + digits: + description: String of digits entered by the participant. + type: string + type: object + 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." + x-webhook: callControl + CallStatusWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + description: Context or reason why this request is being made. Will be + callStatus - A Call has ended and the statusCallbackUrl is being invoked. + type: string + callId: + description: "Unique ID for this Call, generated by FreeClimb." + type: string + accountId: + description: Account ID associated with your account. + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to you and to which this Call is + directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + callEndedReason: + $ref: '#/components/schemas/CallEndedReason' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: Unique ID of the Conference. + type: string + queueId: + description: "This is only populated if the request pertains to a Queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + type: object + description: A Call has ended and the statusCallbackUrl is being invoked. This + is a notification only; All PerCL commands will be ignored. + x-webhook: callStatus + ConferenceRecordingStatusWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + description: Context or reason why this request is being made. Will be + conferenceRecordingStatus - The statusCallbackUrl request includes Recording + information for a Conference that ended. + type: string + callId: + description: "Unique ID for this Call, generated by FreeClimb." + type: string + accountId: + description: Account ID associated with your account. + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to you and to which this Call is + directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: Unique ID of the Conference. + type: string + queueId: + description: "This is only populated if the request pertains to a Queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + status: + $ref: '#/components/schemas/ConferenceStatus' + recordingUrl: + description: URL of the Conference’s recorded audio. Populated only if + a Recording exists and the Conference was emptied. + format: uri + type: string + x-is-uri: true + x-is-url: true + recordingId: + description: Unique ID of the Recording from this Conference. Populated + only if a recording exists and the Conference was emptied. + type: string + recordingDurationSec: + 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." + type: integer + type: object + description: The statusCallbackUrl request includes Recording information for + a Conference that ended. This is a notification only; any PerCL returned will + be ignored. + x-webhook: conferenceRecordingStatus + ConferenceStatusWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + description: Context or reason why this request is being made. Will be + conferenceRecordingStatus - The statusCallbackUrl request includes Recording + information for a Conference that ended. + type: string + callId: + description: "Unique ID for this Call, generated by FreeClimb." + type: string + accountId: + description: Account ID associated with your account. + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to you and to which this Call is + directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: Unique ID of the Conference. + type: string + queueId: + description: "This is only populated if the request pertains to a Queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + status: + $ref: '#/components/schemas/ConferenceStatus' + recordingUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + recordingId: + 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 + type: string + recordingDurationSec: + 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 + type: integer + type: object + 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. + x-webhook: conferenceStatus + CreateConferenceWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + 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. + type: string + callId: + description: "Unique ID for this Call, generated by FreeClimb." + type: string + accountId: + description: Account ID associated with your account. + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to you and to which this Call is + directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: Unique ID of the Conference. + type: string + queueId: + description: "This is only populated if the request pertains to a Queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + status: + $ref: '#/components/schemas/ConferenceStatus' + recordingUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + recordingId: + 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 + type: string + recordingDurationSec: + 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 + type: integer + type: object + 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. + x-webhook: createConference + DequeueWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + 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. + type: string + callId: + description: "Unique ID for this Call, generated by FreeClimb." + type: string + accountId: + description: Account ID associated with your account. + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to you and to which this Call is + directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: Unique ID of the Conference. + type: string + queueId: + description: "This is only populated if the request pertains to a Queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + queueResult: + 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)." + type: string + queueTime: + description: Time (in seconds) the call spent in the Queue. This is only + available if the Call was actually enqueued. + nullable: true + type: integer + type: object + description: A queued call has been dequeued and the actionUrl of the corresponding + Enqueue action is being invoked. A PerCL response is expected. + x-webhook: dequeue + GetDigitsWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + description: Context or reason why this request is being made. Will be + getDigits - The GetDigits command has completed and its actionUrl is + being invoked. + type: string + callId: + description: "Unique ID for this Call, generated by FreeClimb." + type: string + accountId: + description: Account ID associated with your account. + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to you and to which this Call is + directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: Unique ID of the Conference. + type: string + queueId: + description: "This is only populated if the request pertains to a Queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + digits: + 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" + type: string + reason: + $ref: '#/components/schemas/GetDigitsReason' + parentCallId: + description: ID of the Call that created this leg (child call). + type: string + type: object + description: A POST request with the following fields will be sent to the actionUrl + provided in your GetDigits command. + x-webhook: getDigits + GetSpeechWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + description: Context or reason why this request is being made. Will be + getSpeech - The GetSpeech command has completed and its actionUrl is + being invoked. + type: string + callId: + description: "Unique ID for this Call, generated by FreeClimb." + type: string + accountId: + description: Account ID associated with your account. + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to you and to which this Call is + directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: Unique ID of the Conference. + type: string + queueId: + description: "This is only populated if the request pertains to a Queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + reason: + $ref: '#/components/schemas/GetSpeechReason' + recognitionResult: + 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. + type: string + confidence: + 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. + type: integer + parentCallId: + description: ID of the Call that created this leg (child call). + type: string + completionReason: + description: Advanced diagnostic information if reason was error. See + RFC 6787 section 9.4.12 - speech recognition. + type: string + completionCause: + description: Advanced diagnostic information if reason was error. See + RFC 6787 section 9.4.11 - speech recognition. + type: string + mrcpCode: + description: Advanced diagnostic information if reason was error. See + RFC 6787 section 5.4 - MRCPv2 specification. + type: integer + mrcpDiagnostic: + description: Advanced diagnostic information if reason was error. See + RFC 6787 section 5.4 - MRCPv2 specification. + type: string + type: object + description: "The GetSpeech command has completed and its actionUrl is being\ + \ invoked. A PerCL response is expected, unless reason is hangup." + x-webhook: getSpeech + InboundCallWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + description: Context or reason why this request is being made. Will be + inboundCall - An inbound call was received and the voiceUrl is being + invoked. + type: string + callId: + description: "Unique ID for this Call, generated by FreeClimb." + type: string + accountId: + description: Account ID associated with your account. + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to you and to which this Call is + directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: "This is only populated if request pertains to a Conference.\ + \ Otherwise, it is set to null." + nullable: true + type: string + queueId: + description: "This is only populated if the request pertains to a Queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + parentCallId: + nullable: true + type: string + type: object + 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. + x-webhook: inboundCall + LeaveConferenceWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + 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. + type: string + callId: + description: "Unique ID for this Call, generated by FreeClimb. This is\ + \ the call leg which has left the Conference" + type: string + accountId: + description: Account ID associated with your account. + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to you and to which this Call is + directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: "This is only populated if request pertains to a Conference.\ + \ Otherwise, it is set to null." + nullable: true + type: string + queueId: + description: "This is only populated if the request pertains to a Queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + type: object + 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. + x-webhook: leaveConference + MachineDetectedWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + 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. + type: string + callId: + description: "Unique ID for this Call, generated by FreeClimb." + type: string + accountId: + description: Account ID associated with your account. + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to you and to which this Call is + directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: "This is only populated if request pertains to a Conference.\ + \ Otherwise, it is set to null." + nullable: true + type: string + queueId: + description: "This is only populated if the request pertains to a Queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + parentCallId: + description: Call ID of the leg which initiated the OutDial. + type: string + machineType: + $ref: '#/components/schemas/MachineType' + type: object + 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. + x-webhook: machineDetected + MessageDeliveryWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + 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. + type: string + accountId: + description: Account ID associated with your account. + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to you and to which this Call is + directed (in E.164 format). + type: string + text: + description: Body of the SMS message. + type: string + direction: + description: Value will be inbound to indicate the receipt of a message + into the FreeClimb platform. + type: string + applicationId: + description: ID of the application to which the destination number is + assigned. + type: string + status: + description: Value will be received to indicate that the platform has + successfully received the incoming message. + type: string + phoneNumberId: + description: ID of the destination phone number. + type: string + uri: + description: "The URI for this resource, relative to the API base URL" + type: string + type: object + 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. + x-webhook: messageDelivery + MessageStatusWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + description: Value will be messageStatus - An outbound SMS has changed + status and the Sms command's notificationUrl is being invoked. + type: string + accountId: + description: Account ID associated with your account. + type: string + messageId: + description: "Unique ID for this message, generated by FreeClimb." + type: string + callId: + description: Unique ID for the Call in the context of which the Sms PerCL + command was issued. + type: string + from: + description: aPhone number used to initiate the SMS message (in E.164 + format). + type: string + to: + description: Destination number of the SMS message (in E.164 format). + type: string + text: + description: Body of the SMS message. + type: string + direction: + description: Value will be outbound to indicate an outgoing SMS from FreeClimb. + type: string + applicationId: + 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. + type: string + status: + $ref: '#/components/schemas/MessageStatus' + phoneNumberId: + description: ID of the destination phone number. + type: string + type: object + 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. + x-webhook: messageStatus + OutDialApiConnectWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + 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. + type: string + accountId: + description: Account ID associated with your account. + type: string + callId: + description: "Unique identifier for this Call, generated by FreeClimb" + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number or SIP URL of the party that is receiving the + call (phone number in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: "This is only populated if request pertains to a conference.\ + \ Otherwise, it is set to null." + nullable: true + type: string + queueId: + description: "This is only populated if the request pertains to a queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + parentCallId: + description: ID of the Call that created this leg (child call). + type: string + type: object + 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). + x-webhook: outDialApiConnect + OutDialConnectWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + 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. + type: string + accountId: + description: Account ID associated with your account. + type: string + callId: + description: "Unique identifier for this Call, generated by FreeClimb" + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number or SIP URL of the party that is receiving the + call (phone number in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: "This is only populated if request pertains to a conference.\ + \ Otherwise, it is set to null." + nullable: true + type: string + queueId: + description: "This is only populated if the request pertains to a queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + parentCallId: + description: ID of the Call that created this leg (child call). + type: string + type: object + 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. + x-webhook: outDialConnect + OutDialStartWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + description: Context or reason why this request is being made. Will be + outDialStart - The OutDial command has started and the actionUrl is + being invoked. + type: string + accountId: + description: Account ID associated with your account. + type: string + callId: + description: "Unique identifier for this Call, generated by FreeClimb" + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to the customer and to which this + Call is directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: "This is only populated if request pertains to a conference.\ + \ Otherwise, it is set to null." + nullable: true + type: string + queueId: + description: "This is only populated if the request pertains to a queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + dialCallId: + description: ID of the child call that was generated as a result of the + Outdial. + type: string + parentCallId: + 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 + type: string + type: object + 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. + x-webhook: outDialStart + QueueWaitWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + 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. + type: string + accountId: + description: Account ID associated with your account. + type: string + callId: + description: "Unique identifier for this Call, generated by FreeClimb" + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to the customer and to which this + Call is directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: "This is only populated if request pertains to a conference.\ + \ Otherwise, it is set to null." + nullable: true + type: string + queueId: + description: "This is only populated if the request pertains to a queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + queuePosition: + description: Current queue position of the enqueued Call. + type: string + queueTime: + description: Time (in seconds) the Call spent in the Queue. This is only + available if the Call was actually enqueued. + type: integer + currentQueueSize: + description: Current number of enqueued Calls in this Queue. + type: integer + type: object + 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" + x-webhook: queueWait + RecordWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + 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. + type: string + accountId: + description: Account ID associated with your account. + type: string + callId: + description: "Unique identifier for this Call, generated by FreeClimb" + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to the customer and to which this + Call is directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: "This is only populated if request pertains to a conference.\ + \ Otherwise, it is set to null." + nullable: true + type: string + queueId: + description: "This is only populated if the request pertains to a queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + recordingId: + description: ID of the recording. + type: string + recordingUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + recordingSize: + description: Size of the recording in bytes + type: string + recordingFormat: + description: File type of the recording (audio/wav) + type: string + recordingDurationSec: + description: Duration of the recorded audio rounded up to the nearest + second (in seconds) + type: integer + termReason: + $ref: '#/components/schemas/RecordUtteranceTermReason' + parentCallId: + description: ID of Call that created this leg (child call). + type: string + privacyMode: + 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. + type: boolean + type: object + description: The RecordUtterance command has completed and its actionUrl is + being invoked. + x-webhook: record + RedirectWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + description: Context or reason why this request is being made. Will be + redirect - The Redirect command is executing and its actionUrl is being + invoked. + type: string + accountId: + description: Account ID associated with your account. + type: string + callId: + description: "Unique identifier for this Call, generated by FreeClimb" + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to the customer and to which this + Call is directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: "This is only populated if request pertains to a conference.\ + \ Otherwise, it is set to null." + nullable: true + type: string + queueId: + description: "This is only populated if the request pertains to a queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + parentCallId: + description: ID of Call that created this leg (child call). + type: string + type: object + description: The Redirect command is executing and its actionUrl is being invoked. + A PerCL response is expected. + x-webhook: redirect + RemoveFromQueueNotificationWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + 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. + type: string + accountId: + description: Account ID associated with your account. + type: string + callId: + description: "Unique identifier for this Call, generated by FreeClimb" + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to the customer and to which this + Call is directed (in E.164 format). + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + direction: + $ref: '#/components/schemas/CallDirection' + conferenceId: + description: "This is only populated if request pertains to a conference.\ + \ Otherwise, it is set to null." + nullable: true + type: string + queueId: + description: "This is only populated if the request pertains to a queue.\ + \ Otherwise, it is set to null." + nullable: true + type: string + queueResult: + $ref: '#/components/schemas/QueueResultStatus' + queueTime: + description: Time (in seconds) the Call spent in the Queue. This is only + available if the Call was actually enqueued. + type: integer + type: object + 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. + x-webhook: removeFromQueueNotification + TranscribeWebhook: + allOf: + - $ref: '#/components/schemas/Webhook' + - properties: + requestType: + 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. + type: string + accountId: + description: Account ID associated with your account. + type: string + callId: + description: "Unique identifier for this Call, generated by FreeClimb" + type: string + from: + description: Phone number of the party that initiated the Call (in E.164 + format). + type: string + to: + description: Phone number provisioned to the customer and to which this + Call is directed (in E.164 format). + type: string + recordingId: + 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 + type: string + recordingUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + recordingSize: + description: The size of the recording in bytes. + type: integer + recordingFormat: + description: The media type of the recording. + nullable: true + type: string + recordingDurationMs: + description: The duration of the recorded audio in milliseconds. + type: integer + termReason: + $ref: '#/components/schemas/TranscribeTermReason' + recordTermReason: + $ref: '#/components/schemas/RecordUtteranceTermReason' + digit: + description: "If recordTermReason is digit, this will be the digit that\ + \ was pressed. Otherwise it will be null." + nullable: true + type: string + privacyForLogging: + 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. + type: boolean + privacyForRecording: + 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. + type: boolean + bargeInReason: + $ref: '#/components/schemas/BargeInReason' + bargedInPromptNo: + type: integer + bargedInPromptMs: + description: duration in ms bargedInPromptNo prompt was executing until + barge-in occurred. + type: integer + bargedInPromptLoopNo: + type: integer + bargeInTimeMs: + description: epoch time in ms + type: integer + transcript: + 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 + type: string + transcribeReason: + $ref: '#/components/schemas/TranscribeReason' + transcriptionDurationMs: + description: The duration of the audio being transcribed in milliseconds + type: integer + type: object + x-webhook: transcribe + AddToConference: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + allowCallControl: + description: "If `true`, Call control will be enabled for this Participant's\ + \ Call leg." + type: boolean + callControlSequence: + description: "Defines a sequence of digits that, when entered by this\ + \ caller, invokes the `callControlUrl`. Only digits plus '*', and '#'\ + \ may be used." + type: string + callControlUrl: + description: URL to be invoked when this Participant enters the digit + sequence defined in the `callControlSequence` attribute. + format: uri + type: string + x-is-uri: true + x-is-url: true + conferenceId: + description: ID of the Conference to which to add the Participant (Call + leg). Conference must exist or an error will result. + type: string + leaveConferenceUrl: + description: 'URL to be invoked when the Participant leaves the Conference. ' + format: uri + type: string + x-is-uri: true + x-is-url: true + listen: + description: "If `true`, the Participant joins the Conference with listen\ + \ privileges. This may be modified later via the REST API or `SetListen`\ + \ PerCL command." + type: boolean + 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 + x-is-uri: true + x-is-url: true + startConfOnEnter: + 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. + type: boolean + talk: + description: "If `true`, the Participant joins the Conference with talk\ + \ privileges. This may be modified later via the REST API or `SetTalk`\ + \ PerCL command. " + type: boolean + dtmfPassThrough: + description: "If `true`, the Participant joins the Conference with dtmfPassThrough\ + \ privileges. This may be modified later via the REST API or `SetDTMFPassThrough`\ + \ PerCL command. " + type: boolean + required: + - conferenceId + type: object + 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`. + required: + - conferenceId + x-percl-command: AddToConference + CreateConference: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - 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. " + format: uri + type: string + x-is-uri: true + x-is-url: true + alias: + description: 'Descriptive name for the Conference. ' + type: boolean + playBeep: + $ref: '#/components/schemas/PlayBeep' + record: + 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." + type: boolean + 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 + x-is-uri: true + x-is-url: true + 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 + x-is-uri: true + x-is-url: true + required: + - actionUrl + type: object + 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: CreateConference + Dequeue: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - type: object + 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: Dequeue + x-no-properties: true + Enqueue: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + 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." + format: uri + type: string + x-is-uri: true + x-is-url: true + 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. + format: uri + type: string + x-is-uri: true + x-is-url: true + 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." + type: string + 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." + format: uri + type: string + x-is-uri: true + x-is-url: true + required: + - actionUrl + - queueId + - waitUrl + type: object + 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." + required: + - actionUrl + - queueId + - waitUrl + x-percl-command: Enqueue + GetDigits: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + 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." + format: uri + type: string + x-is-uri: true + x-is-url: true + 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." + type: integer + finishOnKey: + 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`." + type: string + flushBuffer: + 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." + type: boolean + initialTimeoutMs: + 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. + type: integer + maxDigits: + 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`." + type: integer + minDigits: + 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." + type: integer + 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." + items: + $ref: '#/components/schemas/PerclCommand' + type: array + x-is-list: true + privacyMode: + description: Parameter `privacyMode` will not log the `text` as required + by PCI compliance. + type: boolean + required: + - actionUrl + type: object + 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: GetDigits + GetSpeech: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + 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." + format: uri + type: string + x-is-uri: true + x-is-url: true + grammarType: + $ref: '#/components/schemas/GrammarType' + grammarFile: + description: "The grammar file to use for speech recognition. If grammarType\ + \ is set to URL, this attribute is specified as a download URL." + type: string + grammarRule: + 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`. + type: string + playBeep: + description: Indicates whether a beep should be played just before speech + recognition is initiated so that the speaker can start to speak. + type: boolean + prompts: + 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." + items: + $ref: '#/components/schemas/PerclCommand' + type: array + 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." + type: integer + recognitionTimeoutMs: + description: "When playback of prompts ends and there is no match for\ + \ `recognitionTimeoutMs` milliseconds, the recognizer will terminate\ + \ the recognition operation." + type: integer + confidenceThreshold: + 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." + type: number + sensitivityLevel: + 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 " + type: number + speechCompleteTimeoutMs: + 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. + type: integer + speechIncompleteTimeoutMs: + 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. + type: integer + privacyMode: + description: Parameter privacyMode will not log the `text` as required + by PCI compliance. + type: boolean + required: + - actionUrl + - grammarFile + type: object + 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: GetSpeech + Hangup: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + reason: + 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." + type: string + type: object + 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: Hangup + OutDial: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + actionUrl: + description: 'URL to which FreeClimb sends an HTTP POST request. ' + format: uri + type: string + x-is-uri: true + x-is-url: true + callConnectUrl: + description: URL to which FreeClimb makes an HTTP POST request informing + the result of the OutDial. + format: uri + type: string + x-is-uri: true + x-is-url: true + 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." + type: string + destination: + description: 'E.164 representation of the phone number to Call. ' + type: string + ifMachine: + $ref: '#/components/schemas/IfMachine' + 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 + x-is-uri: true + x-is-url: true + sendDigits: + description: DTMF tones to play to the outdialed Call. This is typically + used to dial a number and then dial an extension. + type: string + 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 + x-is-uri: true + x-is-url: true + timeout: + 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`." + type: integer + privacyMode: + description: Parameter `privacyMode` will not log the `text` as required + by PCI compliance. + type: boolean + required: + - actionUrl + - callConnectUrl + - callingNumber + - destination + type: object + description: The OutDial command is used to call a phone number + x-percl-command: OutDial + Park: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + 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." + format: uri + type: string + x-is-uri: true + x-is-url: true + 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." + format: uri + type: string + x-is-uri: true + x-is-url: true + notificationUrl: + description: URL to be invoked when the Call is parked. The request to + the URL contains the standard request parameters. + format: uri + type: string + x-is-uri: true + x-is-url: true + required: + - actionUrl + - waitUrl + type: object + 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: Park + Pause: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + length: + description: Length in milliseconds. FreeClimb will wait silently before + continuing on. + type: integer + required: + - length + type: object + 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: Pause + Play: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + file: + 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. ' + type: string + loop: + description: Number of times the audio file is played. Specifying '0' + causes the Play action to loop until the Call is hung up. + type: integer + privacyMode: + description: Parameter `privacyMode` will not log the `text` as required + by PCI compliance. + type: boolean + required: + - file + type: object + 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: Play + PlayEarlyMedia: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + file: + 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." + type: string + required: + - file + type: object + 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: PlayEarlyMedia + RecordUtterance: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + 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. + format: uri + type: string + x-is-uri: true + x-is-url: true + silenceTimeoutMs: + description: Interval of silence that should elapse before ending the + recording. + type: integer + finishOnKey: + description: "Key that triggers the end of the recording. any digit, '#',\ + \ or '*'" + type: string + maxLengthSec: + description: Maximum length for the command execution in seconds. + type: integer + playBeep: + description: "Indicates whether to play a beep sound before the start\ + \ of the recording. If set to `false`, no beep is played." + type: boolean + autoStart: + 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." + type: boolean + privacyMode: + description: Parameter `privacyMode` will not log the `text` as required + by PCI compliance. + type: boolean + required: + - actionUrl + type: object + 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: RecordUtterance + Redirect: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + 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." + format: uri + type: string + x-is-uri: true + x-is-url: true + required: + - actionUrl + type: object + 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: Redirect + Reject: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + reason: + 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." + type: string + type: object + 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: Reject + RemoveFromConference: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: {} + type: object + 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: RemoveFromConference + x-no-properties: true + Say: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + text: + 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." + type: string + language: + 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. + type: string + loop: + default: 1 + description: Number of times the text is said. Specifying '0' causes the + `Say` action to loop until the Call is hung up. + type: integer + privacyMode: + description: Parameter `privacyMode` will not log the `text` as required + by PCI compliance. + type: boolean + required: + - text + type: object + 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: Say + SendDigits: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + digits: + 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." + type: string + pauseMs: + description: Pause between digits in milliseconds. Valid values are 100-1000 + milliseconds and will be adjusted by FreeClimb to satisfy the constraint. + type: integer + privacyMode: + description: Parameter `privacyMode` will not log the `text` as required + by PCI compliance. + type: boolean + required: + - digits + type: object + 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: SendDigits + SetListen: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + listen: + description: Specifying `false` will silence the Conference for this Participant. + type: boolean + type: object + 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: SetListen + SetTalk: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + talk: + description: Specifying `false` mutes the Participant. + type: boolean + type: object + 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: SetTalk + SetDTMFPassThrough: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + dtmfPassThrough: + description: Specifying `false` mutes the Participant's dtmf audio. + type: boolean + type: object + 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: SetDTMFPassThrough + Sms: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: + to: + 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)." + type: string + from: + 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. + type: string + text: + description: Text contained in the message (maximum 160 characters). + type: string + 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." + format: uri + type: string + x-is-uri: true + x-is-url: true + required: + - from + - text + - to + type: object + 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: Sms + StartRecordCall: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - type: object + 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: StartRecordCall + x-no-properties: true + TerminateConference: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - properties: {} + type: object + 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: TerminateConference + x-no-properties: true + Unpark: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - type: object + 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: Unpark + x-no-properties: true + MutableResourceModel: + properties: + uri: + description: "The URI for this resource, relative to /apiserver." + type: string + dateCreated: + description: "The date that this resource was created (GMT) in RFC 1123\ + \ format (e.g., Mon, 15 Jun 2009 20:45:30 GMT)." + type: string + dateUpdated: + description: "The date that this resource was last updated (GMT) in RFC\ + \ 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT)." + type: string + revision: + description: Revision count for the resource. This count is set to 1 on + creation and is incremented every time it is updated. + type: integer + type: object + PaginationModel: + properties: + total: + description: Total amount of requested resource. + nullable: true + type: integer + start: + description: Resource index at start of current page + nullable: true + type: integer + end: + description: Resource index at end of current page + nullable: true + type: integer + page: + description: Current page + nullable: true + type: integer + numPages: + description: Total number of pages + nullable: true + type: integer + pageSize: + description: Number of items per page + nullable: true + type: integer + nextPageUri: + description: Uri to retrieve the next page of items + nullable: true + type: string + type: object + Capabilities: + description: Details for which features this number may be used. + example: + voice: true + sms: true + tenDLC: true + tollFree: true + shortCode: true + properties: + voice: + description: Indicates whether a number can be used for voice calls. Replaces + voiceEnabled. + nullable: true + type: boolean + sms: + description: Indicates whether a number can be used SMS messaging. Replaces + smsEnabled. + nullable: true + type: boolean + tollFree: + description: "Indicates that a number is toll-free and will make toll-free\ + \ calls, and when enabled, toll-free messages." + nullable: true + type: boolean + tenDLC: + description: "Indicates that a number, if sms is true, will be used for\ + \ 10DLC messaging" + nullable: true + type: boolean + shortCode: + description: Indicates that a number is a short code and can be used for + short code messaging + nullable: true + type: boolean + required: + - shortCode + - sms + - tenDLC + - tollFree + - voice + type: object + x-is-object: true + TFN: + description: TollFree Campaign details for this number + example: + campaignId: campaignId + properties: + campaignId: + description: alphanumeric identifier for the TollFree campaign associated + with this number + type: string + required: + - campaignId + type: object + x-is-object: true + AccountRequest: + example: + alias: alias + label: label + properties: + alias: + description: Description for this account. + type: string + label: + description: Group to which this account belongs. + type: string + type: object + AccountResult: + allOf: + - $ref: '#/components/schemas/MutableResourceModel' + - properties: + accountId: + description: String that uniquely identifies this account resource. + nullable: true + type: string + apiKey: + description: The API key assigned to this account. This key must be kept + a secret by the customer. + nullable: true + type: string + alias: + description: A description for this account. + nullable: true + type: string + label: + description: A string that identifies a category or group to which the + account belongs. + nullable: true + type: string + type: + $ref: '#/components/schemas/AccountType' + status: + $ref: '#/components/schemas/AccountStatus' + subresourceUris: + $ref: '#/components/schemas/AccountResult_allOf_subresourceUris' + type: object + example: + accountId: accountId + dateCreated: dateCreated + apiKey: apiKey + subresourceUris: null + alias: alias + label: label + type: trial + uri: uri + dateUpdated: dateUpdated + revision: 0 + status: closed + ApplicationResult: + allOf: + - $ref: '#/components/schemas/MutableResourceModel' + - properties: + accountId: + description: ID of the account that owns this phone number. + nullable: true + type: string + applicationId: + 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. + nullable: true + type: string + alias: + description: Description for this phone number. Typically the conventionally-formatted + version of the phone number. + nullable: true + type: string + voiceUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + voiceFallbackUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + callConnectUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + statusCallbackUrl: + description: A URL to which FreeClimb will make a POST request when the + Call ends to notify this app. + format: uri + nullable: true + type: string + x-is-uri: true + x-is-url: true + smsUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + smsFallbackUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + type: object + example: + smsUrl: https://openapi-generator.tech + statusCallbackUrl: https://openapi-generator.tech + uri: uri + callConnectUrl: https://openapi-generator.tech + dateUpdated: dateUpdated + revision: 0 + voiceUrl: https://openapi-generator.tech + accountId: accountId + dateCreated: dateCreated + smsFallbackUrl: https://openapi-generator.tech + alias: alias + voiceFallbackUrl: https://openapi-generator.tech + applicationId: applicationId + ApplicationRequest: + example: + voiceUrl: https://openapi-generator.tech + smsUrl: https://openapi-generator.tech + smsFallbackUrl: https://openapi-generator.tech + alias: alias + voiceFallbackUrl: https://openapi-generator.tech + statusCallbackUrl: https://openapi-generator.tech + callConnectUrl: https://openapi-generator.tech + properties: + alias: + description: "A human readable description of the application, with maximum\ + \ length 64 characters." + type: string + voiceUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + voiceFallbackUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + callConnectUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + statusCallbackUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + smsUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + smsFallbackUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + type: object + ApplicationList: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + applications: + items: + $ref: '#/components/schemas/ApplicationResult' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + nextPageUri: nextPageUri + start: 6 + pageSize: 2 + end: 1 + page: 5 + applications: + - smsUrl: https://openapi-generator.tech + statusCallbackUrl: https://openapi-generator.tech + uri: uri + callConnectUrl: https://openapi-generator.tech + dateUpdated: dateUpdated + revision: 0 + voiceUrl: https://openapi-generator.tech + accountId: accountId + dateCreated: dateCreated + smsFallbackUrl: https://openapi-generator.tech + alias: alias + voiceFallbackUrl: https://openapi-generator.tech + applicationId: applicationId + - smsUrl: https://openapi-generator.tech + statusCallbackUrl: https://openapi-generator.tech + uri: uri + callConnectUrl: https://openapi-generator.tech + dateUpdated: dateUpdated + revision: 0 + voiceUrl: https://openapi-generator.tech + accountId: accountId + dateCreated: dateCreated + smsFallbackUrl: https://openapi-generator.tech + alias: alias + voiceFallbackUrl: https://openapi-generator.tech + applicationId: applicationId + x-implements: Pagination + AvailableNumber: + example: + country: country + capabilities: + voice: true + sms: true + tenDLC: true + tollFree: true + shortCode: true + phoneNumber: phoneNumber + campaignId: campaignId + smsEnabled: true + region: region + voiceEnabled: true + properties: + capabilities: + $ref: '#/components/schemas/Capabilities' + campaignId: + description: The campaign ID generated by the campaign registry + nullable: true + type: string + phoneNumber: + description: "The phone number, in E.164 format (+ country code and phone\ + \ number: +18003608245)." + nullable: true + type: string + voiceEnabled: + deprecated: true + description: Typically set to true for all numbers. + nullable: true + type: boolean + smsEnabled: + deprecated: true + description: Indicates whether the phone number can send and receive SMS + messages. + nullable: true + type: boolean + region: + description: The state or province of this phone number. + nullable: true + type: string + country: + description: The country of this phone number. + nullable: true + type: string + type: object + AvailableNumberList: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + availablePhoneNumbers: + items: + $ref: '#/components/schemas/AvailableNumber' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + nextPageUri: nextPageUri + availablePhoneNumbers: + - country: country + capabilities: + voice: true + sms: true + tenDLC: true + tollFree: true + shortCode: true + phoneNumber: phoneNumber + campaignId: campaignId + smsEnabled: true + region: region + voiceEnabled: true + - country: country + capabilities: + voice: true + sms: true + tenDLC: true + tollFree: true + shortCode: true + phoneNumber: phoneNumber + campaignId: campaignId + smsEnabled: true + region: region + voiceEnabled: true + start: 6 + pageSize: 2 + end: 1 + page: 5 + x-implements: Pagination + IncomingNumberResult: + allOf: + - $ref: '#/components/schemas/MutableResourceModel' + - properties: + capabilities: + $ref: '#/components/schemas/Capabilities' + campaignId: + description: The campaign ID generated by the campaign registry + nullable: true + type: string + phoneNumberId: + description: String that uniquely identifies this phone number resource. + nullable: true + type: string + accountId: + description: ID of the account that owns this phone number. + nullable: true + type: string + applicationId: + 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. + nullable: true + type: string + phoneNumber: + description: Phone number in E.164 format. + nullable: true + type: string + alias: + description: Description for this phone number. Typically the conventionally-formatted + version of the phone number. + nullable: true + type: string + region: + description: State or province of this phone number. + nullable: true + type: string + country: + description: Country of this phone number. + nullable: true + type: string + voiceEnabled: + deprecated: true + description: Indicates whether the phone number can handle Calls. Typically + set to true for all numbers. + nullable: true + type: boolean + smsEnabled: + deprecated: true + description: Indication of whether the phone number can handle sending + and receiving SMS messages. Typically set to true for all numbers. + nullable: true + type: boolean + offnet: + 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. + nullable: true + type: boolean + tfn: + $ref: '#/components/schemas/TFN' + type: object + example: + country: country + capabilities: + voice: true + sms: true + tenDLC: true + tollFree: true + shortCode: true + campaignId: campaignId + uri: uri + phoneNumberId: phoneNumberId + dateUpdated: dateUpdated + revision: 0 + voiceEnabled: true + accountId: accountId + dateCreated: dateCreated + phoneNumber: phoneNumber + smsEnabled: true + alias: alias + offnet: true + applicationId: applicationId + region: region + tfn: + campaignId: campaignId + IncomingNumberRequest: + example: + campaignId: campaignId + alias: alias + applicationId: applicationId + properties: + applicationId: + description: ID of the Application that should handle calls to this number. + type: string + alias: + description: Description for this phone number. + type: string + campaignId: + description: The campaign ID generated by the campaign registry + nullable: true + type: string + type: object + IncomingNumberList: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + incomingPhoneNumbers: + items: + $ref: '#/components/schemas/IncomingNumberResult' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + nextPageUri: nextPageUri + incomingPhoneNumbers: + - country: country + capabilities: + voice: true + sms: true + tenDLC: true + tollFree: true + shortCode: true + campaignId: campaignId + uri: uri + phoneNumberId: phoneNumberId + dateUpdated: dateUpdated + revision: 0 + voiceEnabled: true + accountId: accountId + dateCreated: dateCreated + phoneNumber: phoneNumber + smsEnabled: true + alias: alias + offnet: true + applicationId: applicationId + region: region + tfn: + campaignId: campaignId + - country: country + capabilities: + voice: true + sms: true + tenDLC: true + tollFree: true + shortCode: true + campaignId: campaignId + uri: uri + phoneNumberId: phoneNumberId + dateUpdated: dateUpdated + revision: 0 + voiceEnabled: true + accountId: accountId + dateCreated: dateCreated + phoneNumber: phoneNumber + smsEnabled: true + alias: alias + offnet: true + applicationId: applicationId + region: region + tfn: + campaignId: campaignId + start: 6 + pageSize: 2 + end: 1 + page: 5 + x-implements: Pagination + BuyIncomingNumberRequest: + example: + phoneNumber: phoneNumber + alias: alias + applicationId: applicationId + properties: + phoneNumber: + description: Phone number to purchase in E.164 format (as returned in the + list of Available Phone Numbers). + type: string + alias: + description: Description for this new incoming phone number (max 64 characters). + type: string + applicationId: + description: ID of the application that should handle phone calls to the + number. + type: string + required: + - phoneNumber + type: object + CallResult: + allOf: + - $ref: '#/components/schemas/MutableResourceModel' + - properties: + callId: + description: String that uniquely identifies this Call resource. + nullable: true + type: string + parentCallId: + description: ID of the Call that created this leg (child Call). + nullable: true + type: string + accountId: + description: ID of the account that owns this Call. + nullable: true + type: string + from: + description: Phone number that initiated this Call. + nullable: true + type: string + to: + description: Phone number that received this Call. + nullable: true + type: string + phoneNumberId: + 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)." + nullable: true + type: string + callStatus: + $ref: '#/components/schemas/CallStatus' + startTime: + 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." + nullable: true + type: string + connectTime: + 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." + nullable: true + type: string + endTime: + 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." + nullable: true + type: string + duration: + 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." + nullable: true + type: integer + connectDuration: + 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." + nullable: true + type: integer + direction: + $ref: '#/components/schemas/CallDirection' + answeredBy: + $ref: '#/components/schemas/AnsweredBy' + subresourceUris: + $ref: '#/components/schemas/CallResult_allOf_subresourceUris' + applicationId: + description: ApplicationId associated with the Call. + nullable: true + type: string + type: object + example: + callId: callId + answeredBy: human + parentCallId: parentCallId + uri: uri + phoneNumberId: phoneNumberId + dateUpdated: dateUpdated + revision: 0 + duration: 6 + accountId: accountId + dateCreated: dateCreated + connectTime: connectTime + connectDuration: 1 + callStatus: queued + subresourceUris: null + from: from + startTime: startTime + to: to + endTime: endTime + applicationId: applicationId + direction: inbound + UpdateCallRequest: + example: + status: canceled + properties: + status: + $ref: '#/components/schemas/UpdateCallRequestStatus' + required: + - status + type: object + MakeCallRequest: + example: + sendDigits: sendDigits + ifMachineUrl: https://openapi-generator.tech + privacyMode: true + parentCallId: parentCallId + ifMachine: ifMachine + from: from + to: to + applicationId: applicationId + timeout: 0 + callConnectUrl: https://openapi-generator.tech + properties: + from: + 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." + type: string + to: + description: Phone number to place the Call to. + type: string + applicationId: + 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." + type: string + sendDigits: + 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." + type: string + ifMachine: + description: Specifies how FreeClimb should handle this Call if an answering + machine answers it. + type: string + ifMachineUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + timeout: + 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. + format: int32 + type: integer + parentCallId: + 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." + type: string + privacyMode: + description: Activate privacy mode in order to obscure log data that can + potentially expose private information. + type: boolean + callConnectUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + required: + - from + - to + type: object + CallList: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + calls: + items: + $ref: '#/components/schemas/CallResult' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + nextPageUri: nextPageUri + calls: + - callId: callId + answeredBy: human + parentCallId: parentCallId + uri: uri + phoneNumberId: phoneNumberId + dateUpdated: dateUpdated + revision: 0 + duration: 6 + accountId: accountId + dateCreated: dateCreated + connectTime: connectTime + connectDuration: 1 + callStatus: queued + subresourceUris: null + from: from + startTime: startTime + to: to + endTime: endTime + applicationId: applicationId + direction: inbound + - callId: callId + answeredBy: human + parentCallId: parentCallId + uri: uri + phoneNumberId: phoneNumberId + dateUpdated: dateUpdated + revision: 0 + duration: 6 + accountId: accountId + dateCreated: dateCreated + connectTime: connectTime + connectDuration: 1 + callStatus: queued + subresourceUris: null + from: from + startTime: startTime + to: to + endTime: endTime + applicationId: applicationId + direction: inbound + start: 6 + pageSize: 2 + end: 1 + page: 5 + x-implements: Pagination + RecordingResult: + allOf: + - $ref: '#/components/schemas/MutableResourceModel' + - properties: + recordingId: + description: String that uniquely identifies this recording resource. + nullable: true + type: string + accountId: + description: ID of the account that created this recording. + nullable: true + type: string + callId: + description: "ID of the Call that was recorded. If a Conference was recorded,\ + \ this value is empty and the conferenceId property is populated." + nullable: true + type: string + durationSec: + description: Length of the recording in seconds. + nullable: true + type: integer + conferenceId: + description: "ID of the Conference that was recorded. If a Call was recorded,\ + \ this value is empty and the callId property is populated." + nullable: true + type: string + type: object + example: + callId: callId + accountId: accountId + dateCreated: dateCreated + conferenceId: conferenceId + recordingId: recordingId + durationSec: 9 + uri: uri + dateUpdated: dateUpdated + revision: 7 + RecordingList: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + recordings: + items: + $ref: '#/components/schemas/RecordingResult' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + nextPageUri: nextPageUri + recordings: + - callId: callId + accountId: accountId + dateCreated: dateCreated + conferenceId: conferenceId + recordingId: recordingId + durationSec: 9 + uri: uri + dateUpdated: dateUpdated + revision: 7 + - callId: callId + accountId: accountId + dateCreated: dateCreated + conferenceId: conferenceId + recordingId: recordingId + durationSec: 9 + uri: uri + dateUpdated: dateUpdated + revision: 7 + start: 6 + pageSize: 2 + end: 1 + page: 5 + x-implements: Pagination + LogResult: + example: + callId: callId + accountId: accountId + metadata: "{}" + level: info + requestId: requestId + message: message + timestamp: 7 + properties: + timestamp: + description: Time that the log was generated. The time is represented as + microseconds since the Unix Epoch. + nullable: true + type: integer + level: + $ref: '#/components/schemas/LogLevel' + requestId: + description: ID of the request associated with the log. The requestId is + propagated across all logs generated by FreeClimb when processing a request. + nullable: true + type: string + accountId: + description: ID of the account that this log was generated under. + nullable: true + type: string + callId: + 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. + nullable: true + type: string + message: + description: A simple string describing the event being logged. + nullable: true + type: string + metadata: + description: JSON document containing metadata about the event. Some log + messages may include request and response header content in this field. + nullable: true + type: object + type: object + LogList: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + logs: + items: + $ref: '#/components/schemas/LogResult' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + nextPageUri: nextPageUri + start: 6 + pageSize: 2 + end: 1 + page: 5 + logs: + - callId: callId + accountId: accountId + metadata: "{}" + level: info + requestId: requestId + message: message + timestamp: 7 + - callId: callId + accountId: accountId + metadata: "{}" + level: info + requestId: requestId + message: message + timestamp: 7 + x-implements: Pagination + ConferenceResult: + allOf: + - $ref: '#/components/schemas/MutableResourceModel' + - properties: + conferenceId: + description: A string that uniquely identifies this Conference resource. + nullable: true + type: string + accountId: + description: ID of the account that created this Conference. + nullable: true + type: string + alias: + description: A description for this Conference. + nullable: true + type: string + playBeep: + $ref: '#/components/schemas/PlayBeep' + record: + description: Flag indicating whether recording is enabled for this Conference. + nullable: true + type: boolean + status: + $ref: '#/components/schemas/ConferenceStatus' + waitUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + actionUrl: + description: URL invoked once the Conference is successfully created. + format: uri + nullable: true + type: string + x-is-uri: true + x-is-url: true + statusCallbackUrl: + description: URL to inform that the Conference status has changed. + format: uri + nullable: true + type: string + x-is-uri: true + x-is-url: true + subresourceUris: + $ref: '#/components/schemas/ConferenceResult_allOf_subresourceUris' + type: object + example: + actionUrl: https://openapi-generator.tech + statusCallbackUrl: https://openapi-generator.tech + uri: uri + dateUpdated: dateUpdated + revision: 7 + accountId: accountId + playBeep: always + dateCreated: dateCreated + waitUrl: https://openapi-generator.tech + conferenceId: conferenceId + record: true + subresourceUris: null + alias: alias + status: empty + MessagesList: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + messages: + description: Array of messages + items: + $ref: '#/components/schemas/MessageResult' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + nextPageUri: nextPageUri + start: 6 + pageSize: 2 + messages: + - notificationUrl: https://openapi-generator.tech + campaignId: campaignId + messageId: messageId + uri: uri + segmentCount: 9.301444243932576 + dateUpdated: dateUpdated + revision: 7 + accountId: accountId + dateCreated: dateCreated + brandId: brandId + from: from + to: to + text: text + mediaUrls: + - https://openapi-generator.tech + - https://openapi-generator.tech + status: new + direction: direction + - notificationUrl: https://openapi-generator.tech + campaignId: campaignId + messageId: messageId + uri: uri + segmentCount: 9.301444243932576 + dateUpdated: dateUpdated + revision: 7 + accountId: accountId + dateCreated: dateCreated + brandId: brandId + from: from + to: to + text: text + mediaUrls: + - https://openapi-generator.tech + - https://openapi-generator.tech + status: new + direction: direction + end: 1 + page: 5 + x-implements: Pagination + MessageRequest: + allOf: + - $ref: '#/components/schemas/MutableResourceModel' + - properties: + from: + description: Phone number to use as the sender. This must be an incoming + phone number that you have purchased from FreeClimb. + type: string + to: + description: Phone number to receive the message. Must be within FreeClimb's + service area. + type: string + text: + description: "Text contained in the message (maximum 160 characters).\ + \ **Note:** For text, only ASCII characters are supported." + type: string + notificationUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + mediaUrls: + 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. + items: + format: uri + type: string + nullable: true + type: array + x-is-list: true + required: + - from + - text + - to + type: object + example: + notificationUrl: https://openapi-generator.tech + dateCreated: dateCreated + from: from + to: to + text: text + uri: uri + mediaUrls: + - https://openapi-generator.tech + - https://openapi-generator.tech + dateUpdated: dateUpdated + revision: 0 + CompletionRequest: + example: + query: query + properties: + query: + description: Question to ask the Knowledge Base + maxLength: 2000 + type: string + required: + - query + type: object + CompletionResult: + example: + response: response + status: success + properties: + response: + description: The generative response from the KnowledgeBase + type: string + status: + $ref: '#/components/schemas/CompletionResultStatus' + required: + - response + - status + type: object + ConferenceList: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + conferences: + items: + $ref: '#/components/schemas/ConferenceResult' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + nextPageUri: nextPageUri + start: 6 + pageSize: 2 + end: 1 + page: 5 + conferences: + - actionUrl: https://openapi-generator.tech + statusCallbackUrl: https://openapi-generator.tech + uri: uri + dateUpdated: dateUpdated + revision: 7 + accountId: accountId + playBeep: always + dateCreated: dateCreated + waitUrl: https://openapi-generator.tech + conferenceId: conferenceId + record: true + subresourceUris: null + alias: alias + status: empty + - actionUrl: https://openapi-generator.tech + statusCallbackUrl: https://openapi-generator.tech + uri: uri + dateUpdated: dateUpdated + revision: 7 + accountId: accountId + playBeep: always + dateCreated: dateCreated + waitUrl: https://openapi-generator.tech + conferenceId: conferenceId + record: true + subresourceUris: null + alias: alias + status: empty + x-implements: Pagination + MessageResult: + allOf: + - $ref: '#/components/schemas/MutableResourceModel' + - properties: + accountId: + description: String that uniquely identifies this account resource. + nullable: true + type: string + messageId: + description: String that uniquely identifies this message resource + nullable: true + type: string + status: + $ref: '#/components/schemas/MessageStatus' + from: + description: Phone number in E.164 format that sent the message. + nullable: true + type: string + to: + description: Phone number in E.164 format that received the message. + nullable: true + type: string + text: + description: Message contents + nullable: true + type: string + direction: + description: Noting whether the message was inbound or outbound + nullable: true + type: string + notificationUrl: + description: URL invoked when message sent + format: uri + nullable: true + type: string + x-is-uri: true + x-is-url: true + brandId: + description: The unique identifier for the brand associated with the message + nullable: true + type: string + campaignId: + description: The unique identifier for the campaign associated with the + message + nullable: true + type: string + segmentCount: + description: The number of segments into which the message was split + nullable: true + type: number + mediaUrls: + description: an array of HTTP URLs which were attached this this message + items: + format: uri + type: string + nullable: true + type: array + x-is-list: true + type: object + example: + notificationUrl: https://openapi-generator.tech + campaignId: campaignId + messageId: messageId + uri: uri + segmentCount: 9.301444243932576 + dateUpdated: dateUpdated + revision: 7 + accountId: accountId + dateCreated: dateCreated + brandId: brandId + from: from + to: to + text: text + mediaUrls: + - https://openapi-generator.tech + - https://openapi-generator.tech + status: new + direction: direction + CreateConferenceRequest: + example: + playBeep: always + waitUrl: https://openapi-generator.tech + record: true + alias: alias + statusCallbackUrl: https://openapi-generator.tech + properties: + alias: + description: A description for this Conference. Maximum 64 characters. + type: string + playBeep: + $ref: '#/components/schemas/PlayBeep' + record: + description: Setting to `true` records the entire Conference. + type: boolean + waitUrl: + 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 + type: string + x-is-uri: true + x-is-url: true + statusCallbackUrl: + description: "This URL is invoked when the status of the Conference changes.\ + \ For more information, see **statusCallbackUrl** (below)." + format: uri + type: string + x-is-uri: true + x-is-url: true + type: object + UpdateConferenceRequest: + example: + playBeep: always + alias: alias + status: empty + properties: + alias: + description: Description for this conference. Maximum 64 characters. + type: string + playBeep: + $ref: '#/components/schemas/PlayBeep' + status: + $ref: '#/components/schemas/UpdateConferenceRequestStatus' + type: object + ConferenceParticipantResult: + allOf: + - $ref: '#/components/schemas/MutableResourceModel' + - properties: + accountId: + description: ID of the account that created this participant. + nullable: true + type: string + conferenceId: + description: ID of the conference this participant is in. + nullable: true + type: string + callId: + description: ID of the Call associated with this Participant. + nullable: true + type: string + talk: + description: True if this Participant has talk privileges in the Conference. + False otherwise. + nullable: true + type: boolean + listen: + description: True if this Participant has listen privileges in the Conference. + False otherwise. + nullable: true + type: boolean + dtmfPassThrough: + description: True if this Participant had dtmfPassThrough privileges in + the Conference. False otherwise. + nullable: true + type: boolean + startConfOnEnter: + description: True if this Participant joining the Conference caused the + Conference to start (status = inProgress). False otherwise. + nullable: true + type: boolean + type: object + example: + callId: callId + accountId: accountId + dateCreated: dateCreated + startConfOnEnter: true + conferenceId: conferenceId + talk: true + uri: uri + listen: true + dtmfPassThrough: true + dateUpdated: dateUpdated + revision: 0 + UpdateConferenceParticipantRequest: + example: + talk: true + listen: true + dtmfPassThrough: true + properties: + talk: + description: (Optional) Default is `true`. Setting to `false` mutes the + Participant. FreeClimb returns an error and ignores any other value. + type: boolean + listen: + description: (Optional) Default is `true`. Setting to `false` silences the + Conference for this Participant. FreeClimb returns an error and ignores + any other value. + type: boolean + dtmfPassThrough: + description: (Optional) Default is `true`. Setting to `false` mutes dtmf + audio for this Participant. FreeClimb returns an error and ignores any + other value. + type: boolean + type: object + ConferenceParticipantList: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + participants: + items: + $ref: '#/components/schemas/ConferenceParticipantResult' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + nextPageUri: nextPageUri + start: 6 + pageSize: 2 + end: 1 + page: 5 + participants: + - callId: callId + accountId: accountId + dateCreated: dateCreated + startConfOnEnter: true + conferenceId: conferenceId + talk: true + uri: uri + listen: true + dtmfPassThrough: true + dateUpdated: dateUpdated + revision: 0 + - callId: callId + accountId: accountId + dateCreated: dateCreated + startConfOnEnter: true + conferenceId: conferenceId + talk: true + uri: uri + listen: true + dtmfPassThrough: true + dateUpdated: dateUpdated + revision: 0 + x-implements: Pagination + QueueResult: + allOf: + - $ref: '#/components/schemas/MutableResourceModel' + - properties: + accountId: + description: ID of the account that created this Queue. + nullable: true + type: string + queueId: + description: A string that uniquely identifies this Queue resource. + nullable: true + type: string + alias: + description: A description for this Queue. + nullable: true + type: string + maxSize: + description: The maximum number of Calls permitted in the Queue. Default + is 100. Maximum is 1000. + nullable: true + type: integer + currentSize: + description: Count of Calls currently in the Queue. + nullable: true + type: integer + averageQueueRemovalTime: + description: The average amount of time (in seconds) for a call to be + removed from the queue. + nullable: true + type: integer + subresourceUris: + $ref: '#/components/schemas/QueueResult_allOf_subresourceUris' + type: object + example: + accountId: accountId + queueId: queueId + dateCreated: dateCreated + averageQueueRemovalTime: 5 + subresourceUris: null + alias: alias + maxSize: 6 + uri: uri + dateUpdated: dateUpdated + revision: 0 + currentSize: 1 + QueueRequest: + example: + alias: alias + maxSize: 0 + properties: + alias: + description: Description for this Queue. Max length is 64 characters. + type: string + maxSize: + 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. + format: int32 + type: integer + type: object + QueueList: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + queues: + items: + $ref: '#/components/schemas/QueueResult' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + nextPageUri: nextPageUri + queues: + - accountId: accountId + queueId: queueId + dateCreated: dateCreated + averageQueueRemovalTime: 5 + subresourceUris: null + alias: alias + maxSize: 6 + uri: uri + dateUpdated: dateUpdated + revision: 0 + currentSize: 1 + - accountId: accountId + queueId: queueId + dateCreated: dateCreated + averageQueueRemovalTime: 5 + subresourceUris: null + alias: alias + maxSize: 6 + uri: uri + dateUpdated: dateUpdated + revision: 0 + currentSize: 1 + start: 6 + pageSize: 2 + end: 1 + page: 5 + x-implements: Pagination + QueueMember: + example: + callId: callId + position: 6 + uri: uri + waitTime: 0 + dateEnqueued: dateEnqueued + properties: + uri: + description: "URI for this Queue Member resource, relative to the API base\ + \ URL." + nullable: true + type: string + callId: + description: ID of the Call associated with this Queue Member. + nullable: true + type: string + waitTime: + description: Number of seconds the Member has been in the queue. + nullable: true + type: integer + position: + description: "Member's current position in the Queue, 1 indexed." + nullable: true + type: integer + dateEnqueued: + description: "Date that the Member was enqueued (GMT), given in RFC 1123\ + \ format (e.g., Mon, 15 Jun 2009 20:45:30 GMT)." + nullable: true + type: string + type: object + QueueMemberList: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + queueMembers: + items: + $ref: '#/components/schemas/QueueMember' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + nextPageUri: nextPageUri + queueMembers: + - callId: callId + position: 6 + uri: uri + waitTime: 0 + dateEnqueued: dateEnqueued + - callId: callId + position: 6 + uri: uri + waitTime: 0 + dateEnqueued: dateEnqueued + start: 6 + pageSize: 2 + end: 1 + page: 5 + x-implements: Pagination + FilterLogsRequest: + example: + pql: pql + properties: + pql: + description: The filter query for retrieving logs. See **Performance Query + Language** below. + type: string + required: + - pql + type: object + SMSTenDLCCampaignsListResult: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + campaigns: + items: + $ref: '#/components/schemas/SMSTenDLCCampaign' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + nextPageUri: nextPageUri + campaigns: + - campaignId: CX56XX4 + accountId: ACe39970fb7c31c747c67148900b4d9da60a41e532 + cspId: SX56XX4 + brandId: BX56XX4 + usecase: 2FA + description: mock campaign. + subUsecases: [] + resellerId: null + sample1: Your verification code from FreeClimb is 000000. It expires in + 10 minutes. + sample2: null + sample3: null + sample4: null + sample5: null + messageFlow: null + helpMessage: null + referenceId: null + status: EXPIRED + mock: true + autoRenewal: false + embeddedLink: false + embeddedPhone: false + affiliateMarketing: false + numberPool: false + ageGated: false + directLending: false + subscriberOptin: true + subscriberOptout: false + subscriberHelp: true + createDate: 2022-07-05T15:17:05Z + billedDate: 2022-07-05T00:00:00Z + nextRenewalOrExpirationDate: null + - campaignId: CX56XX4 + accountId: ACe39970fb7c31c747c67148900b4d9da60a41e532 + cspId: SX56XX4 + brandId: BX56XX4 + usecase: 2FA + description: mock campaign. + subUsecases: [] + resellerId: null + sample1: Your verification code from FreeClimb is 000000. It expires in + 10 minutes. + sample2: null + sample3: null + sample4: null + sample5: null + messageFlow: null + helpMessage: null + referenceId: null + status: EXPIRED + mock: true + autoRenewal: false + embeddedLink: false + embeddedPhone: false + affiliateMarketing: false + numberPool: false + ageGated: false + directLending: false + subscriberOptin: true + subscriberOptout: false + subscriberHelp: true + createDate: 2022-07-05T15:17:05Z + billedDate: 2022-07-05T00:00:00Z + nextRenewalOrExpirationDate: null + start: 6 + pageSize: 2 + end: 1 + page: 5 + x-implements: Pagination + SMSTenDLCCampaign: + example: + campaignId: CX56XX4 + accountId: ACe39970fb7c31c747c67148900b4d9da60a41e532 + cspId: SX56XX4 + brandId: BX56XX4 + usecase: 2FA + description: mock campaign. + subUsecases: [] + resellerId: null + sample1: Your verification code from FreeClimb is 000000. It expires in 10 + minutes. + sample2: null + sample3: null + sample4: null + sample5: null + messageFlow: null + helpMessage: null + referenceId: null + status: EXPIRED + mock: true + autoRenewal: false + embeddedLink: false + embeddedPhone: false + affiliateMarketing: false + numberPool: false + ageGated: false + directLending: false + subscriberOptin: true + subscriberOptout: false + subscriberHelp: true + createDate: 2022-07-05T15:17:05Z + billedDate: 2022-07-05T00:00:00Z + nextRenewalOrExpirationDate: null + properties: + accountId: + description: ID of the account that created this Queue. + nullable: true + type: string + campaignId: + description: Alphanumeric identifier assigned by the registry for a campaign. + This identifier is required by the NetNumber OSR SMS enabling process + of 10DLC. + type: string + cspId: + description: Alphanumeric identifier of the CSP associated with this campaign. + type: string + resellerId: + description: Alphanumeric identifier of the reseller that you want to associate + with this campaign. + maxLength: 8 + nullable: true + type: string + status: + $ref: '#/components/schemas/SMSTenDLCCampaignStatus' + createDate: + description: Unix timestamp when campaign was created. + format: date-time + type: string + x-is-date-time: true + autoRenewal: + description: Campaign subscription auto-renewal status. + type: boolean + billedDate: + description: Campaign recent billed date. + format: date-time + nullable: true + type: string + x-is-date-time: true + brandId: + description: Alphanumeric identifier of the brand associated with this campaign. + maxLength: 8 + type: string + usecase: + description: Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` + operation to retrieve usecases available for given brand. + maxLength: 20 + type: string + subUsecases: + 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: + description: Campaign sub-usecases. Must be of defined valid sub-usecase + types. Use `/registry/enum/usecase` operation to retrieve list of valid + sub-usecases + type: string + type: array + uniqueItems: true + x-is-set: true + description: + description: Summary description of this campaign. + maxLength: 4096 + type: string + embeddedLink: + default: false + description: Does message generated by the campaign include URL link in + SMS? + type: boolean + embeddedPhone: + default: false + description: Does message generated by the campaign include phone number + in SMS? + type: boolean + affiliateMarketing: + description: Does message content controlled by affiliate marketing other + than the brand? + type: boolean + numberPool: + default: false + description: Does campaign utilize pool of phone nubers? + type: boolean + ageGated: + description: Age gated content in campaign. + type: boolean + directLending: + type: boolean + subscriberOptin: + default: false + description: Does campaign require subscriber to opt-in before SMS is sent + to subscriber? + type: boolean + subscriberOptout: + default: false + description: Does campaign support subscriber opt-out keyword(s)? + type: boolean + subscriberHelp: + default: false + description: Does campaign responds to help keyword(s)? + type: boolean + sample1: + description: Message sample. Some campaign tiers require 1 or more message + samples. + maxLength: 1024 + type: string + sample2: + description: Message sample. Some campaign tiers require 2 or more message + samples. + maxLength: 1024 + nullable: true + type: string + sample3: + description: Message sample. Some campaign tiers require 3 or more message + samples. + maxLength: 1024 + nullable: true + type: string + sample4: + description: Message sample. Some campaign tiers require 4 or more message + samples. + maxLength: 1024 + nullable: true + type: string + sample5: + description: Message sample. Some campaign tiers require 5 or more message + samples. + maxLength: 1024 + nullable: true + type: string + messageFlow: + description: Message flow description. + maxLength: 2048 + nullable: true + type: string + helpMessage: + description: Help message of the campaign. + maxLength: 255 + nullable: true + type: string + optinKeywords: + description: Subscriber opt-in keywords. Multiple keywords are comma separated + without space. + maxLength: 255 + type: string + optoutKeywords: + description: Subscriber opt-out keywords. Multiple keywords are comma separated + without space. + maxLength: 255 + type: string + helpKeywords: + description: Subscriber help keywords. Multiple keywords are comma separated + without space. + maxLength: 255 + type: string + optinMessage: + description: Subscriber opt-in message. + maxLength: 255 + type: string + optoutMessage: + description: Subscriber opt-out message. + maxLength: 255 + type: string + referenceId: + 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." + maxLength: 50 + nullable: true + type: string + mock: + description: Campaign created from mock brand. Mocked campaign cannot be + shared with an upstream CNP. + type: boolean + nextRenewalOrExpirationDate: + description: When the campaign would be due for its next renew/bill date. + example: 2000-01-01 + format: date + nullable: true + type: string + x-is-date: true + required: + - brandId + - campaignId + - cspId + - description + - mock + - subUsecases + - usecase + type: object + SMSTenDLCPartnerCampaignsListResult: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + partnerCampaigns: + items: + $ref: '#/components/schemas/SMSTenDLCPartnerCampaign' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + nextPageUri: nextPageUri + start: 6 + pageSize: 2 + end: 1 + page: 5 + partnerCampaigns: + - campaignId: CX56XX4 + accountId: ACe39970fb7c31c747c67148900b4d9da60a41e532 + brandId: BX56XX4 + usecase: 2FA + description: mock campaign. + sample1: Your verification code from FreeClimb is 000000. It expires in + 10 minutes. + sample2: null + sample3: null + sample4: null + sample5: null + messageFlow: null + helpMessage: null + status: EXPIRED + embeddedLink: false + embeddedPhone: false + affiliateMarketing: false + numberPool: false + ageGated: false + directLending: false + subscriberOptin: true + subscriberOptout: false + subscriberHelp: true + createDate: 2022-07-05T15:17:05Z + optinKeywords: START + optoutKeywords: STOP + helpKeywords: HELP + optinMessage: "" + optoutMessage: "" + brand: + optionalAttributes: {} + brandId: BVCEBIJ + firstName: "" + lastName: "" + displayName: FreeClimb LLC(mock) + companyName: FreeClimb LLC + phone: "+18475722071" + email: bmabry@vailsys.com + website: https://www.freeclimb.com/ + evpVettingScore: 22 + - campaignId: CX56XX4 + accountId: ACe39970fb7c31c747c67148900b4d9da60a41e532 + brandId: BX56XX4 + usecase: 2FA + description: mock campaign. + sample1: Your verification code from FreeClimb is 000000. It expires in + 10 minutes. + sample2: null + sample3: null + sample4: null + sample5: null + messageFlow: null + helpMessage: null + status: EXPIRED + embeddedLink: false + embeddedPhone: false + affiliateMarketing: false + numberPool: false + ageGated: false + directLending: false + subscriberOptin: true + subscriberOptout: false + subscriberHelp: true + createDate: 2022-07-05T15:17:05Z + optinKeywords: START + optoutKeywords: STOP + helpKeywords: HELP + optinMessage: "" + optoutMessage: "" + brand: + optionalAttributes: {} + brandId: BVCEBIJ + firstName: "" + lastName: "" + displayName: FreeClimb LLC(mock) + companyName: FreeClimb LLC + phone: "+18475722071" + email: bmabry@vailsys.com + website: https://www.freeclimb.com/ + evpVettingScore: 22 + x-implements: Pagination + SMSTenDLCPartnerCampaign: + example: + campaignId: CX56XX4 + accountId: ACe39970fb7c31c747c67148900b4d9da60a41e532 + brandId: BX56XX4 + usecase: 2FA + description: mock campaign. + sample1: Your verification code from FreeClimb is 000000. It expires in 10 + minutes. + sample2: null + sample3: null + sample4: null + sample5: null + messageFlow: null + helpMessage: null + status: EXPIRED + embeddedLink: false + embeddedPhone: false + affiliateMarketing: false + numberPool: false + ageGated: false + directLending: false + subscriberOptin: true + subscriberOptout: false + subscriberHelp: true + createDate: 2022-07-05T15:17:05Z + optinKeywords: START + optoutKeywords: STOP + helpKeywords: HELP + optinMessage: "" + optoutMessage: "" + brand: + optionalAttributes: {} + brandId: BVCEBIJ + firstName: "" + lastName: "" + displayName: FreeClimb LLC(mock) + companyName: FreeClimb LLC + phone: "+18475722071" + email: bmabry@vailsys.com + website: https://www.freeclimb.com/ + evpVettingScore: 22 + properties: + accountId: + description: ID of the account that created this Queue. + nullable: true + type: string + campaignId: + description: Alphanumeric identifier assigned by the registry for a campaign. + This identifier is required by the NetNumber OSR SMS enabling process + of 10DLC. + type: string + status: + $ref: '#/components/schemas/SMSTenDLCPartnerCampaignStatus' + createDate: + description: Unix timestamp when campaign was created. + format: date-time + type: string + x-is-date-time: true + brandId: + description: Alphanumeric identifier of the brand associated with this campaign. + maxLength: 8 + type: string + usecase: + description: Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` + operation to retrieve usecases available for given brand. + maxLength: 20 + type: string + description: + description: Summary description of this campaign. + maxLength: 4096 + type: string + embeddedLink: + default: false + description: Does message generated by the campaign include URL link in + SMS? + type: boolean + embeddedPhone: + default: false + description: Does message generated by the campaign include phone number + in SMS? + type: boolean + affiliateMarketing: + description: Does message content controlled by affiliate marketing other + than the brand? + type: boolean + numberPool: + default: false + description: Does campaign utilize pool of phone nubers? + type: boolean + ageGated: + description: Age gated content in campaign. + type: boolean + directLending: + type: boolean + subscriberOptin: + default: false + description: Does campaign require subscriber to opt-in before SMS is sent + to subscriber? + type: boolean + subscriberOptout: + default: false + description: Does campaign support subscriber opt-out keyword(s)? + type: boolean + subscriberHelp: + default: false + description: Does campaign responds to help keyword(s)? + type: boolean + sample1: + description: Message sample. Some campaign tiers require 1 or more message + samples. + maxLength: 1024 + type: string + sample2: + description: Message sample. Some campaign tiers require 2 or more message + samples. + maxLength: 1024 + nullable: true + type: string + sample3: + description: Message sample. Some campaign tiers require 3 or more message + samples. + maxLength: 1024 + nullable: true + type: string + sample4: + description: Message sample. Some campaign tiers require 4 or more message + samples. + maxLength: 1024 + nullable: true + type: string + sample5: + description: Message sample. Some campaign tiers require 5 or more message + samples. + maxLength: 1024 + nullable: true + type: string + messageFlow: + description: Message flow description. + maxLength: 2048 + nullable: true + type: string + helpMessage: + description: Help message of the campaign. + maxLength: 255 + nullable: true + type: string + optinKeywords: + description: Subscriber opt-in keywords. Multiple keywords are comma separated + without space. + maxLength: 255 + type: string + optoutKeywords: + description: Subscriber opt-out keywords. Multiple keywords are comma separated + without space. + maxLength: 255 + type: string + helpKeywords: + description: Subscriber help keywords. Multiple keywords are comma separated + without space. + maxLength: 255 + type: string + optinMessage: + description: Subscriber opt-in message. + maxLength: 255 + type: string + optoutMessage: + description: Subscriber opt-out message. + maxLength: 255 + type: string + brand: + $ref: '#/components/schemas/SMSTenDLCPartnerCampaignBrand' + required: + - brandId + - campaignId + - description + - usecase + type: object + SMSTenDLCPartnerCampaignBrand: + properties: + accountId: + description: ID of the account that created this Queue. + nullable: true + type: string + brandId: + description: Unique identifier assigned to the brand by the registry. + readOnly: true + type: string + firstName: + description: 'First or given name. ' + example: John + maxLength: 100 + type: string + lastName: + description: Last or Surname. + example: Doe + maxLength: 100 + type: string + displayName: + description: Display or marketing name of the brand. + example: ABC Mobile + maxLength: 255 + type: string + companyName: + description: (Required for Non-profit/private/public) Legal company name. + example: ABC Inc. + maxLength: 255 + type: string + phone: + description: Valid phone number in e.164 international format. + example: "+12024567890" + maxLength: 20 + type: string + email: + description: Valid email address of brand support contact. + maxLength: 100 + type: string + website: + description: Brand website URL. + example: http://www.abcmobile.com + maxLength: 100 + type: string + optionalAttributes: + additionalProperties: true + description: Optional brand attributes. Please refer to GET /enum/optionalAttributeNames + for dictionary of optional attribute names. + type: object + x-is-map: true + x-is-hash: true + evpVettingScore: + description: External vetting score. + type: integer + required: + - email + - phone + type: object + x-is-object: true + SMSTenDLCBrandsListResult: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + brands: + items: + $ref: '#/components/schemas/SMSTenDLCBrand' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + brands: + - mock: true + optionalAttributes: {} + accountId: AC1234512345123451234512345123451234512345 + brandId: BVCEBIJ + cspId: SKGC6G0 + firstName: "" + lastName: "" + displayName: FreeClimb LLC(mock) + companyName: FreeClimb LLC + ein: "843793747" + einIssuingCountry: US + phone: "+18475722071" + street: 570 Lake Cook Rd Ste 400 + city: Deerfield + state: IL + postalCode: "60015" + country: US + email: bmabry@vailsys.com + stockSymbol: "" + stockExchange: NASDAQ + ipAddress: 127.0.0.1 + website: https://www.freeclimb.com/ + vertical: TECHNOLOGY + universalEin: US_843793747 + referenceId: ACdeadbeef + entityType: PRIVATE_PROFIT + brandRelationship: SMALL_ACCOUNT + identityStatus: VERIFIED + createDate: 2022-07-01T20:29:23Z + - mock: true + optionalAttributes: {} + accountId: AC1234512345123451234512345123451234512345 + brandId: BVCEBIJ + cspId: SKGC6G0 + firstName: "" + lastName: "" + displayName: FreeClimb LLC(mock) + companyName: FreeClimb LLC + ein: "843793747" + einIssuingCountry: US + phone: "+18475722071" + street: 570 Lake Cook Rd Ste 400 + city: Deerfield + state: IL + postalCode: "60015" + country: US + email: bmabry@vailsys.com + stockSymbol: "" + stockExchange: NASDAQ + ipAddress: 127.0.0.1 + website: https://www.freeclimb.com/ + vertical: TECHNOLOGY + universalEin: US_843793747 + referenceId: ACdeadbeef + entityType: PRIVATE_PROFIT + brandRelationship: SMALL_ACCOUNT + identityStatus: VERIFIED + createDate: 2022-07-01T20:29:23Z + nextPageUri: nextPageUri + start: 6 + pageSize: 2 + end: 1 + page: 5 + x-implements: Pagination + SMSTenDLCBrand: + description: A brand is a business identity behind the campaign. + example: + mock: true + optionalAttributes: {} + accountId: AC1234512345123451234512345123451234512345 + brandId: BVCEBIJ + cspId: SKGC6G0 + firstName: "" + lastName: "" + displayName: FreeClimb LLC(mock) + companyName: FreeClimb LLC + ein: "843793747" + einIssuingCountry: US + phone: "+18475722071" + street: 570 Lake Cook Rd Ste 400 + city: Deerfield + state: IL + postalCode: "60015" + country: US + email: bmabry@vailsys.com + stockSymbol: "" + stockExchange: NASDAQ + ipAddress: 127.0.0.1 + website: https://www.freeclimb.com/ + vertical: TECHNOLOGY + universalEin: US_843793747 + referenceId: ACdeadbeef + entityType: PRIVATE_PROFIT + brandRelationship: SMALL_ACCOUNT + identityStatus: VERIFIED + createDate: 2022-07-01T20:29:23Z + properties: + accountId: + description: ID of the account that created this Queue. + nullable: true + type: string + entityType: + $ref: '#/components/schemas/SMSTenDLCBrandEntityType' + cspId: + description: Unique identifier assigned to the csp by the registry. + readOnly: true + type: string + brandId: + description: Unique identifier assigned to the brand by the registry. + readOnly: true + type: string + firstName: + description: 'First or given name. ' + example: John + maxLength: 100 + type: string + lastName: + description: Last or Surname. + example: Doe + maxLength: 100 + type: string + displayName: + description: Display or marketing name of the brand. + example: ABC Mobile + maxLength: 255 + type: string + companyName: + description: (Required for Non-profit/private/public) Legal company name. + example: ABC Inc. + maxLength: 255 + type: string + ein: + description: (Required for Non-profit) Government assigned corporate tax + ID. EIN is 9-digits in U.S. + example: "111111111" + maxLength: 21 + type: string + einIssuingCountry: + description: "ISO2 2 characters country code. Example: US - United States" + example: US + maxLength: 2 + type: string + phone: + description: Valid phone number in e.164 international format. + example: "+12024567890" + maxLength: 20 + type: string + street: + description: Street number and name. + example: 123 6th Ave + maxLength: 100 + type: string + city: + description: City name + example: New York + maxLength: 100 + type: string + state: + description: State. Must be 2 letters code for United States. + example: NY + maxLength: 20 + type: string + postalCode: + description: Postal codes. Use 5 digit zipcode for United States + example: "10001" + maxLength: 10 + type: string + country: + description: "ISO2 2 characters country code. Example: US - United States" + example: US + maxLength: 2 + type: string + email: + description: Valid email address of brand support contact. + maxLength: 100 + type: string + stockSymbol: + description: (Required for public company) stock symbol. + example: ABC + maxLength: 10 + type: string + stockExchange: + $ref: '#/components/schemas/SMSTenDLCBrandStockExchange' + ipAddress: + description: IP address of the browser requesting to create brand identity. + maxLength: 50 + type: string + website: + description: Brand website URL. + example: http://www.abcmobile.com + maxLength: 100 + type: string + brandRelationship: + $ref: '#/components/schemas/SMSTenDLCBrandRelationship' + vertical: + description: Vertical or industry segment of the brand. + maxLength: 50 + type: string + altBusinessId: + description: "Alternate business identifier such as DUNS, LEI, or GIIN" + maxLength: 50 + type: string + altBusinessIdType: + $ref: '#/components/schemas/SMSTenDLCBrandAltBusinessIdType' + universalEin: + description: "Universal EIN of Brand, Read Only." + readOnly: true + type: string + referenceId: + 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." + maxLength: 50 + type: string + optionalAttributes: + additionalProperties: true + description: Optional brand attributes. Please refer to GET /enum/optionalAttributeNames + for dictionary of optional attribute names. + type: object + x-is-map: true + x-is-hash: true + mock: + description: Test brand. + type: boolean + identityStatus: + $ref: '#/components/schemas/SMSTenDLCBrandIdentityStatus' + createDate: + description: Unix timestamp when brand was created. + format: date-time + type: string + x-is-date-time: true + required: + - brandRelationship + - country + - displayName + - email + - entityType + - identityStatus + - mock + - phone + - vertical + type: object + SMSTollFreeCampaignsListResult: + allOf: + - $ref: '#/components/schemas/PaginationModel' + - properties: + brands: + items: + $ref: '#/components/schemas/SMSTollFreeCampaign' + nullable: true + type: array + x-is-list: true + type: object + example: + numPages: 5 + total: 0 + brands: + - accountId: accountId + useCase: useCase + registrationStatus: UNREGISTERED + dateCreated: dateCreated + campaignId: campaignId + dateUpdated: dateUpdated + revision: 7 + - accountId: accountId + useCase: useCase + registrationStatus: UNREGISTERED + dateCreated: dateCreated + campaignId: campaignId + dateUpdated: dateUpdated + revision: 7 + nextPageUri: nextPageUri + start: 6 + pageSize: 2 + end: 1 + page: 5 + x-implements: Pagination + SMSTollFreeCampaign: + example: + accountId: accountId + useCase: useCase + registrationStatus: UNREGISTERED + dateCreated: dateCreated + campaignId: campaignId + dateUpdated: dateUpdated + revision: 7 + properties: + accountId: + description: ID of the account that created this toll-free campaign + nullable: true + type: string + campaignId: + description: Alphanumeric identifier used by the platform to identify this + toll-free campaign + type: string + useCase: + type: string + registrationStatus: + $ref: '#/components/schemas/SMSTollFreeCampaignRegistrationStatus' + dateCreated: + type: string + dateUpdated: + type: string + revision: + type: integer + required: + - accountId + - campaignId + - dateCreated + - dateUpdated + - registrationStatus + - revision + - useCase + type: object + TranscribeUtteranceRecord: + properties: + saveRecording: + default: false + type: boolean + maxLengthSec: + default: 60 + maximum: 60 + minimum: 1 + type: integer + rcrdTerminationSilenceTimeMs: + maximum: 3000 + minimum: 1 + type: integer + type: object + x-is-object: true + TranscribeUtterance: + allOf: + - $ref: '#/components/schemas/PerclCommand' + - description: |- + 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: + actionUrl: + format: uri + type: string + x-is-uri: true + x-is-url: true + playBeep: + default: false + type: boolean + record: + $ref: '#/components/schemas/TranscribeUtteranceRecord' + privacyForLogging: + default: false + type: boolean + privacyForRecording: + default: false + type: boolean + prompts: + items: + $ref: '#/components/schemas/PerclCommand' + type: array + x-is-list: true + required: + - actionUrl + type: object + description: |- + 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. + title: TranscribeUtterance + x-stoplight: + id: u509r3zqc38ze + x-examples: + Example 1: + TranscribeUtterance: + actionUrl: http://yoursite.com/handleTranscription + record: + maxLengthSec: 60 + saveRecording: true + rcrdTerminationSilenceTimeMs: 2000 + playBeep: true + prompts: + - Play: + file: https://yoursite.com/path/to/please-record-greeting.wav + x-percl-command: TranscribeUtterance + CreateWebRTCToken: + additionalProperties: false + example: + from: from + uses: 1 + to: to + properties: + to: + description: E.164 formatted phone number to which calls using this token + will be made. + type: string + from: + description: E.164 formatted phone number owned by the reqeusting account + from which calls using this token will be made. + type: string + uses: + description: number of times this token may be used for a WebRTC call + minimum: 1 + type: integer + required: + - from + - to + - uses + type: object + AccountResult_allOf_subresourceUris: + description: The list of subresources for this account. + nullable: true + type: object + CallResult_allOf_subresourceUris: + description: The list of subresources for this Call. These include things like + logs and recordings associated with the Call. + nullable: true + type: object + ConferenceResult_allOf_subresourceUris: + description: The list of subresources for this Conference. This includes participants + and/or recordings. + nullable: true + type: object + QueueResult_allOf_subresourceUris: + description: List of subresources for this Queue (which includes Queue members). + nullable: true + type: object + securitySchemes: + fc: + description: HTTP requests to the FreeClimb REST API are protected with HTTP + Basic authentication --- you use your FreeClimb-generated account ID and API + key to authenticate each HTTP request. You can view your credentials under + the API Keys section in your Dashboard. + scheme: basic + type: http +x-headers: [] +x-explorer-enabled: true +x-proxy-enabled: true +x-samples-enabled: false +x-samples-languages: +- curl +- node +- ruby +- javascript +- python + diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..3b18a574 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,9 @@ +# auto-generated by OpenAPI Generator (https://github.com/OpenAPITools/openapi-generator) +# +image: Visual Studio 2019 +clone_depth: 1 +build_script: +- dotnet build -c Release +- dotnet test -c Release +after_build: +- dotnet pack .\src\freeclimb\freeclimb.csproj -o ../../output -c Release --no-build diff --git a/docs/AccountRequest.md b/docs/AccountRequest.md index 53f54caa..80830982 100644 --- a/docs/AccountRequest.md +++ b/docs/AccountRequest.md @@ -1,6 +1,5 @@ # freeclimb.Model.AccountRequest - ## Properties Name | Type | Description | Notes @@ -8,8 +7,5 @@ Name | Type | Description | Notes **Alias** | **string** | Description for this account. | [optional] **Label** | **string** | Group to which this account belongs. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 e00a6b2b..91dd77d5 100644 --- a/docs/AccountResult.md +++ b/docs/AccountResult.md @@ -1,6 +1,5 @@ # freeclimb.Model.AccountResult - ## Properties Name | Type | Description | Notes @@ -17,8 +16,5 @@ Name | Type | Description | Notes **Status** | **AccountStatus** | | [optional] **SubresourceUris** | **Object** | The list of subresources for this account. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 e487c326..00000000 --- a/docs/AccountResultAllOf.md +++ /dev/null @@ -1,20 +0,0 @@ -# freeclimb.Model.AccountResultAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccountId** | **string** | String that uniquely identifies this account resource. | [optional] -**ApiKey** | **string** | The API key assigned to this account. This key must be kept a secret by the customer. | [optional] -**Alias** | **string** | A description for this account. | [optional] -**Label** | **string** | A string that identifies a category or group to which the account belongs. | [optional] -**Type** | **AccountType** | | [optional] -**Status** | **AccountStatus** | | [optional] -**SubresourceUris** | **Object** | The list of subresources for this account. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 b9d3d0a2..ea7b6ff7 100644 --- a/docs/AccountStatus.md +++ b/docs/AccountStatus.md @@ -1,5 +1,6 @@ # freeclimb.Enums.AccountStatus +The status of this account. It is one of: active, suspended, or closed. ## Properties Name | Value | Notes @@ -8,9 +9,5 @@ Name | Value | Notes **SUSPENDED** | suspended | Represented in C# as 2 **ACTIVE** | active | Represented in C# as 3 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 e43d76a6..a6e5c733 100644 --- a/docs/AccountType.md +++ b/docs/AccountType.md @@ -1,5 +1,6 @@ # freeclimb.Enums.AccountType +The type of this account. It is one of: trial or full. ## Properties Name | Value | Notes @@ -7,9 +8,5 @@ Name | Value | Notes **TRIAL** | trial | Represented in C# as 1 **FULL** | full | Represented in C# as 2 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 e39d216a..6e4ad60a 100644 --- a/docs/AddToConference.md +++ b/docs/AddToConference.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -17,8 +17,5 @@ Name | Type | Description | Notes **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] **DtmfPassThrough** | **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] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 1928574e..00000000 --- a/docs/AddToConferenceAllOf.md +++ /dev/null @@ -1,23 +0,0 @@ -# freeclimb.Model.AddToConferenceAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AllowCallControl** | **bool** | If `true`, Call control will be enabled for this Participant's Call leg. | [optional] -**CallControlSequence** | **string** | Defines a sequence of digits that, when entered by this caller, invokes the `callControlUrl`. Only digits plus '*', and '#' may be used. | [optional] -**CallControlUrl** | **string** | URL to be invoked when this Participant enters the digit sequence defined in the `callControlSequence` attribute. | [optional] -**ConferenceId** | **string** | ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result. | -**LeaveConferenceUrl** | **string** | 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] -**NotificationUrl** | **string** | When the Participant enters the Conference, this URL will be invoked using an HTTP POST request with the standard request parameters. | [optional] -**StartConfOnEnter** | **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] -**DtmfPassThrough** | **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] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..59a542fd --- /dev/null +++ b/docs/AddToConferenceNotificationWebhook.md @@ -0,0 +1,23 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | 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] +**CallId** | **string** | Unique ID for this Call, generated by FreeClimb. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | Unique ID of the Conference. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**Status** | **ConferenceStatus** | | [optional] +**RecordingUrl** | **string** | URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied. | [optional] +**RecordingId** | **string** | Unique ID of the Recording from this Conference. Populated only if a recording exists and the Conference was emptied. | [optional] +**RecordingDurationSec** | **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] + +[[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 00000000..9801e7da --- /dev/null +++ b/docs/AddToQueueNotificationWebhook.md @@ -0,0 +1,19 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | 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] +**CallId** | **string** | Unique ID for this Call, generated by FreeClimb. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | Unique ID of the Conference. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [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/AnsweredBy.md b/docs/AnsweredBy.md index 01f03ca4..78f50dd1 100644 --- a/docs/AnsweredBy.md +++ b/docs/AnsweredBy.md @@ -1,5 +1,6 @@ # freeclimb.Enums.AnsweredBy +If this Call was initiated with answering machine detection, either `human` or `machine`. Empty otherwise. ## Properties Name | Value | Notes @@ -7,9 +8,5 @@ Name | Value | Notes **HUMAN** | human | Represented in C# as 1 **MACHINE** | machine | Represented in C# as 2 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 50f3c8c5..95d0b9b6 100644 --- a/docs/ApplicationList.md +++ b/docs/ApplicationList.md @@ -1,6 +1,5 @@ # freeclimb.Model.ApplicationList - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **Applications** | [**List<ApplicationResult>**](ApplicationResult.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 385b8d40..00000000 --- a/docs/ApplicationListAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.ApplicationListAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Applications** | [**List<ApplicationResult>**](ApplicationResult.md) | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 da3a4929..a6e9c830 100644 --- a/docs/ApplicationRequest.md +++ b/docs/ApplicationRequest.md @@ -1,6 +1,5 @@ # freeclimb.Model.ApplicationRequest - ## Properties Name | Type | Description | Notes @@ -13,8 +12,5 @@ Name | Type | Description | Notes **SmsUrl** | **string** | 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] **SmsFallbackUrl** | **string** | 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] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 99709a57..035b9b33 100644 --- a/docs/ApplicationResult.md +++ b/docs/ApplicationResult.md @@ -1,6 +1,5 @@ # freeclimb.Model.ApplicationResult - ## Properties Name | Type | Description | Notes @@ -19,8 +18,5 @@ Name | Type | Description | Notes **SmsUrl** | **string** | The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only. | [optional] **SmsFallbackUrl** | **string** | The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 19d28a43..00000000 --- a/docs/ApplicationResultAllOf.md +++ /dev/null @@ -1,22 +0,0 @@ -# freeclimb.Model.ApplicationResultAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccountId** | **string** | ID of the account that owns this phone number. | [optional] -**ApplicationId** | **string** | 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** | **string** | Description for this phone number. Typically the conventionally-formatted version of the phone number. | [optional] -**VoiceUrl** | **string** | The URL FreeClimb will request when a phone number assigned to this Application receives a Call. Used for inbound calls only. | [optional] -**VoiceFallbackUrl** | **string** | The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only. | [optional] -**CallConnectUrl** | **string** | 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] -**StatusCallbackUrl** | **string** | A URL to which FreeClimb will make a POST request when the Call ends to notify this app. | [optional] -**SmsUrl** | **string** | The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only. | [optional] -**SmsFallbackUrl** | **string** | The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 2a2b34c3..f1cc6c5f 100644 --- a/docs/AvailableNumber.md +++ b/docs/AvailableNumber.md @@ -1,6 +1,5 @@ # freeclimb.Model.AvailableNumber - ## Properties Name | Type | Description | Notes @@ -13,8 +12,5 @@ Name | Type | Description | Notes **Region** | **string** | The state or province of this phone number. | [optional] **Country** | **string** | The country of this phone number. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 45b8a840..7130e4f4 100644 --- a/docs/AvailableNumberList.md +++ b/docs/AvailableNumberList.md @@ -1,6 +1,5 @@ # freeclimb.Model.AvailableNumberList - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **AvailablePhoneNumbers** | [**List<AvailableNumber>**](AvailableNumber.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 11c02ca4..00000000 --- a/docs/AvailableNumberListAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.AvailableNumberListAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AvailablePhoneNumbers** | [**List<AvailableNumber>**](AvailableNumber.md) | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..fb84ec92 --- /dev/null +++ b/docs/BargeInReason.md @@ -0,0 +1,12 @@ +# freeclimb.Enums.BargeInReason + +## Properties + +Name | Value | Notes +------------ | ------------- | ------------- +**NO_BARGE_IN** | noBargeIn | Represented in C# as 1 +**BARGE_IN_BY_DTMF** | bargeInByDTMF | Represented in C# as 2 +**BARGE_IN_BY_ENERGY** | bargeInByEnergy | Represented in C# as 3 + +[[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 dbb91ea0..5614784b 100644 --- a/docs/BuyIncomingNumberRequest.md +++ b/docs/BuyIncomingNumberRequest.md @@ -1,6 +1,5 @@ # freeclimb.Model.BuyIncomingNumberRequest - ## Properties Name | Type | Description | Notes @@ -9,8 +8,5 @@ Name | Type | Description | Notes **Alias** | **string** | Description for this new incoming phone number (max 64 characters). | [optional] **ApplicationId** | **string** | ID of the application that should handle phone calls to the number. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 00000000..d74fbfca --- /dev/null +++ b/docs/CallControlWebhook.md @@ -0,0 +1,15 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | Context or reason why this request is being made. Will be callControl. | [optional] +**CallId** | **string** | Unique ID for this Call, generated by FreeClimb. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**ConferenceId** | **string** | Unique ID of the Conference. | [optional] +**Digits** | **string** | String of digits entered by 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/CallDirection.md b/docs/CallDirection.md index a4721a8d..0d0466f4 100644 --- a/docs/CallDirection.md +++ b/docs/CallDirection.md @@ -1,5 +1,6 @@ # freeclimb.Enums.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 | Value | Notes @@ -8,9 +9,5 @@ Name | Value | Notes **OUTBOUND_API** | outboundAPI | Represented in C# as 2 **OUTBOUND_DIAL** | outboundDial | Represented in C# as 3 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..fbde0a4d --- /dev/null +++ b/docs/CallEndedReason.md @@ -0,0 +1,33 @@ +# freeclimb.Enums.CallEndedReason + +Enhanced status for the Call with additional information where available. +## Properties + +Name | Value | Notes +------------ | ------------- | ------------- +**BUSY** | busy | Represented in C# as 1 +**FAILED** | failed | Represented in C# as 2 +**NO_ANSWER** | noAnswer | Represented in C# as 3 +**CALL_CANCELED** | callCanceled | Represented in C# as 4 +**FAR_END_HANGUP** | farEndHangup | Represented in C# as 5 +**APP_HANGUP** | appHangup | Represented in C# as 6 +**APP_REJECT** | appReject | Represented in C# as 7 +**APP_NO_PERCL** | appNoPercl | Represented in C# as 8 +**APP_INVALID_PERCL** | appInvalidPercl | Represented in C# as 9 +**CONFERENCE_TERMINATED** | conferenceTerminated | Represented in C# as 10 +**CONFERENCE_EMPTIED** | conferenceEmptied | Represented in C# as 11 +**REMOVED_FROM_CONFERENCE** | removedFromConference | Represented in C# as 12 +**MACHINE_DETECTED** | machineDetected | Represented in C# as 13 +**WEBHOOK_FAILED** | webhookFailed | Represented in C# as 14 +**WEBHOOK_INVALID_RESPONSE** | webhookInvalidResponse | Represented in C# as 15 +**VOICE_DISABLED** | voiceDisabled | Represented in C# as 16 +**CONFIG_ERROR_NO_APPLICATION** | configErrorNoApplication | Represented in C# as 17 +**CONFIG_ERROR_NO_VOICE_URL** | configErrorNoVoiceUrl | Represented in C# as 18 +**MAX_REDIRECTS_ERROR** | maxRedirectsError | Represented in C# as 19 +**PERCL_PROCESSING_ERROR** | perclProcessingError | Represented in C# as 20 +**INTERNAL_ERROR** | internalError | Represented in C# as 21 +**GRPC_HANGUP** | grpcHangup | Represented in C# as 22 +**MAX_DURATION** | maxDuration | Represented in C# as 23 + +[[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 fd231ace..52bd8a32 100644 --- a/docs/CallList.md +++ b/docs/CallList.md @@ -1,6 +1,5 @@ # freeclimb.Model.CallList - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **Calls** | [**List<CallResult>**](CallResult.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 1fa8e98e..00000000 --- a/docs/CallListAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.CallListAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Calls** | [**List<CallResult>**](CallResult.md) | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 5a605aed..47d53511 100644 --- a/docs/CallResult.md +++ b/docs/CallResult.md @@ -1,6 +1,5 @@ # freeclimb.Model.CallResult - ## Properties Name | Type | Description | Notes @@ -26,8 +25,5 @@ Name | Type | Description | Notes **SubresourceUris** | **Object** | The list of subresources for this Call. These include things like logs and recordings associated with the Call. | [optional] **ApplicationId** | **string** | ApplicationId associated with the Call. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 092fe12d..00000000 --- a/docs/CallResultAllOf.md +++ /dev/null @@ -1,29 +0,0 @@ -# freeclimb.Model.CallResultAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CallId** | **string** | String that uniquely identifies this Call resource. | [optional] -**ParentCallId** | **string** | ID of the Call that created this leg (child Call). | [optional] -**AccountId** | **string** | ID of the account that owns this Call. | [optional] -**From** | **string** | Phone number that initiated this Call. | [optional] -**To** | **string** | Phone number that received this Call. | [optional] -**PhoneNumberId** | **string** | 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] -**CallStatus** | **CallStatus** | | [optional] -**StartTime** | **string** | 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] -**ConnectTime** | **string** | 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] -**EndTime** | **string** | 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] -**ConnectDuration** | **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** | | [optional] -**AnsweredBy** | **AnsweredBy** | | [optional] -**SubresourceUris** | **Object** | The list of subresources for this Call. These include things like logs and recordings associated with the Call. | [optional] -**ApplicationId** | **string** | ApplicationId associated with the Call. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 e703cf90..ad8803cb 100644 --- a/docs/CallStatus.md +++ b/docs/CallStatus.md @@ -1,5 +1,6 @@ # freeclimb.Enums.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 | Value | Notes @@ -13,9 +14,5 @@ Name | Value | Notes **BUSY** | busy | Represented in C# as 7 **NO_ANSWER** | noAnswer | Represented in C# as 8 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..a332af35 --- /dev/null +++ b/docs/CallStatusWebhook.md @@ -0,0 +1,20 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | Context or reason why this request is being made. Will be callStatus - A Call has ended and the statusCallbackUrl is being invoked. | [optional] +**CallId** | **string** | Unique ID for this Call, generated by FreeClimb. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**CallEndedReason** | **CallEndedReason** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | Unique ID of the Conference. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [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/Capabilities.md b/docs/Capabilities.md index 63add356..f0e3d552 100644 --- a/docs/Capabilities.md +++ b/docs/Capabilities.md @@ -1,6 +1,6 @@ # freeclimb.Model.Capabilities - +Details for which features this number may be used. ## Properties Name | Type | Description | Notes @@ -11,8 +11,5 @@ Name | Type | Description | Notes **TenDLC** | **bool?** | Indicates that a number, if sms is true, will be used for 10DLC messaging | **ShortCode** | **bool?** | Indicates that a number is a short code and can be used for short code messaging | -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 ae191739..9293f05d 100644 --- a/docs/CompletionRequest.md +++ b/docs/CompletionRequest.md @@ -1,14 +1,10 @@ # freeclimb.Model.CompletionRequest - ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Query** | **string** | Question to ask the Knowledge Base | -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 4dee323d..cefc0e88 100644 --- a/docs/CompletionResult.md +++ b/docs/CompletionResult.md @@ -1,15 +1,11 @@ # freeclimb.Model.CompletionResult - ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Response** | **string** | The generative response from the KnowledgeBase | -**Status** | **string** | Completion result status. Possible values: success, no_context | +**Status** | **CompletionResultStatus** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..02cec6b9 --- /dev/null +++ b/docs/CompletionResultStatus.md @@ -0,0 +1,12 @@ +# freeclimb.Enums.CompletionResultStatus + +Completion result status. Possible values: success, no_context +## Properties + +Name | Value | Notes +------------ | ------------- | ------------- +**SUCCESS** | success | Represented in C# as 1 +**NO_CONTEXT** | no_context | Represented in C# as 2 + +[[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 631fb663..557e9ea5 100644 --- a/docs/ConferenceList.md +++ b/docs/ConferenceList.md @@ -1,6 +1,5 @@ # freeclimb.Model.ConferenceList - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **Conferences** | [**List<ConferenceResult>**](ConferenceResult.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 26000729..00000000 --- a/docs/ConferenceListAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.ConferenceListAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Conferences** | [**List<ConferenceResult>**](ConferenceResult.md) | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 de77bf52..2c8fee1e 100644 --- a/docs/ConferenceParticipantList.md +++ b/docs/ConferenceParticipantList.md @@ -1,6 +1,5 @@ # freeclimb.Model.ConferenceParticipantList - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **Participants** | [**List<ConferenceParticipantResult>**](ConferenceParticipantResult.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 8770292f..00000000 --- a/docs/ConferenceParticipantListAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.ConferenceParticipantListAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Participants** | [**List<ConferenceParticipantResult>**](ConferenceParticipantResult.md) | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 0cf61502..dc9900d4 100644 --- a/docs/ConferenceParticipantResult.md +++ b/docs/ConferenceParticipantResult.md @@ -1,6 +1,5 @@ # freeclimb.Model.ConferenceParticipantResult - ## Properties Name | Type | Description | Notes @@ -17,8 +16,5 @@ Name | Type | Description | Notes **DtmfPassThrough** | **bool?** | True if this Participant had dtmfPassThrough privileges in the Conference. False otherwise. | [optional] **StartConfOnEnter** | **bool?** | True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 56aeee39..00000000 --- a/docs/ConferenceParticipantResultAllOf.md +++ /dev/null @@ -1,20 +0,0 @@ -# freeclimb.Model.ConferenceParticipantResultAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccountId** | **string** | ID of the account that created this participant. | [optional] -**ConferenceId** | **string** | ID of the conference this participant is in. | [optional] -**CallId** | **string** | 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] -**DtmfPassThrough** | **bool?** | True if this Participant had dtmfPassThrough privileges in the Conference. False otherwise. | [optional] -**StartConfOnEnter** | **bool?** | True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..0354f65c --- /dev/null +++ b/docs/ConferenceRecordingStatusWebhook.md @@ -0,0 +1,23 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | Context or reason why this request is being made. Will be conferenceRecordingStatus - The statusCallbackUrl request includes Recording information for a Conference that ended. | [optional] +**CallId** | **string** | Unique ID for this Call, generated by FreeClimb. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | Unique ID of the Conference. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**Status** | **ConferenceStatus** | | [optional] +**RecordingUrl** | **string** | URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied. | [optional] +**RecordingId** | **string** | Unique ID of the Recording from this Conference. Populated only if a recording exists and the Conference was emptied. | [optional] +**RecordingDurationSec** | **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] + +[[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 2700154c..910211fd 100644 --- a/docs/ConferenceResult.md +++ b/docs/ConferenceResult.md @@ -1,6 +1,5 @@ # freeclimb.Model.ConferenceResult - ## Properties Name | Type | Description | Notes @@ -20,8 +19,5 @@ Name | Type | Description | Notes **StatusCallbackUrl** | **string** | URL to inform that the Conference status has changed. | [optional] **SubresourceUris** | **Object** | The list of subresources for this Conference. This includes participants and/or recordings. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 47c33db4..00000000 --- a/docs/ConferenceResultAllOf.md +++ /dev/null @@ -1,23 +0,0 @@ -# freeclimb.Model.ConferenceResultAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ConferenceId** | **string** | A string that uniquely identifies this Conference resource. | [optional] -**AccountId** | **string** | ID of the account that created this Conference. | [optional] -**Alias** | **string** | A description for this Conference. | [optional] -**PlayBeep** | **PlayBeep** | | [optional] -**Record** | **bool?** | Flag indicating whether recording is enabled for this Conference. | [optional] -**Status** | **ConferenceStatus** | | [optional] -**WaitUrl** | **string** | URL referencing the audio file to be used as default wait music for the Conference when it is in the populated state. | [optional] -**ActionUrl** | **string** | URL invoked once the Conference is successfully created. | [optional] -**StatusCallbackUrl** | **string** | URL to inform that the Conference status has changed. | [optional] -**SubresourceUris** | **Object** | The list of subresources for this Conference. This includes participants and/or recordings. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 4fadda14..53eda6ae 100644 --- a/docs/ConferenceStatus.md +++ b/docs/ConferenceStatus.md @@ -1,5 +1,6 @@ # freeclimb.Enums.ConferenceStatus +The status of the Conference. One of: creating, empty, populated, inProgress, or terminated. ## Properties Name | Value | Notes @@ -9,9 +10,5 @@ Name | Value | Notes **IN_PROGRESS** | inProgress | Represented in C# as 3 **TERMINATED** | terminated | Represented in C# as 4 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..84a928bd --- /dev/null +++ b/docs/ConferenceStatusWebhook.md @@ -0,0 +1,23 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | Context or reason why this request is being made. Will be conferenceRecordingStatus - The statusCallbackUrl request includes Recording information for a Conference that ended. | [optional] +**CallId** | **string** | Unique ID for this Call, generated by FreeClimb. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | Unique ID of the Conference. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**Status** | **ConferenceStatus** | | [optional] +**RecordingUrl** | **string** | 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] +**RecordingId** | **string** | 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] +**RecordingDurationSec** | **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] + +[[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 ec898f75..68ad6749 100644 --- a/docs/CreateConference.md +++ b/docs/CreateConference.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -13,8 +13,5 @@ Name | Type | Description | Notes **StatusCallbackUrl** | **string** | This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available. | [optional] **WaitUrl** | **string** | 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] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 7e4dd4b0..00000000 --- a/docs/CreateConferenceAllOf.md +++ /dev/null @@ -1,19 +0,0 @@ -# freeclimb.Model.CreateConferenceAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActionUrl** | **string** | 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] -**PlayBeep** | **PlayBeep** | | [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] -**StatusCallbackUrl** | **string** | This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available. | [optional] -**WaitUrl** | **string** | 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] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 3aef11dc..094f41a4 100644 --- a/docs/CreateConferenceRequest.md +++ b/docs/CreateConferenceRequest.md @@ -1,6 +1,5 @@ # freeclimb.Model.CreateConferenceRequest - ## Properties Name | Type | Description | Notes @@ -11,8 +10,5 @@ Name | Type | Description | Notes **WaitUrl** | **string** | 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 &mdash; when the Conference is created. | [optional] **StatusCallbackUrl** | **string** | This URL is invoked when the status of the Conference changes. For more information, see **statusCallbackUrl** (below). | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 00000000..e5ab82ff --- /dev/null +++ b/docs/CreateConferenceWebhook.md @@ -0,0 +1,23 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | 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] +**CallId** | **string** | Unique ID for this Call, generated by FreeClimb. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | Unique ID of the Conference. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**Status** | **ConferenceStatus** | | [optional] +**RecordingUrl** | **string** | 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] +**RecordingId** | **string** | 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] +**RecordingDurationSec** | **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] + +[[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 c8a98cff..1e346a0f 100644 --- a/docs/CreateWebRTCToken.md +++ b/docs/CreateWebRTCToken.md @@ -1,6 +1,5 @@ # freeclimb.Model.CreateWebRTCToken - ## Properties Name | Type | Description | Notes @@ -9,8 +8,5 @@ Name | Type | Description | Notes **From** | **string** | 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 | -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 1d6fce62..f32b6f6c 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -2,68 +2,67 @@ All URIs are relative to *https://www.freeclimb.com/apiserver* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**BuyAPhoneNumber**](DefaultApi.md#buyaphonenumber) | **POST** /Accounts/{accountId}/IncomingPhoneNumbers | Buy a Phone Number -[**CreateAConference**](DefaultApi.md#createaconference) | **POST** /Accounts/{accountId}/Conferences | Create a Conference -[**CreateAQueue**](DefaultApi.md#createaqueue) | **POST** /Accounts/{accountId}/Queues | Create a Queue -[**CreateAnApplication**](DefaultApi.md#createanapplication) | **POST** /Accounts/{accountId}/Applications | Create an application -[**CreateKnowledgeBaseCompletion**](DefaultApi.md#createknowledgebasecompletion) | **POST** /Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion | Query the knowledge base -[**DeleteARecording**](DefaultApi.md#deletearecording) | **DELETE** /Accounts/{accountId}/Recordings/{recordingId} | Delete a Recording -[**DeleteAnApplication**](DefaultApi.md#deleteanapplication) | **DELETE** /Accounts/{accountId}/Applications/{applicationId} | Delete an application -[**DeleteAnIncomingNumber**](DefaultApi.md#deleteanincomingnumber) | **DELETE** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Delete an Incoming Number -[**DequeueAMember**](DefaultApi.md#dequeueamember) | **POST** /Accounts/{accountId}/Queues/{queueId}/Members/{callId} | Dequeue a Member -[**DequeueHeadMember**](DefaultApi.md#dequeueheadmember) | **POST** /Accounts/{accountId}/Queues/{queueId}/Members/Front | Dequeue Head Member -[**DownloadARecordingFile**](DefaultApi.md#downloadarecordingfile) | **GET** /Accounts/{accountId}/Recordings/{recordingId}/Download | Download a Recording File -[**FilterLogs**](DefaultApi.md#filterlogs) | **POST** /Accounts/{accountId}/Logs | Filter Logs -[**GetACall**](DefaultApi.md#getacall) | **GET** /Accounts/{accountId}/Calls/{callId} | Get a Call -[**GetAConference**](DefaultApi.md#getaconference) | **GET** /Accounts/{accountId}/Conferences/{conferenceId} | Get a Conference -[**GetAMember**](DefaultApi.md#getamember) | **GET** /Accounts/{accountId}/Queues/{queueId}/Members/{callId} | Get a Member -[**GetAParticipant**](DefaultApi.md#getaparticipant) | **GET** /Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId} | Get a Participant -[**GetAQueue**](DefaultApi.md#getaqueue) | **GET** /Accounts/{accountId}/Queues/{queueId} | Get a Queue -[**GetARecording**](DefaultApi.md#getarecording) | **GET** /Accounts/{accountId}/Recordings/{recordingId} | Get a Recording -[**GetAnAccount**](DefaultApi.md#getanaccount) | **GET** /Accounts/{accountId} | Get an Account -[**GetAnApplication**](DefaultApi.md#getanapplication) | **GET** /Accounts/{accountId}/Applications/{applicationId} | Get an Application -[**GetAnIncomingNumber**](DefaultApi.md#getanincomingnumber) | **GET** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Get an Incoming Number -[**GetAnSmsMessage**](DefaultApi.md#getansmsmessage) | **GET** /Accounts/{accountId}/Messages/{messageId} | Get an SMS Message -[**GetHeadMember**](DefaultApi.md#getheadmember) | **GET** /Accounts/{accountId}/Queues/{queueId}/Members/Front | Get Head Member -[**GetTenDLCSmsBrand**](DefaultApi.md#gettendlcsmsbrand) | **GET** /Accounts/{accountId}/Messages/10DLC/Brands/{brandId} | Get a 10DLC SMS Brand -[**GetTenDLCSmsBrands**](DefaultApi.md#gettendlcsmsbrands) | **GET** /Accounts/{accountId}/Messages/10DLC/Brands | Get list of SMS 10DLC Brands -[**GetTenDLCSmsCampaign**](DefaultApi.md#gettendlcsmscampaign) | **GET** /Accounts/{accountId}/Messages/10DLC/Campaigns/{campaignId} | Get a 10DLC SMS Campaign -[**GetTenDLCSmsCampaigns**](DefaultApi.md#gettendlcsmscampaigns) | **GET** /Accounts/{accountId}/Messages/10DLC/Campaigns | Get list of SMS 10DLC Campaigns -[**GetTenDLCSmsPartnerCampaign**](DefaultApi.md#gettendlcsmspartnercampaign) | **GET** /Accounts/{accountId}/Messages/10DLC/PartnerCampaigns/{campaignId} | Get a 10DLC SMS Partner Campaign -[**GetTenDLCSmsPartnerCampaigns**](DefaultApi.md#gettendlcsmspartnercampaigns) | **GET** /Accounts/{accountId}/Messages/10DLC/PartnerCampaigns | Get list of SMS 10DLC Partner Campaigns -[**GetTollFreeSmsCampaign**](DefaultApi.md#gettollfreesmscampaign) | **GET** /Accounts/{accountId}/Messages/TollFree/Campaigns/{campaignId} | Get a TollFree SMS Campaign -[**GetTollFreeSmsCampaigns**](DefaultApi.md#gettollfreesmscampaigns) | **GET** /Accounts/{accountId}/Messages/TollFree/Campaigns | Get list of TollFree Campaigns -[**ListActiveQueues**](DefaultApi.md#listactivequeues) | **GET** /Accounts/{accountId}/Queues | List Active Queues -[**ListAllAccountLogs**](DefaultApi.md#listallaccountlogs) | **GET** /Accounts/{accountId}/Logs | List All Account Logs -[**ListApplications**](DefaultApi.md#listapplications) | **GET** /Accounts/{accountId}/Applications | List applications -[**ListAvailableNumbers**](DefaultApi.md#listavailablenumbers) | **GET** /AvailablePhoneNumbers | List available numbers -[**ListCallLogs**](DefaultApi.md#listcalllogs) | **GET** /Accounts/{accountId}/Calls/{callId}/Logs | List Call Logs -[**ListCallRecordings**](DefaultApi.md#listcallrecordings) | **GET** /Accounts/{accountId}/Calls/{callId}/Recordings | List Call Recordings -[**ListCalls**](DefaultApi.md#listcalls) | **GET** /Accounts/{accountId}/Calls | List Calls -[**ListConferenceRecordings**](DefaultApi.md#listconferencerecordings) | **GET** /Accounts/{accountId}/Conferences/{conferenceId}/Recordings | List Conference Recordings -[**ListConferences**](DefaultApi.md#listconferences) | **GET** /Accounts/{accountId}/Conferences | List Conferences -[**ListIncomingNumbers**](DefaultApi.md#listincomingnumbers) | **GET** /Accounts/{accountId}/IncomingPhoneNumbers | List Incoming Numbers -[**ListMembers**](DefaultApi.md#listmembers) | **GET** /Accounts/{accountId}/Queues/{queueId}/Members | List Members -[**ListParticipants**](DefaultApi.md#listparticipants) | **GET** /Accounts/{accountId}/Conferences/{conferenceId}/Participants | List Participants -[**ListRecordings**](DefaultApi.md#listrecordings) | **GET** /Accounts/{accountId}/Recordings | List Recordings -[**ListSmsMessages**](DefaultApi.md#listsmsmessages) | **GET** /Accounts/{accountId}/Messages | List SMS Messages -[**MakeACall**](DefaultApi.md#makeacall) | **POST** /Accounts/{accountId}/Calls | Make a Call -[**MakeAWebrtcJwt**](DefaultApi.md#makeawebrtcjwt) | **POST** /Accounts/{accountId}/Calls/WebRTC/Token | Make a JWT for WebRTC calling -[**RemoveAParticipant**](DefaultApi.md#removeaparticipant) | **DELETE** /Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId} | Remove a Participant -[**SendAnSmsMessage**](DefaultApi.md#sendansmsmessage) | **POST** /Accounts/{accountId}/Messages | Send an SMS Message -[**StreamARecordingFile**](DefaultApi.md#streamarecordingfile) | **GET** /Accounts/{accountId}/Recordings/{recordingId}/Stream | Stream a Recording File -[**UpdateAConference**](DefaultApi.md#updateaconference) | **POST** /Accounts/{accountId}/Conferences/{conferenceId} | Update a Conference -[**UpdateALiveCall**](DefaultApi.md#updatealivecall) | **POST** /Accounts/{accountId}/Calls/{callId} | Update a Live Call -[**UpdateAParticipant**](DefaultApi.md#updateaparticipant) | **POST** /Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId} | Update a Participant -[**UpdateAQueue**](DefaultApi.md#updateaqueue) | **POST** /Accounts/{accountId}/Queues/{queueId} | Update a Queue -[**UpdateAnAccount**](DefaultApi.md#updateanaccount) | **POST** /Accounts/{accountId} | Manage an account -[**UpdateAnApplication**](DefaultApi.md#updateanapplication) | **POST** /Accounts/{accountId}/Applications/{applicationId} | Update an application -[**UpdateAnIncomingNumber**](DefaultApi.md#updateanincomingnumber) | **POST** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Update an Incoming Number -[**GetNextPage**](DefaultApi.md#GetNextPage) | **GET** | Get next page of paginated resource - - +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**BuyAPhoneNumber**](DefaultApi.md#buyaphonenumber) | **POST** /Accounts/{accountId}/IncomingPhoneNumbers | Buy a Phone Number | +| [**CreateAConference**](DefaultApi.md#createaconference) | **POST** /Accounts/{accountId}/Conferences | Create a Conference | +| [**CreateAQueue**](DefaultApi.md#createaqueue) | **POST** /Accounts/{accountId}/Queues | Create a Queue | +| [**CreateAnApplication**](DefaultApi.md#createanapplication) | **POST** /Accounts/{accountId}/Applications | Create an application | +| [**CreateKnowledgeBaseCompletion**](DefaultApi.md#createknowledgebasecompletion) | **POST** /Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion | Query the knowledge base | +| [**DeleteARecording**](DefaultApi.md#deletearecording) | **DELETE** /Accounts/{accountId}/Recordings/{recordingId} | Delete a Recording | +| [**DeleteAnApplication**](DefaultApi.md#deleteanapplication) | **DELETE** /Accounts/{accountId}/Applications/{applicationId} | Delete an application | +| [**DeleteAnIncomingNumber**](DefaultApi.md#deleteanincomingnumber) | **DELETE** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Delete an Incoming Number | +| [**DequeueAMember**](DefaultApi.md#dequeueamember) | **POST** /Accounts/{accountId}/Queues/{queueId}/Members/{callId} | Dequeue a Member | +| [**DequeueHeadMember**](DefaultApi.md#dequeueheadmember) | **POST** /Accounts/{accountId}/Queues/{queueId}/Members/Front | Dequeue Head Member | +| [**DownloadARecordingFile**](DefaultApi.md#downloadarecordingfile) | **GET** /Accounts/{accountId}/Recordings/{recordingId}/Download | Download a Recording File | +| [**FilterLogs**](DefaultApi.md#filterlogs) | **POST** /Accounts/{accountId}/Logs | Filter Logs | +| [**GetACall**](DefaultApi.md#getacall) | **GET** /Accounts/{accountId}/Calls/{callId} | Get a Call | +| [**GetAConference**](DefaultApi.md#getaconference) | **GET** /Accounts/{accountId}/Conferences/{conferenceId} | Get a Conference | +| [**GetAMember**](DefaultApi.md#getamember) | **GET** /Accounts/{accountId}/Queues/{queueId}/Members/{callId} | Get a Member | +| [**GetAParticipant**](DefaultApi.md#getaparticipant) | **GET** /Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId} | Get a Participant | +| [**GetAQueue**](DefaultApi.md#getaqueue) | **GET** /Accounts/{accountId}/Queues/{queueId} | Get a Queue | +| [**GetARecording**](DefaultApi.md#getarecording) | **GET** /Accounts/{accountId}/Recordings/{recordingId} | Get a Recording | +| [**GetAnAccount**](DefaultApi.md#getanaccount) | **GET** /Accounts/{accountId} | Get an Account | +| [**GetAnApplication**](DefaultApi.md#getanapplication) | **GET** /Accounts/{accountId}/Applications/{applicationId} | Get an Application | +| [**GetAnIncomingNumber**](DefaultApi.md#getanincomingnumber) | **GET** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Get an Incoming Number | +| [**GetAnSmsMessage**](DefaultApi.md#getansmsmessage) | **GET** /Accounts/{accountId}/Messages/{messageId} | Get an SMS Message | +| [**GetHeadMember**](DefaultApi.md#getheadmember) | **GET** /Accounts/{accountId}/Queues/{queueId}/Members/Front | Get Head Member | +| [**GetTenDLCSmsBrand**](DefaultApi.md#gettendlcsmsbrand) | **GET** /Accounts/{accountId}/Messages/10DLC/Brands/{brandId} | Get a 10DLC SMS Brand | +| [**GetTenDLCSmsBrands**](DefaultApi.md#gettendlcsmsbrands) | **GET** /Accounts/{accountId}/Messages/10DLC/Brands | Get list of SMS 10DLC Brands | +| [**GetTenDLCSmsCampaign**](DefaultApi.md#gettendlcsmscampaign) | **GET** /Accounts/{accountId}/Messages/10DLC/Campaigns/{campaignId} | Get a 10DLC SMS Campaign | +| [**GetTenDLCSmsCampaigns**](DefaultApi.md#gettendlcsmscampaigns) | **GET** /Accounts/{accountId}/Messages/10DLC/Campaigns | Get list of SMS 10DLC Campaigns | +| [**GetTenDLCSmsPartnerCampaign**](DefaultApi.md#gettendlcsmspartnercampaign) | **GET** /Accounts/{accountId}/Messages/10DLC/PartnerCampaigns/{campaignId} | Get a 10DLC SMS Partner Campaign | +| [**GetTenDLCSmsPartnerCampaigns**](DefaultApi.md#gettendlcsmspartnercampaigns) | **GET** /Accounts/{accountId}/Messages/10DLC/PartnerCampaigns | Get list of SMS 10DLC Partner Campaigns | +| [**GetTollFreeSmsCampaign**](DefaultApi.md#gettollfreesmscampaign) | **GET** /Accounts/{accountId}/Messages/TollFree/Campaigns/{campaignId} | Get a TollFree SMS Campaign | +| [**GetTollFreeSmsCampaigns**](DefaultApi.md#gettollfreesmscampaigns) | **GET** /Accounts/{accountId}/Messages/TollFree/Campaigns | Get list of TollFree Campaigns | +| [**ListActiveQueues**](DefaultApi.md#listactivequeues) | **GET** /Accounts/{accountId}/Queues | List Active Queues | +| [**ListAllAccountLogs**](DefaultApi.md#listallaccountlogs) | **GET** /Accounts/{accountId}/Logs | List All Account Logs | +| [**ListApplications**](DefaultApi.md#listapplications) | **GET** /Accounts/{accountId}/Applications | List applications | +| [**ListAvailableNumbers**](DefaultApi.md#listavailablenumbers) | **GET** /AvailablePhoneNumbers | List available numbers | +| [**ListCallLogs**](DefaultApi.md#listcalllogs) | **GET** /Accounts/{accountId}/Calls/{callId}/Logs | List Call Logs | +| [**ListCallRecordings**](DefaultApi.md#listcallrecordings) | **GET** /Accounts/{accountId}/Calls/{callId}/Recordings | List Call Recordings | +| [**ListCalls**](DefaultApi.md#listcalls) | **GET** /Accounts/{accountId}/Calls | List Calls | +| [**ListConferenceRecordings**](DefaultApi.md#listconferencerecordings) | **GET** /Accounts/{accountId}/Conferences/{conferenceId}/Recordings | List Conference Recordings | +| [**ListConferences**](DefaultApi.md#listconferences) | **GET** /Accounts/{accountId}/Conferences | List Conferences | +| [**ListIncomingNumbers**](DefaultApi.md#listincomingnumbers) | **GET** /Accounts/{accountId}/IncomingPhoneNumbers | List Incoming Numbers | +| [**ListMembers**](DefaultApi.md#listmembers) | **GET** /Accounts/{accountId}/Queues/{queueId}/Members | List Members | +| [**ListParticipants**](DefaultApi.md#listparticipants) | **GET** /Accounts/{accountId}/Conferences/{conferenceId}/Participants | List Participants | +| [**ListRecordings**](DefaultApi.md#listrecordings) | **GET** /Accounts/{accountId}/Recordings | List Recordings | +| [**ListSmsMessages**](DefaultApi.md#listsmsmessages) | **GET** /Accounts/{accountId}/Messages | List SMS Messages | +| [**MakeACall**](DefaultApi.md#makeacall) | **POST** /Accounts/{accountId}/Calls | Make a Call | +| [**MakeAWebrtcJwt**](DefaultApi.md#makeawebrtcjwt) | **POST** /Accounts/{accountId}/Calls/WebRTC/Token | Make a JWT for WebRTC calling | +| [**RemoveAParticipant**](DefaultApi.md#removeaparticipant) | **DELETE** /Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId} | Remove a Participant | +| [**SendAnSmsMessage**](DefaultApi.md#sendansmsmessage) | **POST** /Accounts/{accountId}/Messages | Send an SMS Message | +| [**StreamARecordingFile**](DefaultApi.md#streamarecordingfile) | **GET** /Accounts/{accountId}/Recordings/{recordingId}/Stream | Stream a Recording File | +| [**UpdateAConference**](DefaultApi.md#updateaconference) | **POST** /Accounts/{accountId}/Conferences/{conferenceId} | Update a Conference | +| [**UpdateALiveCall**](DefaultApi.md#updatealivecall) | **POST** /Accounts/{accountId}/Calls/{callId} | Update a Live Call | +| [**UpdateAParticipant**](DefaultApi.md#updateaparticipant) | **POST** /Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId} | Update a Participant | +| [**UpdateAQueue**](DefaultApi.md#updateaqueue) | **POST** /Accounts/{accountId}/Queues/{queueId} | Update a Queue | +| [**UpdateAnAccount**](DefaultApi.md#updateanaccount) | **POST** /Accounts/{accountId} | Manage an account | +| [**UpdateAnApplication**](DefaultApi.md#updateanapplication) | **POST** /Accounts/{accountId}/Applications/{applicationId} | Update an application | +| [**UpdateAnIncomingNumber**](DefaultApi.md#updateanincomingnumber) | **POST** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Update an Incoming Number | + + # **BuyAPhoneNumber** > IncomingNumberResult BuyAPhoneNumber (BuyIncomingNumberRequest buyIncomingNumberRequest) @@ -86,24 +85,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - - var buyIncomingNumberRequest = new BuyIncomingNumberRequest(PhoneNumber={ Phone number to purchase in E.164 format (as returned in the list of Available Phone Numbers). }, Alias={ Description for this new incoming phone number (max 64 characters). }, ApplicationId={ ID of the application that should handle phone calls to the number. }); // BuyIncomingNumberRequest | Incoming Number transaction details - + var buyIncomingNumberRequest = new BuyIncomingNumberRequest(); // BuyIncomingNumberRequest | Incoming Number transaction details + try { // Buy a Phone Number IncomingNumberResult result = apiInstance.BuyAPhoneNumber(buyIncomingNumberRequest); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.BuyAPhoneNumber: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.BuyAPhoneNumber: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -111,11 +109,33 @@ namespace Example } ``` +#### Using the BuyAPhoneNumberWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Buy a Phone Number + ApiResponse response = apiInstance.BuyAPhoneNumberWithHttpInfo(buyIncomingNumberRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.BuyAPhoneNumberWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **buyIncomingNumberRequest** | [**BuyIncomingNumberRequest**](BuyIncomingNumberRequest.md)| Incoming Number transaction details | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **buyIncomingNumberRequest** | [**BuyIncomingNumberRequest**](BuyIncomingNumberRequest.md) | Incoming Number transaction details | | ### Return type @@ -139,9 +159,9 @@ 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) - + # **CreateAConference** -> ConferenceResult CreateAConference (CreateConferenceRequest createConferenceRequest = null) +> ConferenceResult CreateAConference (CreateConferenceRequest? createConferenceRequest = null) Create a Conference @@ -162,24 +182,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - - var createConferenceRequest = new CreateConferenceRequest(Alias={ A description for this Conference. Maximum 64 characters. }, PlayBeep={ }, Record={ Setting to `true` records the entire Conference. }, WaitUrl={ 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. }, StatusCallbackUrl={ This URL is invoked when the status of the Conference changes. For more information, see **statusCallbackUrl** (below). }); // CreateConferenceRequest | Conference to create (optional) - + var createConferenceRequest = new CreateConferenceRequest?(); // CreateConferenceRequest? | Conference to create (optional) + try { // Create a Conference ConferenceResult result = apiInstance.CreateAConference(createConferenceRequest); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.CreateAConference: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.CreateAConference: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -187,11 +206,33 @@ namespace Example } ``` +#### Using the CreateAConferenceWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create a Conference + ApiResponse response = apiInstance.CreateAConferenceWithHttpInfo(createConferenceRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.CreateAConferenceWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createConferenceRequest** | [**CreateConferenceRequest**](CreateConferenceRequest.md)| Conference to create | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **createConferenceRequest** | [**CreateConferenceRequest?**](CreateConferenceRequest?.md) | Conference to create | [optional] | ### Return type @@ -215,9 +256,9 @@ 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) - + # **CreateAQueue** -> QueueResult CreateAQueue (QueueRequest queueRequest = null) +> QueueResult CreateAQueue (QueueRequest? queueRequest = null) Create a Queue @@ -238,24 +279,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - - var queueRequest = new QueueRequest(Alias={ Description for this Queue. Max length is 64 characters. }, MaxSize={ 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. }); // QueueRequest | Queue details used to create a queue (optional) - + var queueRequest = new QueueRequest?(); // QueueRequest? | Queue details used to create a queue (optional) + try { // Create a Queue QueueResult result = apiInstance.CreateAQueue(queueRequest); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.CreateAQueue: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.CreateAQueue: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -263,11 +303,33 @@ namespace Example } ``` +#### Using the CreateAQueueWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create a Queue + ApiResponse response = apiInstance.CreateAQueueWithHttpInfo(queueRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.CreateAQueueWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **queueRequest** | [**QueueRequest**](QueueRequest.md)| Queue details used to create a queue | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **queueRequest** | [**QueueRequest?**](QueueRequest?.md) | Queue details used to create a queue | [optional] | ### Return type @@ -291,9 +353,9 @@ 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) - + # **CreateAnApplication** -> ApplicationResult CreateAnApplication (ApplicationRequest applicationRequest = null) +> ApplicationResult CreateAnApplication (ApplicationRequest? applicationRequest = null) Create an application @@ -314,24 +376,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - - var applicationRequest = new ApplicationRequest(Alias={ A human readable description of the application, with maximum length 64 characters. }, VoiceUrl={ The URL that FreeClimb will request when an inbound call arrives on a phone number assigned to this application. Used only for inbound calls. }, VoiceFallbackUrl={ 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. }, CallConnectUrl={ 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. }, StatusCallbackUrl={ 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. }, SmsUrl={ 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. }, SmsFallbackUrl={ 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. }); // ApplicationRequest | Application Details (optional) - + var applicationRequest = new ApplicationRequest?(); // ApplicationRequest? | Application Details (optional) + try { // Create an application ApplicationResult result = apiInstance.CreateAnApplication(applicationRequest); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.CreateAnApplication: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.CreateAnApplication: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -339,11 +400,33 @@ namespace Example } ``` +#### Using the CreateAnApplicationWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create an application + ApiResponse response = apiInstance.CreateAnApplicationWithHttpInfo(applicationRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.CreateAnApplicationWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **applicationRequest** | [**ApplicationRequest**](ApplicationRequest.md)| Application Details | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **applicationRequest** | [**ApplicationRequest?**](ApplicationRequest?.md) | Application Details | [optional] | ### Return type @@ -367,9 +450,9 @@ 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) - + # **CreateKnowledgeBaseCompletion** -> CompletionResult CreateKnowledgeBaseCompletion (string knowledgeBaseId, CompletionRequest completionRequest = null) +> CompletionResult CreateKnowledgeBaseCompletion (string knowledgeBaseId, CompletionRequest? completionRequest = null) Query the knowledge base @@ -390,26 +473,25 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var knowledgeBaseId = "knowledgeBaseId_example"; // string | A string that uniquely identifies the KnowledgeBase resource. - - - var completionRequest = new CompletionRequest(Query={ Question to ask the Knowledge Base }); // CompletionRequest | Completion request details (optional) - + + var completionRequest = new CompletionRequest?(); // CompletionRequest? | Completion request details (optional) + try { // Query the knowledge base CompletionResult result = apiInstance.CreateKnowledgeBaseCompletion(knowledgeBaseId, completionRequest); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.CreateKnowledgeBaseCompletion: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.CreateKnowledgeBaseCompletion: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -417,12 +499,35 @@ namespace Example } ``` +#### Using the CreateKnowledgeBaseCompletionWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Query the knowledge base + ApiResponse response = apiInstance.CreateKnowledgeBaseCompletionWithHttpInfo(knowledgeBaseId, completionRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.CreateKnowledgeBaseCompletionWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **knowledgeBaseId** | **string**| A string that uniquely identifies the KnowledgeBase resource. | - **completionRequest** | [**CompletionRequest**](CompletionRequest.md)| Completion request details | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **knowledgeBaseId** | **string** | A string that uniquely identifies the KnowledgeBase resource. | | + +| **completionRequest** | [**CompletionRequest?**](CompletionRequest?.md) | Completion request details | [optional] | ### Return type @@ -446,7 +551,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) - + # **DeleteARecording** > void DeleteARecording (string recordingId) @@ -469,23 +574,22 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var recordingId = "recordingId_example"; // string | String that uniquely identifies this recording resource. - - + try { // Delete a Recording - apiInstance.DeleteARecording(recordingId); + apiInstance.DeleteARecording(recordingId); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.DeleteARecording: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.DeleteARecording: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -493,11 +597,30 @@ namespace Example } ``` +#### Using the DeleteARecordingWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete a Recording + apiInstance.DeleteARecordingWithHttpInfo(recordingId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.DeleteARecordingWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **recordingId** | **string**| String that uniquely identifies this recording resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **recordingId** | **string** | String that uniquely identifies this recording resource. | | ### Return type @@ -521,7 +644,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) - + # **DeleteAnApplication** > void DeleteAnApplication (string applicationId) @@ -544,23 +667,22 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var applicationId = "applicationId_example"; // string | String that uniquely identifies this application resource. - - + try { // Delete an application - apiInstance.DeleteAnApplication(applicationId); + apiInstance.DeleteAnApplication(applicationId); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.DeleteAnApplication: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.DeleteAnApplication: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -568,11 +690,30 @@ namespace Example } ``` +#### Using the DeleteAnApplicationWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete an application + apiInstance.DeleteAnApplicationWithHttpInfo(applicationId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.DeleteAnApplicationWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **applicationId** | **string**| String that uniquely identifies this application resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **applicationId** | **string** | String that uniquely identifies this application resource. | | ### Return type @@ -596,7 +737,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) - + # **DeleteAnIncomingNumber** > void DeleteAnIncomingNumber (string phoneNumberId) @@ -619,23 +760,22 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var phoneNumberId = "phoneNumberId_example"; // string | String that uniquely identifies this phone number resource. - - + try { // Delete an Incoming Number - apiInstance.DeleteAnIncomingNumber(phoneNumberId); + apiInstance.DeleteAnIncomingNumber(phoneNumberId); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.DeleteAnIncomingNumber: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.DeleteAnIncomingNumber: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -643,11 +783,30 @@ namespace Example } ``` +#### Using the DeleteAnIncomingNumberWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete an Incoming Number + apiInstance.DeleteAnIncomingNumberWithHttpInfo(phoneNumberId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.DeleteAnIncomingNumberWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **phoneNumberId** | **string**| String that uniquely identifies this phone number resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **phoneNumberId** | **string** | String that uniquely identifies this phone number resource. | | ### Return type @@ -671,7 +830,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) - + # **DequeueAMember** > QueueMember DequeueAMember (string queueId, string callId) @@ -694,26 +853,25 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var queueId = "queueId_example"; // string | String that uniquely identifies the Queue that the Member belongs to. - + var callId = "callId_example"; // string | ID if the Call that the Member belongs to - - + try { // Dequeue a Member QueueMember result = apiInstance.DequeueAMember(queueId, callId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.DequeueAMember: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.DequeueAMember: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -721,12 +879,35 @@ namespace Example } ``` +#### Using the DequeueAMemberWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Dequeue a Member + ApiResponse response = apiInstance.DequeueAMemberWithHttpInfo(queueId, callId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.DequeueAMemberWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **queueId** | **string**| String that uniquely identifies the Queue that the Member belongs to. | - **callId** | **string**| ID if the Call that the Member belongs to | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **queueId** | **string** | String that uniquely identifies the Queue that the Member belongs to. | | + +| **callId** | **string** | ID if the Call that the Member belongs to | | ### Return type @@ -750,7 +931,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) - + # **DequeueHeadMember** > QueueMember DequeueHeadMember (string queueId) @@ -773,24 +954,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var queueId = "queueId_example"; // string | String that uniquely identifies this queue resource. - - + try { // Dequeue Head Member QueueMember result = apiInstance.DequeueHeadMember(queueId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.DequeueHeadMember: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.DequeueHeadMember: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -798,11 +978,33 @@ namespace Example } ``` +#### Using the DequeueHeadMemberWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Dequeue Head Member + ApiResponse response = apiInstance.DequeueHeadMemberWithHttpInfo(queueId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.DequeueHeadMemberWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **queueId** | **string**| String that uniquely identifies this queue resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **queueId** | **string** | String that uniquely identifies this queue resource. | | ### Return type @@ -826,7 +1028,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) - + # **DownloadARecordingFile** > System.IO.Stream DownloadARecordingFile (string recordingId) @@ -849,24 +1051,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var recordingId = "recordingId_example"; // string | String that uniquely identifies this recording resource. - - + try { // Download a Recording File System.IO.Stream result = apiInstance.DownloadARecordingFile(recordingId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.DownloadARecordingFile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.DownloadARecordingFile: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -874,11 +1075,33 @@ namespace Example } ``` +#### Using the DownloadARecordingFileWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Download a Recording File + ApiResponse response = apiInstance.DownloadARecordingFileWithHttpInfo(recordingId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.DownloadARecordingFileWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **recordingId** | **string**| String that uniquely identifies this recording resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **recordingId** | **string** | String that uniquely identifies this recording resource. | | ### Return type @@ -902,7 +1125,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) - + # **FilterLogs** > LogList FilterLogs (FilterLogsRequest filterLogsRequest) @@ -925,24 +1148,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - - var filterLogsRequest = new FilterLogsRequest(Pql={ The filter query for retrieving logs. See **Performance Query Language** below. }); // FilterLogsRequest | Filter logs request paramters - + var filterLogsRequest = new FilterLogsRequest(); // FilterLogsRequest | Filter logs request paramters + try { // Filter Logs LogList result = apiInstance.FilterLogs(filterLogsRequest); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.FilterLogs: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.FilterLogs: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -950,11 +1172,33 @@ namespace Example } ``` +#### Using the FilterLogsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Filter Logs + ApiResponse response = apiInstance.FilterLogsWithHttpInfo(filterLogsRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.FilterLogsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **filterLogsRequest** | [**FilterLogsRequest**](FilterLogsRequest.md)| Filter logs request paramters | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **filterLogsRequest** | [**FilterLogsRequest**](FilterLogsRequest.md) | Filter logs request paramters | | ### Return type @@ -978,7 +1222,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) - + # **GetACall** > CallResult GetACall (string callId) @@ -1001,24 +1245,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var callId = "callId_example"; // string | String that uniquely identifies this call resource. - - + try { // Get a Call CallResult result = apiInstance.GetACall(callId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetACall: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetACall: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1026,11 +1269,33 @@ namespace Example } ``` +#### Using the GetACallWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a Call + ApiResponse response = apiInstance.GetACallWithHttpInfo(callId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetACallWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **callId** | **string**| String that uniquely identifies this call resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **callId** | **string** | String that uniquely identifies this call resource. | | ### Return type @@ -1054,7 +1319,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) - + # **GetAConference** > ConferenceResult GetAConference (string conferenceId) @@ -1077,24 +1342,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var conferenceId = "conferenceId_example"; // string | A string that uniquely identifies this conference resource. - - + try { // Get a Conference ConferenceResult result = apiInstance.GetAConference(conferenceId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetAConference: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetAConference: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1102,11 +1366,33 @@ namespace Example } ``` +#### Using the GetAConferenceWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a Conference + ApiResponse response = apiInstance.GetAConferenceWithHttpInfo(conferenceId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetAConferenceWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **conferenceId** | **string**| A string that uniquely identifies this conference resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **conferenceId** | **string** | A string that uniquely identifies this conference resource. | | ### Return type @@ -1130,7 +1416,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) - + # **GetAMember** > QueueMember GetAMember (string queueId, string callId) @@ -1153,26 +1439,25 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var queueId = "queueId_example"; // string | String that uniquely identifies the Queue that the Member belongs to. - + var callId = "callId_example"; // string | ID of the Call that the Member belongs to - - + try { // Get a Member QueueMember result = apiInstance.GetAMember(queueId, callId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetAMember: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetAMember: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1180,12 +1465,35 @@ namespace Example } ``` +#### Using the GetAMemberWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a Member + ApiResponse response = apiInstance.GetAMemberWithHttpInfo(queueId, callId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetAMemberWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **queueId** | **string**| String that uniquely identifies the Queue that the Member belongs to. | - **callId** | **string**| ID of the Call that the Member belongs to | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **queueId** | **string** | String that uniquely identifies the Queue that the Member belongs to. | | + +| **callId** | **string** | ID of the Call that the Member belongs to | | ### Return type @@ -1209,7 +1517,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) - + # **GetAParticipant** > ConferenceParticipantResult GetAParticipant (string conferenceId, string callId) @@ -1232,26 +1540,25 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var conferenceId = "conferenceId_example"; // string | ID of the conference this participant is in. - + var callId = "callId_example"; // string | ID of the Call associated with this participant. - - + try { // Get a Participant ConferenceParticipantResult result = apiInstance.GetAParticipant(conferenceId, callId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetAParticipant: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetAParticipant: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1259,12 +1566,35 @@ namespace Example } ``` +#### Using the GetAParticipantWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a Participant + ApiResponse response = apiInstance.GetAParticipantWithHttpInfo(conferenceId, callId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetAParticipantWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **conferenceId** | **string**| ID of the conference this participant is in. | - **callId** | **string**| ID of the Call associated with this participant. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **conferenceId** | **string** | ID of the conference this participant is in. | | + +| **callId** | **string** | ID of the Call associated with this participant. | | ### Return type @@ -1288,7 +1618,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) - + # **GetAQueue** > QueueResult GetAQueue (string queueId) @@ -1311,24 +1641,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var queueId = "queueId_example"; // string | A string that uniquely identifies this queue resource. - - + try { // Get a Queue QueueResult result = apiInstance.GetAQueue(queueId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetAQueue: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetAQueue: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1336,11 +1665,33 @@ namespace Example } ``` +#### Using the GetAQueueWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a Queue + ApiResponse response = apiInstance.GetAQueueWithHttpInfo(queueId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetAQueueWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **queueId** | **string**| A string that uniquely identifies this queue resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **queueId** | **string** | A string that uniquely identifies this queue resource. | | ### Return type @@ -1364,7 +1715,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) - + # **GetARecording** > RecordingResult GetARecording (string recordingId) @@ -1387,24 +1738,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var recordingId = "recordingId_example"; // string | String that uniquely identifies this recording resource. - - + try { // Get a Recording RecordingResult result = apiInstance.GetARecording(recordingId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetARecording: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetARecording: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1412,11 +1762,33 @@ namespace Example } ``` +#### Using the GetARecordingWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a Recording + ApiResponse response = apiInstance.GetARecordingWithHttpInfo(recordingId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetARecordingWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **recordingId** | **string**| String that uniquely identifies this recording resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **recordingId** | **string** | String that uniquely identifies this recording resource. | | ### Return type @@ -1440,7 +1812,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) - + # **GetAnAccount** > AccountResult GetAnAccount () @@ -1463,22 +1835,21 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - try { // Get an Account AccountResult result = apiInstance.GetAnAccount(); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetAnAccount: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetAnAccount: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1486,6 +1857,26 @@ namespace Example } ``` +#### Using the GetAnAccountWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get an Account + ApiResponse response = apiInstance.GetAnAccountWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetAnAccountWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters @@ -1511,7 +1902,7 @@ namespace Example [[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) - + # **GetAnApplication** > ApplicationResult GetAnApplication (string applicationId) @@ -1534,24 +1925,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var applicationId = "applicationId_example"; // string | A string that uniquely identifies this application resource. - - + try { // Get an Application ApplicationResult result = apiInstance.GetAnApplication(applicationId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetAnApplication: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetAnApplication: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1559,11 +1949,33 @@ namespace Example } ``` +#### Using the GetAnApplicationWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get an Application + ApiResponse response = apiInstance.GetAnApplicationWithHttpInfo(applicationId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetAnApplicationWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **applicationId** | **string**| A string that uniquely identifies this application resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **applicationId** | **string** | A string that uniquely identifies this application resource. | | ### Return type @@ -1587,7 +1999,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) - + # **GetAnIncomingNumber** > IncomingNumberResult GetAnIncomingNumber (string phoneNumberId) @@ -1610,24 +2022,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var phoneNumberId = "phoneNumberId_example"; // string | String that uniquely identifies this phone number resource. - - + try { // Get an Incoming Number IncomingNumberResult result = apiInstance.GetAnIncomingNumber(phoneNumberId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetAnIncomingNumber: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetAnIncomingNumber: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1635,11 +2046,33 @@ namespace Example } ``` +#### Using the GetAnIncomingNumberWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get an Incoming Number + ApiResponse response = apiInstance.GetAnIncomingNumberWithHttpInfo(phoneNumberId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetAnIncomingNumberWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **phoneNumberId** | **string**| String that uniquely identifies this phone number resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **phoneNumberId** | **string** | String that uniquely identifies this phone number resource. | | ### Return type @@ -1663,7 +2096,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) - + # **GetAnSmsMessage** > MessageResult GetAnSmsMessage (string messageId) @@ -1686,24 +2119,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var messageId = "messageId_example"; // string | String that uniquely identifies this Message resource. - - + try { // Get an SMS Message MessageResult result = apiInstance.GetAnSmsMessage(messageId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetAnSmsMessage: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetAnSmsMessage: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1711,11 +2143,33 @@ namespace Example } ``` +#### Using the GetAnSmsMessageWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get an SMS Message + ApiResponse response = apiInstance.GetAnSmsMessageWithHttpInfo(messageId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetAnSmsMessageWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **messageId** | **string**| String that uniquely identifies this Message resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **messageId** | **string** | String that uniquely identifies this Message resource. | | ### Return type @@ -1739,7 +2193,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) - + # **GetHeadMember** > QueueMember GetHeadMember (string queueId) @@ -1762,24 +2216,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var queueId = "queueId_example"; // string | String that uniquely identifies the Queue that the Member belongs to. - - + try { // Get Head Member QueueMember result = apiInstance.GetHeadMember(queueId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetHeadMember: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetHeadMember: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1787,11 +2240,33 @@ namespace Example } ``` +#### Using the GetHeadMemberWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get Head Member + ApiResponse response = apiInstance.GetHeadMemberWithHttpInfo(queueId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetHeadMemberWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **queueId** | **string**| String that uniquely identifies the Queue that the Member belongs to. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **queueId** | **string** | String that uniquely identifies the Queue that the Member belongs to. | | ### Return type @@ -1815,7 +2290,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) - + # **GetTenDLCSmsBrand** > SMSTenDLCBrand GetTenDLCSmsBrand (string brandId) @@ -1838,24 +2313,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var brandId = "brandId_example"; // string | String that uniquely identifies this brand resource. - - + try { // Get a 10DLC SMS Brand SMSTenDLCBrand result = apiInstance.GetTenDLCSmsBrand(brandId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsBrand: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsBrand: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1863,11 +2337,33 @@ namespace Example } ``` +#### Using the GetTenDLCSmsBrandWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a 10DLC SMS Brand + ApiResponse response = apiInstance.GetTenDLCSmsBrandWithHttpInfo(brandId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsBrandWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **brandId** | **string**| String that uniquely identifies this brand resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **brandId** | **string** | String that uniquely identifies this brand resource. | | ### Return type @@ -1891,7 +2387,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) - + # **GetTenDLCSmsBrands** > SMSTenDLCBrandsListResult GetTenDLCSmsBrands () @@ -1914,22 +2410,21 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - try { // Get list of SMS 10DLC Brands SMSTenDLCBrandsListResult result = apiInstance.GetTenDLCSmsBrands(); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsBrands: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsBrands: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -1937,6 +2432,26 @@ namespace Example } ``` +#### Using the GetTenDLCSmsBrandsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get list of SMS 10DLC Brands + ApiResponse response = apiInstance.GetTenDLCSmsBrandsWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsBrandsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters @@ -1962,7 +2477,7 @@ namespace Example [[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) - + # **GetTenDLCSmsCampaign** > SMSTenDLCCampaign GetTenDLCSmsCampaign (string campaignId) @@ -1985,24 +2500,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var campaignId = "campaignId_example"; // string | String that uniquely identifies this campaign resource. - - + try { // Get a 10DLC SMS Campaign SMSTenDLCCampaign result = apiInstance.GetTenDLCSmsCampaign(campaignId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsCampaign: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsCampaign: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2010,11 +2524,33 @@ namespace Example } ``` +#### Using the GetTenDLCSmsCampaignWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a 10DLC SMS Campaign + ApiResponse response = apiInstance.GetTenDLCSmsCampaignWithHttpInfo(campaignId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsCampaignWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **campaignId** | **string**| String that uniquely identifies this campaign resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **campaignId** | **string** | String that uniquely identifies this campaign resource. | | ### Return type @@ -2038,9 +2574,9 @@ 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) - + # **GetTenDLCSmsCampaigns** -> SMSTenDLCCampaignsListResult GetTenDLCSmsCampaigns (string brandId = null) +> SMSTenDLCCampaignsListResult GetTenDLCSmsCampaigns (string? brandId = null) Get list of SMS 10DLC Campaigns @@ -2061,24 +2597,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - var brandId = "brandId_example"; // string | The unique identifier for a brand (optional) - - + var brandId = "brandId_example"; // string? | The unique identifier for a brand (optional) + try { // Get list of SMS 10DLC Campaigns SMSTenDLCCampaignsListResult result = apiInstance.GetTenDLCSmsCampaigns(brandId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsCampaigns: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsCampaigns: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2086,11 +2621,33 @@ namespace Example } ``` +#### Using the GetTenDLCSmsCampaignsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get list of SMS 10DLC Campaigns + ApiResponse response = apiInstance.GetTenDLCSmsCampaignsWithHttpInfo(brandId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsCampaignsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **brandId** | **string**| The unique identifier for a brand | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **brandId** | **string?** | The unique identifier for a brand | [optional] | ### Return type @@ -2114,7 +2671,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) - + # **GetTenDLCSmsPartnerCampaign** > SMSTenDLCPartnerCampaign GetTenDLCSmsPartnerCampaign (string campaignId) @@ -2137,24 +2694,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var campaignId = "campaignId_example"; // string | String that uniquely identifies this campaign resource. - - + try { // Get a 10DLC SMS Partner Campaign SMSTenDLCPartnerCampaign result = apiInstance.GetTenDLCSmsPartnerCampaign(campaignId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsPartnerCampaign: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsPartnerCampaign: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2162,11 +2718,33 @@ namespace Example } ``` +#### Using the GetTenDLCSmsPartnerCampaignWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a 10DLC SMS Partner Campaign + ApiResponse response = apiInstance.GetTenDLCSmsPartnerCampaignWithHttpInfo(campaignId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsPartnerCampaignWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **campaignId** | **string**| String that uniquely identifies this campaign resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **campaignId** | **string** | String that uniquely identifies this campaign resource. | | ### Return type @@ -2190,9 +2768,9 @@ 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) - + # **GetTenDLCSmsPartnerCampaigns** -> SMSTenDLCPartnerCampaignsListResult GetTenDLCSmsPartnerCampaigns (string brandId = null) +> SMSTenDLCPartnerCampaignsListResult GetTenDLCSmsPartnerCampaigns (string? brandId = null) Get list of SMS 10DLC Partner Campaigns @@ -2213,24 +2791,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - var brandId = "brandId_example"; // string | The unique identifier for a brand (optional) - - + var brandId = "brandId_example"; // string? | The unique identifier for a brand (optional) + try { // Get list of SMS 10DLC Partner Campaigns SMSTenDLCPartnerCampaignsListResult result = apiInstance.GetTenDLCSmsPartnerCampaigns(brandId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsPartnerCampaigns: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsPartnerCampaigns: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2238,11 +2815,33 @@ namespace Example } ``` +#### Using the GetTenDLCSmsPartnerCampaignsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get list of SMS 10DLC Partner Campaigns + ApiResponse response = apiInstance.GetTenDLCSmsPartnerCampaignsWithHttpInfo(brandId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetTenDLCSmsPartnerCampaignsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **brandId** | **string**| The unique identifier for a brand | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **brandId** | **string?** | The unique identifier for a brand | [optional] | ### Return type @@ -2266,7 +2865,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) - + # **GetTollFreeSmsCampaign** > SMSTollFreeCampaign GetTollFreeSmsCampaign (string campaignId) @@ -2289,24 +2888,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var campaignId = "campaignId_example"; // string | String that uniquely identifies this TollFree Campaign resource. - - + try { // Get a TollFree SMS Campaign SMSTollFreeCampaign result = apiInstance.GetTollFreeSmsCampaign(campaignId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetTollFreeSmsCampaign: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetTollFreeSmsCampaign: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2314,11 +2912,33 @@ namespace Example } ``` +#### Using the GetTollFreeSmsCampaignWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a TollFree SMS Campaign + ApiResponse response = apiInstance.GetTollFreeSmsCampaignWithHttpInfo(campaignId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetTollFreeSmsCampaignWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **campaignId** | **string**| String that uniquely identifies this TollFree Campaign resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **campaignId** | **string** | String that uniquely identifies this TollFree Campaign resource. | | ### Return type @@ -2342,7 +2962,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) - + # **GetTollFreeSmsCampaigns** > SMSTollFreeCampaignsListResult GetTollFreeSmsCampaigns () @@ -2365,22 +2985,21 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - try { // Get list of TollFree Campaigns SMSTollFreeCampaignsListResult result = apiInstance.GetTollFreeSmsCampaigns(); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetTollFreeSmsCampaigns: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.GetTollFreeSmsCampaigns: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2388,6 +3007,26 @@ namespace Example } ``` +#### Using the GetTollFreeSmsCampaignsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get list of TollFree Campaigns + ApiResponse response = apiInstance.GetTollFreeSmsCampaignsWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.GetTollFreeSmsCampaignsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters @@ -2413,9 +3052,9 @@ namespace Example [[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) - + # **ListActiveQueues** -> QueueList ListActiveQueues (string alias = null) +> QueueList ListActiveQueues (string? alias = null) List Active Queues @@ -2436,24 +3075,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - var alias = "alias_example"; // string | Return only the Queue resources with aliases that exactly match this name. (optional) - - + var alias = "alias_example"; // string? | Return only the Queue resources with aliases that exactly match this name. (optional) + try { // List Active Queues QueueList result = apiInstance.ListActiveQueues(alias); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ListActiveQueues: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.ListActiveQueues: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2461,11 +3099,33 @@ namespace Example } ``` +#### Using the ListActiveQueuesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Active Queues + ApiResponse response = apiInstance.ListActiveQueuesWithHttpInfo(alias); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.ListActiveQueuesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **alias** | **string**| Return only the Queue resources with aliases that exactly match this name. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **alias** | **string?** | Return only the Queue resources with aliases that exactly match this name. | [optional] | ### Return type @@ -2489,7 +3149,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) - + # **ListAllAccountLogs** > LogList ListAllAccountLogs () @@ -2512,22 +3172,21 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - try { // List All Account Logs LogList result = apiInstance.ListAllAccountLogs(); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ListAllAccountLogs: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.ListAllAccountLogs: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2535,6 +3194,26 @@ namespace Example } ``` +#### Using the ListAllAccountLogsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List All Account Logs + ApiResponse response = apiInstance.ListAllAccountLogsWithHttpInfo(); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.ListAllAccountLogsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters @@ -2560,9 +3239,9 @@ namespace Example [[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) - + # **ListApplications** -> ApplicationList ListApplications (string alias = null) +> ApplicationList ListApplications (string? alias = null) List applications @@ -2583,24 +3262,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - var alias = "alias_example"; // string | Return only applications with aliases that exactly match this value. (optional) - - + var alias = "alias_example"; // string? | Return only applications with aliases that exactly match this value. (optional) + try { // List applications ApplicationList result = apiInstance.ListApplications(alias); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ListApplications: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.ListApplications: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2608,11 +3286,33 @@ namespace Example } ``` +#### Using the ListApplicationsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List applications + ApiResponse response = apiInstance.ListApplicationsWithHttpInfo(alias); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.ListApplicationsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **alias** | **string**| Return only applications with aliases that exactly match this value. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **alias** | **string?** | Return only applications with aliases that exactly match this value. | [optional] | ### Return type @@ -2636,9 +3336,9 @@ 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) - + # **ListAvailableNumbers** -> AvailableNumberList ListAvailableNumbers (string phoneNumber = null, string region = null, string country = null, bool? voiceEnabled = null, bool? smsEnabled = null, bool? capabilitiesVoice = null, bool? capabilitiesSms = null, bool? capabilitiesTollFree = null, bool? capabilitiesTenDLC = null, bool? capabilitiesShortCode = null) +> AvailableNumberList ListAvailableNumbers (string? phoneNumber = null, string? region = null, string? country = null, bool? voiceEnabled = null, bool? smsEnabled = null, bool? capabilitiesVoice = null, bool? capabilitiesSms = null, bool? capabilitiesTollFree = null, bool? capabilitiesTenDLC = null, bool? capabilitiesShortCode = null) List available numbers @@ -2659,42 +3359,41 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - var phoneNumber = "phoneNumber_example"; // string | PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. (optional) - - var region = "region_example"; // string | State or province of this phone number. (optional) - - var country = "country_example"; // string | Country of this phone number. (optional) - + var phoneNumber = "phoneNumber_example"; // string? | PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. (optional) + + var region = "region_example"; // string? | State or province of this phone number. (optional) + + var country = "country_example"; // string? | Country of this phone number. (optional) + var voiceEnabled = true; // bool? | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional) (default to true) - + var smsEnabled = 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) - + var capabilitiesVoice = true; // bool? | (optional) - + var capabilitiesSms = true; // bool? | (optional) - + var capabilitiesTollFree = true; // bool? | (optional) - + var capabilitiesTenDLC = true; // bool? | (optional) - + var capabilitiesShortCode = true; // bool? | (optional) - - + try { // List available numbers AvailableNumberList result = apiInstance.ListAvailableNumbers(phoneNumber, region, country, voiceEnabled, smsEnabled, capabilitiesVoice, capabilitiesSms, capabilitiesTollFree, capabilitiesTenDLC, capabilitiesShortCode); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ListAvailableNumbers: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.ListAvailableNumbers: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2702,20 +3401,51 @@ namespace Example } ``` +#### Using the ListAvailableNumbersWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List available numbers + ApiResponse response = apiInstance.ListAvailableNumbersWithHttpInfo(phoneNumber, region, country, voiceEnabled, smsEnabled, capabilitiesVoice, capabilitiesSms, capabilitiesTollFree, capabilitiesTenDLC, capabilitiesShortCode); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.ListAvailableNumbersWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **phoneNumber** | **string**| PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. | [optional] - **region** | **string**| State or province of this phone number. | [optional] - **country** | **string**| Country of this phone number. | [optional] - **voiceEnabled** | **bool?**| Indicates whether the phone number can handle Calls. Typically set to true for all numbers. | [optional] [default to true] - **smsEnabled** | **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] - **capabilitiesVoice** | **bool?**| | [optional] - **capabilitiesSms** | **bool?**| | [optional] - **capabilitiesTollFree** | **bool?**| | [optional] - **capabilitiesTenDLC** | **bool?**| | [optional] - **capabilitiesShortCode** | **bool?**| | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **phoneNumber** | **string?** | PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. | [optional] | + +| **region** | **string?** | State or province of this phone number. | [optional] | + +| **country** | **string?** | Country of this phone number. | [optional] | + +| **voiceEnabled** | **bool?** | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. | [optional] [default to true] | + +| **smsEnabled** | **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] | + +| **capabilitiesVoice** | **bool?** | | [optional] | + +| **capabilitiesSms** | **bool?** | | [optional] | + +| **capabilitiesTollFree** | **bool?** | | [optional] | + +| **capabilitiesTenDLC** | **bool?** | | [optional] | + +| **capabilitiesShortCode** | **bool?** | | [optional] | ### Return type @@ -2739,7 +3469,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) - + # **ListCallLogs** > LogList ListCallLogs (string callId) @@ -2762,24 +3492,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var callId = "callId_example"; // string | String that uniquely identifies this call resource. - - + try { // List Call Logs LogList result = apiInstance.ListCallLogs(callId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ListCallLogs: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.ListCallLogs: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2787,11 +3516,33 @@ namespace Example } ``` +#### Using the ListCallLogsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Call Logs + ApiResponse response = apiInstance.ListCallLogsWithHttpInfo(callId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.ListCallLogsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **callId** | **string**| String that uniquely identifies this call resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **callId** | **string** | String that uniquely identifies this call resource. | | ### Return type @@ -2815,9 +3566,9 @@ 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) - + # **ListCallRecordings** -> RecordingList ListCallRecordings (string callId, string dateCreated = null) +> RecordingList ListCallRecordings (string callId, string? dateCreated = null) List Call Recordings @@ -2838,26 +3589,25 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var callId = "callId_example"; // string | String that uniquely identifies this call resource. - - var dateCreated = "dateCreated_example"; // string | Only show recordings created on the specified date, in the form *YYYY-MM-DD*. (optional) - - + + var dateCreated = "dateCreated_example"; // string? | Only show recordings created on the specified date, in the form *YYYY-MM-DD*. (optional) + try { // List Call Recordings RecordingList result = apiInstance.ListCallRecordings(callId, dateCreated); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ListCallRecordings: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.ListCallRecordings: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2865,12 +3615,35 @@ namespace Example } ``` +#### Using the ListCallRecordingsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Call Recordings + ApiResponse response = apiInstance.ListCallRecordingsWithHttpInfo(callId, dateCreated); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.ListCallRecordingsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **callId** | **string**| String that uniquely identifies this call resource. | - **dateCreated** | **string**| Only show recordings created on the specified date, in the form *YYYY-MM-DD*. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **callId** | **string** | String that uniquely identifies this call resource. | | + +| **dateCreated** | **string?** | Only show recordings created on the specified date, in the form *YYYY-MM-DD*. | [optional] | ### Return type @@ -2894,9 +3667,9 @@ 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) - + # **ListCalls** -> CallList ListCalls (bool? active = null, string to = null, string from = null, CallStatus? status = null, string startTime = null, string endTime = null, string parentCallId = null, List applicationId = null) +> CallList ListCalls (bool? active = null, string? to = null, string? from = null, CallStatus? status = null, string? startTime = null, string? endTime = null, string? parentCallId = null, List? applicationId = null) List Calls @@ -2917,38 +3690,37 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var 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) - - var to = "to_example"; // string | Only show Calls to this phone number. (optional) - - var from = "from_example"; // string | Only show Calls from this phone number. (optional) - - var status = (CallStatus) "queued"; // CallStatus? | Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. (optional) - - var startTime = "startTime_example"; // string | Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. (optional) - - var endTime = "endTime_example"; // string | Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) - - var parentCallId = "parentCallId_example"; // string | Only show Calls spawned by the call with this ID. (optional) - - - var applicationId = new List(); // List | Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) - + + var to = "to_example"; // string? | Only show Calls to this phone number. (optional) + + var from = "from_example"; // string? | Only show Calls from this phone number. (optional) + + var status = new CallStatus?(); // CallStatus? | Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. (optional) + + var startTime = "startTime_example"; // string? | Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. (optional) + + var endTime = "endTime_example"; // string? | Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) + + var parentCallId = "parentCallId_example"; // string? | Only show Calls spawned by the call with this ID. (optional) + + var applicationId = new List?(); // List? | Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) + try { // List Calls CallList result = apiInstance.ListCalls(active, to, from, status, startTime, endTime, parentCallId, applicationId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ListCalls: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.ListCalls: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -2956,18 +3728,47 @@ namespace Example } ``` +#### Using the ListCallsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Calls + ApiResponse response = apiInstance.ListCallsWithHttpInfo(active, to, from, status, startTime, endTime, parentCallId, applicationId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.ListCallsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### 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] [default to false] - **to** | **string**| Only show Calls to this phone number. | [optional] - **from** | **string**| 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] - **startTime** | **string**| Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. | [optional] - **endTime** | **string**| Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. | [optional] - **parentCallId** | **string**| Only show Calls spawned by the call with this ID. | [optional] - **applicationId** | [**List<string>**](string.md)| Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. | [optional] +| 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] [default to false] | + +| **to** | **string?** | Only show Calls to this phone number. | [optional] | + +| **from** | **string?** | Only show Calls from this phone number. | [optional] | + +| **status** | [**CallStatus?**](CallStatus?.md) | Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. | [optional] | + +| **startTime** | **string?** | Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. | [optional] | + +| **endTime** | **string?** | Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. | [optional] | + +| **parentCallId** | **string?** | Only show Calls spawned by the call with this ID. | [optional] | + +| **applicationId** | [**List<string>?**](string.md) | Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. | [optional] | ### Return type @@ -2991,9 +3792,9 @@ 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) - + # **ListConferenceRecordings** -> RecordingList ListConferenceRecordings (string conferenceId, string callId = null, string dateCreated = null) +> RecordingList ListConferenceRecordings (string conferenceId, string? callId = null, string? dateCreated = null) List Conference Recordings @@ -3014,28 +3815,27 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var conferenceId = "conferenceId_example"; // string | Show only Recordings made during the conference with this ID. - - var callId = "callId_example"; // string | Show only Recordings made during the Call with this ID. (optional) - - var dateCreated = "dateCreated_example"; // string | Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - - + + var callId = "callId_example"; // string? | Show only Recordings made during the Call with this ID. (optional) + + var dateCreated = "dateCreated_example"; // string? | Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) + try { // List Conference Recordings RecordingList result = apiInstance.ListConferenceRecordings(conferenceId, callId, dateCreated); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ListConferenceRecordings: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.ListConferenceRecordings: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -3043,13 +3843,37 @@ namespace Example } ``` +#### Using the ListConferenceRecordingsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Conference Recordings + ApiResponse response = apiInstance.ListConferenceRecordingsWithHttpInfo(conferenceId, callId, dateCreated); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.ListConferenceRecordingsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **conferenceId** | **string**| Show only Recordings made during the conference with this ID. | - **callId** | **string**| Show only Recordings made during the Call with this ID. | [optional] - **dateCreated** | **string**| Only show Recordings created on this date, formatted as *YYYY-MM-DD*. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **conferenceId** | **string** | Show only Recordings made during the conference with this ID. | | + +| **callId** | **string?** | Show only Recordings made during the Call with this ID. | [optional] | + +| **dateCreated** | **string?** | Only show Recordings created on this date, formatted as *YYYY-MM-DD*. | [optional] | ### Return type @@ -3073,9 +3897,9 @@ 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) - + # **ListConferences** -> ConferenceList ListConferences (string status = null, string alias = null, string dateCreated = null, string dateUpdated = null) +> ConferenceList ListConferences (string? status = null, string? alias = null, string? dateCreated = null, string? dateUpdated = null) List Conferences @@ -3096,30 +3920,29 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - var status = "status_example"; // string | Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. (optional) - - var alias = "alias_example"; // string | List Conferences whose alias exactly matches this string. (optional) - - var dateCreated = "dateCreated_example"; // string | Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. (optional) - - var dateUpdated = "dateUpdated_example"; // string | Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. (optional) - - + var status = "status_example"; // string? | Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. (optional) + + var alias = "alias_example"; // string? | List Conferences whose alias exactly matches this string. (optional) + + var dateCreated = "dateCreated_example"; // string? | Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. (optional) + + var dateUpdated = "dateUpdated_example"; // string? | Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. (optional) + try { // List Conferences ConferenceList result = apiInstance.ListConferences(status, alias, dateCreated, dateUpdated); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ListConferences: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.ListConferences: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -3127,14 +3950,39 @@ namespace Example } ``` +#### Using the ListConferencesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Conferences + ApiResponse response = apiInstance.ListConferencesWithHttpInfo(status, alias, dateCreated, dateUpdated); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.ListConferencesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **string**| Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. | [optional] - **alias** | **string**| List Conferences whose alias exactly matches this string. | [optional] - **dateCreated** | **string**| Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. | [optional] - **dateUpdated** | **string**| Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **status** | **string?** | Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. | [optional] | + +| **alias** | **string?** | List Conferences whose alias exactly matches this string. | [optional] | + +| **dateCreated** | **string?** | Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. | [optional] | + +| **dateUpdated** | **string?** | Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. | [optional] | ### Return type @@ -3158,9 +4006,9 @@ 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) - + # **ListIncomingNumbers** -> IncomingNumberList ListIncomingNumbers (string phoneNumber = null, string alias = null, string region = null, string country = null, string applicationId = null, bool? hasApplication = null, bool? voiceEnabled = null, bool? smsEnabled = null, bool? hasCampaign = null, bool? capabilitiesVoice = null, bool? capabilitiesSms = null, bool? capabilitiesTollFree = null, bool? capabilitiesTenDLC = null, bool? capabilitiesShortCode = null, string tfnCampaignId = null, bool? offnet = null) +> IncomingNumberList ListIncomingNumbers (string? phoneNumber = null, string? alias = null, string? region = null, string? country = null, string? applicationId = null, bool? hasApplication = null, bool? voiceEnabled = null, bool? smsEnabled = null, bool? hasCampaign = null, bool? capabilitiesVoice = null, bool? capabilitiesSms = null, bool? capabilitiesTollFree = null, bool? capabilitiesTenDLC = null, bool? capabilitiesShortCode = null, string? tfnCampaignId = null, bool? offnet = null) List Incoming Numbers @@ -3181,54 +4029,53 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - var phoneNumber = "phoneNumber_example"; // string | Only show incoming phone number resources that match this PCRE-compatible regular expression. (optional) - - var alias = "alias_example"; // string | Only show incoming phone numbers with aliases that exactly match this value. (optional) - - var region = "region_example"; // string | State or province of this phone number. (optional) - - var country = "country_example"; // string | Country of this phone number. (optional) - - var applicationId = "applicationId_example"; // string | 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) - + var phoneNumber = "phoneNumber_example"; // string? | Only show incoming phone number resources that match this PCRE-compatible regular expression. (optional) + + var alias = "alias_example"; // string? | Only show incoming phone numbers with aliases that exactly match this value. (optional) + + var region = "region_example"; // string? | State or province of this phone number. (optional) + + var country = "country_example"; // string? | Country of this phone number. (optional) + + var applicationId = "applicationId_example"; // string? | 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) + var hasApplication = false; // bool? | Indication of whether the phone number has an application linked to it. (optional) (default to false) - + var voiceEnabled = true; // bool? | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional) (default to true) - + var smsEnabled = 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) - + var hasCampaign = true; // bool? | Indication of whether the phone number has a campaign associated with it (optional) - + var capabilitiesVoice = true; // bool? | (optional) - + var capabilitiesSms = true; // bool? | (optional) - + var capabilitiesTollFree = true; // bool? | (optional) - + var capabilitiesTenDLC = true; // bool? | (optional) - + var capabilitiesShortCode = true; // bool? | (optional) - - var tfnCampaignId = "tfnCampaignId_example"; // string | Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. (optional) - + + var tfnCampaignId = "tfnCampaignId_example"; // string? | Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. (optional) + var 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) - - + try { // List Incoming Numbers IncomingNumberList result = apiInstance.ListIncomingNumbers(phoneNumber, alias, region, country, applicationId, hasApplication, voiceEnabled, smsEnabled, hasCampaign, capabilitiesVoice, capabilitiesSms, capabilitiesTollFree, capabilitiesTenDLC, capabilitiesShortCode, tfnCampaignId, offnet); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ListIncomingNumbers: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.ListIncomingNumbers: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -3236,26 +4083,63 @@ namespace Example } ``` +#### Using the ListIncomingNumbersWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Incoming Numbers + ApiResponse response = apiInstance.ListIncomingNumbersWithHttpInfo(phoneNumber, alias, region, country, applicationId, hasApplication, voiceEnabled, smsEnabled, hasCampaign, capabilitiesVoice, capabilitiesSms, capabilitiesTollFree, capabilitiesTenDLC, capabilitiesShortCode, tfnCampaignId, offnet); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.ListIncomingNumbersWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **phoneNumber** | **string**| Only show incoming phone number resources that match this PCRE-compatible regular expression. | [optional] - **alias** | **string**| Only show incoming phone numbers with aliases that exactly match this value. | [optional] - **region** | **string**| State or province of this phone number. | [optional] - **country** | **string**| Country of this phone number. | [optional] - **applicationId** | **string**| 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] - **hasApplication** | **bool?**| Indication of whether the phone number has an application linked to it. | [optional] [default to false] - **voiceEnabled** | **bool?**| Indicates whether the phone number can handle Calls. Typically set to true for all numbers. | [optional] [default to true] - **smsEnabled** | **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] - **hasCampaign** | **bool?**| Indication of whether the phone number has a campaign associated with it | [optional] - **capabilitiesVoice** | **bool?**| | [optional] - **capabilitiesSms** | **bool?**| | [optional] - **capabilitiesTollFree** | **bool?**| | [optional] - **capabilitiesTenDLC** | **bool?**| | [optional] - **capabilitiesShortCode** | **bool?**| | [optional] - **tfnCampaignId** | **string**| 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] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **phoneNumber** | **string?** | Only show incoming phone number resources that match this PCRE-compatible regular expression. | [optional] | + +| **alias** | **string?** | Only show incoming phone numbers with aliases that exactly match this value. | [optional] | + +| **region** | **string?** | State or province of this phone number. | [optional] | + +| **country** | **string?** | Country of this phone number. | [optional] | + +| **applicationId** | **string?** | 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] | + +| **hasApplication** | **bool?** | Indication of whether the phone number has an application linked to it. | [optional] [default to false] | + +| **voiceEnabled** | **bool?** | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. | [optional] [default to true] | + +| **smsEnabled** | **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] | + +| **hasCampaign** | **bool?** | Indication of whether the phone number has a campaign associated with it | [optional] | + +| **capabilitiesVoice** | **bool?** | | [optional] | + +| **capabilitiesSms** | **bool?** | | [optional] | + +| **capabilitiesTollFree** | **bool?** | | [optional] | + +| **capabilitiesTenDLC** | **bool?** | | [optional] | + +| **capabilitiesShortCode** | **bool?** | | [optional] | + +| **tfnCampaignId** | **string?** | 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 @@ -3279,7 +4163,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) - + # **ListMembers** > QueueMemberList ListMembers (string queueId) @@ -3302,24 +4186,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var queueId = "queueId_example"; // string | String that uniquely identifies the Queue that the Member belongs to. - - + try { // List Members QueueMemberList result = apiInstance.ListMembers(queueId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ListMembers: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.ListMembers: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -3327,11 +4210,33 @@ namespace Example } ``` +#### Using the ListMembersWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Members + ApiResponse response = apiInstance.ListMembersWithHttpInfo(queueId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.ListMembersWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **queueId** | **string**| String that uniquely identifies the Queue that the Member belongs to. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **queueId** | **string** | String that uniquely identifies the Queue that the Member belongs to. | | ### Return type @@ -3355,7 +4260,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) - + # **ListParticipants** > ConferenceParticipantList ListParticipants (string conferenceId, bool? talk = null, bool? listen = null, bool? dtmfPassThrough = null) @@ -3378,30 +4283,29 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var conferenceId = "conferenceId_example"; // string | ID of the conference this participant is in. - + var talk = true; // bool? | Only show Participants with the talk privilege. (optional) - + var listen = true; // bool? | Only show Participants with the listen privilege. (optional) - + var dtmfPassThrough = true; // bool? | Only show Participants with the dtmfPassThrough privilege. (optional) - - + try { // List Participants ConferenceParticipantList result = apiInstance.ListParticipants(conferenceId, talk, listen, dtmfPassThrough); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ListParticipants: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.ListParticipants: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -3409,14 +4313,39 @@ namespace Example } ``` +#### Using the ListParticipantsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Participants + ApiResponse response = apiInstance.ListParticipantsWithHttpInfo(conferenceId, talk, listen, dtmfPassThrough); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.ListParticipantsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **conferenceId** | **string**| 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] - **dtmfPassThrough** | **bool?**| Only show Participants with the dtmfPassThrough privilege. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **conferenceId** | **string** | 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] | + +| **dtmfPassThrough** | **bool?** | Only show Participants with the dtmfPassThrough privilege. | [optional] | ### Return type @@ -3440,9 +4369,9 @@ 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) - + # **ListRecordings** -> RecordingList ListRecordings (string callId = null, string conferenceId = null, string dateCreated = null) +> RecordingList ListRecordings (string? callId = null, string? conferenceId = null, string? dateCreated = null) List Recordings @@ -3463,28 +4392,27 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - var callId = "callId_example"; // string | Show only Recordings made during the Call with this ID. (optional) - - var conferenceId = "conferenceId_example"; // string | Show only Recordings made during the conference with this ID. (optional) - - var dateCreated = "dateCreated_example"; // string | Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - - + var callId = "callId_example"; // string? | Show only Recordings made during the Call with this ID. (optional) + + var conferenceId = "conferenceId_example"; // string? | Show only Recordings made during the conference with this ID. (optional) + + var dateCreated = "dateCreated_example"; // string? | Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) + try { // List Recordings RecordingList result = apiInstance.ListRecordings(callId, conferenceId, dateCreated); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ListRecordings: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.ListRecordings: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -3492,13 +4420,37 @@ namespace Example } ``` +#### Using the ListRecordingsWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List Recordings + ApiResponse response = apiInstance.ListRecordingsWithHttpInfo(callId, conferenceId, dateCreated); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.ListRecordingsWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **callId** | **string**| Show only Recordings made during the Call with this ID. | [optional] - **conferenceId** | **string**| Show only Recordings made during the conference with this ID. | [optional] - **dateCreated** | **string**| Only show Recordings created on this date, formatted as *YYYY-MM-DD*. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **callId** | **string?** | Show only Recordings made during the Call with this ID. | [optional] | + +| **conferenceId** | **string?** | Show only Recordings made during the conference with this ID. | [optional] | + +| **dateCreated** | **string?** | Only show Recordings created on this date, formatted as *YYYY-MM-DD*. | [optional] | ### Return type @@ -3522,9 +4474,9 @@ 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) - + # **ListSmsMessages** -> MessagesList ListSmsMessages (string to = null, string from = null, string beginTime = null, string endTime = null, MessageDirection? direction = null, string campaignId = null, string brandId = null, bool? is10DLC = null) +> MessagesList ListSmsMessages (string? to = null, string? from = null, string? beginTime = null, string? endTime = null, MessageDirection? direction = null, string? campaignId = null, string? brandId = null, bool? is10DLC = null) List SMS Messages @@ -3545,38 +4497,37 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - var to = "to_example"; // string | Only show Messages to this phone number. (optional) - - var from = "from_example"; // string | Only show Messages from this phone number. (optional) - - var beginTime = "beginTime_example"; // string | Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. (optional) - - var endTime = "endTime_example"; // string | Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. (optional) - - var direction = (MessageDirection) "inbound"; // MessageDirection? | Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. (optional) - - var campaignId = "campaignId_example"; // string | Only show messages associated with this campaign ID. (optional) - - var brandId = "brandId_example"; // string | Only show messages associated with this brand ID (optional) - + var to = "to_example"; // string? | Only show Messages to this phone number. (optional) + + var from = "from_example"; // string? | Only show Messages from this phone number. (optional) + + var beginTime = "beginTime_example"; // string? | Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. (optional) + + var endTime = "endTime_example"; // string? | Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. (optional) + + var direction = new MessageDirection?(); // MessageDirection? | Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. (optional) + + var campaignId = "campaignId_example"; // string? | Only show messages associated with this campaign ID. (optional) + + var brandId = "brandId_example"; // string? | Only show messages associated with this brand ID (optional) + var is10DLC = true; // bool? | Only show messages that were sent as part of a 10DLC campaign. (optional) - - + try { // List SMS Messages MessagesList result = apiInstance.ListSmsMessages(to, from, beginTime, endTime, direction, campaignId, brandId, is10DLC); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ListSmsMessages: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.ListSmsMessages: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -3584,18 +4535,47 @@ namespace Example } ``` +#### Using the ListSmsMessagesWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // List SMS Messages + ApiResponse response = apiInstance.ListSmsMessagesWithHttpInfo(to, from, beginTime, endTime, direction, campaignId, brandId, is10DLC); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.ListSmsMessagesWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **to** | **string**| Only show Messages to this phone number. | [optional] - **from** | **string**| Only show Messages from this phone number. | [optional] - **beginTime** | **string**| Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. | [optional] - **endTime** | **string**| 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] - **campaignId** | **string**| Only show messages associated with this campaign ID. | [optional] - **brandId** | **string**| Only show messages associated with this brand ID | [optional] - **is10DLC** | **bool?**| Only show messages that were sent as part of a 10DLC campaign. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **to** | **string?** | Only show Messages to this phone number. | [optional] | + +| **from** | **string?** | Only show Messages from this phone number. | [optional] | + +| **beginTime** | **string?** | Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. | [optional] | + +| **endTime** | **string?** | Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. | [optional] | + +| **direction** | [**MessageDirection?**](MessageDirection?.md) | Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. | [optional] | + +| **campaignId** | **string?** | Only show messages associated with this campaign ID. | [optional] | + +| **brandId** | **string?** | Only show messages associated with this brand ID | [optional] | + +| **is10DLC** | **bool?** | Only show messages that were sent as part of a 10DLC campaign. | [optional] | ### Return type @@ -3619,9 +4599,9 @@ 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) - + # **MakeACall** -> CallResult MakeACall (MakeCallRequest makeCallRequest = null) +> CallResult MakeACall (MakeCallRequest? makeCallRequest = null) Make a Call @@ -3642,24 +4622,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - - var makeCallRequest = new MakeCallRequest(From={ 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={ Phone number to place the Call to. }, ApplicationId={ 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. }, SendDigits={ 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. }, IfMachine={ Specifies how FreeClimb should handle this Call if an answering machine answers it. }, IfMachineUrl={ 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. }, Timeout={ 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. }, ParentCallId={ 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. }, PrivacyMode={ Activate privacy mode in order to obscure log data that can potentially expose private information. }, CallConnectUrl={ 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. }); // MakeCallRequest | Call details for making a call (optional) - + var makeCallRequest = new MakeCallRequest?(); // MakeCallRequest? | Call details for making a call (optional) + try { // Make a Call CallResult result = apiInstance.MakeACall(makeCallRequest); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.MakeACall: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.MakeACall: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -3667,11 +4646,33 @@ namespace Example } ``` +#### Using the MakeACallWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Make a Call + ApiResponse response = apiInstance.MakeACallWithHttpInfo(makeCallRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.MakeACallWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **makeCallRequest** | [**MakeCallRequest**](MakeCallRequest.md)| Call details for making a call | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **makeCallRequest** | [**MakeCallRequest?**](MakeCallRequest?.md) | Call details for making a call | [optional] | ### Return type @@ -3695,7 +4696,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) - + # **MakeAWebrtcJwt** > string MakeAWebrtcJwt (CreateWebRTCToken createWebRTCToken) @@ -3718,24 +4719,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - - var createWebRTCToken = new CreateWebRTCToken(To={ E.164 formatted phone number to which calls using this token will be made. }, From={ E.164 formatted phone number owned by the reqeusting account from which calls using this token will be made. }, Uses={ number of times this token may be used for a WebRTC call }); // CreateWebRTCToken | Information needed to craft a JWT compatible with the platforms WebRTC APIs - + var createWebRTCToken = new CreateWebRTCToken(); // CreateWebRTCToken | Information needed to craft a JWT compatible with the platforms WebRTC APIs + try { // Make a JWT for WebRTC calling string result = apiInstance.MakeAWebrtcJwt(createWebRTCToken); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.MakeAWebrtcJwt: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.MakeAWebrtcJwt: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -3743,11 +4743,33 @@ namespace Example } ``` +#### Using the MakeAWebrtcJwtWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Make a JWT for WebRTC calling + ApiResponse response = apiInstance.MakeAWebrtcJwtWithHttpInfo(createWebRTCToken); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.MakeAWebrtcJwtWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **createWebRTCToken** | [**CreateWebRTCToken**](CreateWebRTCToken.md)| Information needed to craft a JWT compatible with the platforms WebRTC APIs | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **createWebRTCToken** | [**CreateWebRTCToken**](CreateWebRTCToken.md) | Information needed to craft a JWT compatible with the platforms WebRTC APIs | | ### Return type @@ -3771,7 +4793,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) - + # **RemoveAParticipant** > void RemoveAParticipant (string conferenceId, string callId) @@ -3794,25 +4816,24 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var conferenceId = "conferenceId_example"; // string | ID of the conference this participant is in. - + var callId = "callId_example"; // string | ID of the Call associated with this participant. - - + try { // Remove a Participant - apiInstance.RemoveAParticipant(conferenceId, callId); + apiInstance.RemoveAParticipant(conferenceId, callId); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.RemoveAParticipant: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.RemoveAParticipant: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -3820,12 +4841,32 @@ namespace Example } ``` +#### Using the RemoveAParticipantWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Remove a Participant + apiInstance.RemoveAParticipantWithHttpInfo(conferenceId, callId); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.RemoveAParticipantWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **conferenceId** | **string**| ID of the conference this participant is in. | - **callId** | **string**| ID of the Call associated with this participant. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **conferenceId** | **string** | ID of the conference this participant is in. | | + +| **callId** | **string** | ID of the Call associated with this participant. | | ### Return type @@ -3849,7 +4890,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) - + # **SendAnSmsMessage** > MessageResult SendAnSmsMessage (MessageRequest messageRequest) @@ -3872,24 +4913,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - var messageRequest = new MessageRequest(); // MessageRequest | Details to create a message - + try { // Send an SMS Message MessageResult result = apiInstance.SendAnSmsMessage(messageRequest); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.SendAnSmsMessage: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.SendAnSmsMessage: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -3897,11 +4937,33 @@ namespace Example } ``` +#### Using the SendAnSmsMessageWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Send an SMS Message + ApiResponse response = apiInstance.SendAnSmsMessageWithHttpInfo(messageRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.SendAnSmsMessageWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **messageRequest** | [**MessageRequest**](MessageRequest.md)| Details to create a message | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **messageRequest** | [**MessageRequest**](MessageRequest.md) | Details to create a message | | ### Return type @@ -3925,7 +4987,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) - + # **StreamARecordingFile** > System.IO.Stream StreamARecordingFile (string recordingId) @@ -3948,24 +5010,23 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var recordingId = "recordingId_example"; // string | String that uniquely identifies this recording resource. - - + try { // Stream a Recording File System.IO.Stream result = apiInstance.StreamARecordingFile(recordingId); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.StreamARecordingFile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.StreamARecordingFile: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -3973,11 +5034,33 @@ namespace Example } ``` +#### Using the StreamARecordingFileWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Stream a Recording File + ApiResponse response = apiInstance.StreamARecordingFileWithHttpInfo(recordingId); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.StreamARecordingFileWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **recordingId** | **string**| String that uniquely identifies this recording resource. | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **recordingId** | **string** | String that uniquely identifies this recording resource. | | ### Return type @@ -4001,9 +5084,9 @@ 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) - + # **UpdateAConference** -> void UpdateAConference (string conferenceId, UpdateConferenceRequest updateConferenceRequest = null) +> void UpdateAConference (string conferenceId, UpdateConferenceRequest? updateConferenceRequest = null) Update a Conference @@ -4024,25 +5107,24 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var conferenceId = "conferenceId_example"; // string | String that uniquely identifies this conference resource. - - - var updateConferenceRequest = new UpdateConferenceRequest(Alias={ Description for this conference. Maximum 64 characters. }, PlayBeep={ }, Status={ }); // UpdateConferenceRequest | Conference Details to update (optional) - + + var updateConferenceRequest = new UpdateConferenceRequest?(); // UpdateConferenceRequest? | Conference Details to update (optional) + try { // Update a Conference - apiInstance.UpdateAConference(conferenceId, updateConferenceRequest); + apiInstance.UpdateAConference(conferenceId, updateConferenceRequest); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.UpdateAConference: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.UpdateAConference: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -4050,12 +5132,32 @@ namespace Example } ``` +#### Using the UpdateAConferenceWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Update a Conference + apiInstance.UpdateAConferenceWithHttpInfo(conferenceId, updateConferenceRequest); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.UpdateAConferenceWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **conferenceId** | **string**| String that uniquely identifies this conference resource. | - **updateConferenceRequest** | [**UpdateConferenceRequest**](UpdateConferenceRequest.md)| Conference Details to update | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **conferenceId** | **string** | String that uniquely identifies this conference resource. | | + +| **updateConferenceRequest** | [**UpdateConferenceRequest?**](UpdateConferenceRequest?.md) | Conference Details to update | [optional] | ### Return type @@ -4079,7 +5181,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) - + # **UpdateALiveCall** > void UpdateALiveCall (string callId, UpdateCallRequest updateCallRequest) @@ -4102,25 +5204,24 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var callId = "callId_example"; // string | String that uniquely identifies this call resource. - - - var updateCallRequest = new UpdateCallRequest(Status={ }); // UpdateCallRequest | Call details to update - + + var updateCallRequest = new UpdateCallRequest(); // UpdateCallRequest | Call details to update + try { // Update a Live Call - apiInstance.UpdateALiveCall(callId, updateCallRequest); + apiInstance.UpdateALiveCall(callId, updateCallRequest); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.UpdateALiveCall: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.UpdateALiveCall: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -4128,12 +5229,32 @@ namespace Example } ``` +#### Using the UpdateALiveCallWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Update a Live Call + apiInstance.UpdateALiveCallWithHttpInfo(callId, updateCallRequest); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.UpdateALiveCallWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **callId** | **string**| String that uniquely identifies this call resource. | - **updateCallRequest** | [**UpdateCallRequest**](UpdateCallRequest.md)| Call details to update | +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **callId** | **string** | String that uniquely identifies this call resource. | | + +| **updateCallRequest** | [**UpdateCallRequest**](UpdateCallRequest.md) | Call details to update | | ### Return type @@ -4157,9 +5278,9 @@ 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) - + # **UpdateAParticipant** -> ConferenceParticipantResult UpdateAParticipant (string conferenceId, string callId, UpdateConferenceParticipantRequest updateConferenceParticipantRequest = null) +> ConferenceParticipantResult UpdateAParticipant (string conferenceId, string callId, UpdateConferenceParticipantRequest? updateConferenceParticipantRequest = null) Update a Participant @@ -4180,28 +5301,27 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var conferenceId = "conferenceId_example"; // string | ID of the conference this participant is in. - + var callId = "callId_example"; // string | ID of the Call associated with this participant. - - - var updateConferenceParticipantRequest = new UpdateConferenceParticipantRequest(Talk={ (Optional) Default is `true`. Setting to `false` mutes the Participant. FreeClimb returns an error and ignores any other value. }, Listen={ (Optional) Default is `true`. Setting to `false` silences the Conference for this Participant. FreeClimb returns an error and ignores any other value. }, DtmfPassThrough={ (Optional) Default is `true`. Setting to `false` mutes dtmf audio for this Participant. FreeClimb returns an error and ignores any other value. }); // UpdateConferenceParticipantRequest | Conference participant details to update (optional) - + + var updateConferenceParticipantRequest = new UpdateConferenceParticipantRequest?(); // UpdateConferenceParticipantRequest? | Conference participant details to update (optional) + try { // Update a Participant ConferenceParticipantResult result = apiInstance.UpdateAParticipant(conferenceId, callId, updateConferenceParticipantRequest); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.UpdateAParticipant: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.UpdateAParticipant: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -4209,13 +5329,37 @@ namespace Example } ``` +#### Using the UpdateAParticipantWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Update a Participant + ApiResponse response = apiInstance.UpdateAParticipantWithHttpInfo(conferenceId, callId, updateConferenceParticipantRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.UpdateAParticipantWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **conferenceId** | **string**| ID of the conference this participant is in. | - **callId** | **string**| ID of the Call associated with this participant. | - **updateConferenceParticipantRequest** | [**UpdateConferenceParticipantRequest**](UpdateConferenceParticipantRequest.md)| Conference participant details to update | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **conferenceId** | **string** | ID of the conference this participant is in. | | + +| **callId** | **string** | ID of the Call associated with this participant. | | + +| **updateConferenceParticipantRequest** | [**UpdateConferenceParticipantRequest?**](UpdateConferenceParticipantRequest?.md) | Conference participant details to update | [optional] | ### Return type @@ -4239,9 +5383,9 @@ 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) - + # **UpdateAQueue** -> QueueResult UpdateAQueue (string queueId, QueueRequest queueRequest = null) +> QueueResult UpdateAQueue (string queueId, QueueRequest? queueRequest = null) Update a Queue @@ -4262,26 +5406,25 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var queueId = "queueId_example"; // string | A string that uniquely identifies this Queue resource. - - - var queueRequest = new QueueRequest(Alias={ Description for this Queue. Max length is 64 characters. }, MaxSize={ 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. }); // QueueRequest | Queue Details to update (optional) - + + var queueRequest = new QueueRequest?(); // QueueRequest? | Queue Details to update (optional) + try { // Update a Queue QueueResult result = apiInstance.UpdateAQueue(queueId, queueRequest); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.UpdateAQueue: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.UpdateAQueue: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -4289,12 +5432,35 @@ namespace Example } ``` +#### Using the UpdateAQueueWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Update a Queue + ApiResponse response = apiInstance.UpdateAQueueWithHttpInfo(queueId, queueRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.UpdateAQueueWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **queueId** | **string**| A string that uniquely identifies this Queue resource. | - **queueRequest** | [**QueueRequest**](QueueRequest.md)| Queue Details to update | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **queueId** | **string** | A string that uniquely identifies this Queue resource. | | + +| **queueRequest** | [**QueueRequest?**](QueueRequest?.md) | Queue Details to update | [optional] | ### Return type @@ -4318,9 +5484,9 @@ 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) - + # **UpdateAnAccount** -> void UpdateAnAccount (AccountRequest accountRequest = null) +> void UpdateAnAccount (AccountRequest? accountRequest = null) Manage an account @@ -4341,23 +5507,22 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); - - var accountRequest = new AccountRequest(Alias={ Description for this account. }, Label={ Group to which this account belongs. }); // AccountRequest | Account details to update (optional) - + var accountRequest = new AccountRequest?(); // AccountRequest? | Account details to update (optional) + try { // Manage an account - apiInstance.UpdateAnAccount(accountRequest); + apiInstance.UpdateAnAccount(accountRequest); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.UpdateAnAccount: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.UpdateAnAccount: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -4365,11 +5530,30 @@ namespace Example } ``` +#### Using the UpdateAnAccountWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Manage an account + apiInstance.UpdateAnAccountWithHttpInfo(accountRequest); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.UpdateAnAccountWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **accountRequest** | [**AccountRequest**](AccountRequest.md)| Account details to update | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **accountRequest** | [**AccountRequest?**](AccountRequest?.md) | Account details to update | [optional] | ### Return type @@ -4393,9 +5577,9 @@ 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) - + # **UpdateAnApplication** -> ApplicationResult UpdateAnApplication (string applicationId, ApplicationRequest applicationRequest = null) +> ApplicationResult UpdateAnApplication (string applicationId, ApplicationRequest? applicationRequest = null) Update an application @@ -4416,26 +5600,25 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var applicationId = "applicationId_example"; // string | A string that uniquely identifies this application resource. - - - var applicationRequest = new ApplicationRequest(Alias={ A human readable description of the application, with maximum length 64 characters. }, VoiceUrl={ The URL that FreeClimb will request when an inbound call arrives on a phone number assigned to this application. Used only for inbound calls. }, VoiceFallbackUrl={ 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. }, CallConnectUrl={ 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. }, StatusCallbackUrl={ 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. }, SmsUrl={ 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. }, SmsFallbackUrl={ 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. }); // ApplicationRequest | Application details to update. (optional) - + + var applicationRequest = new ApplicationRequest?(); // ApplicationRequest? | Application details to update. (optional) + try { // Update an application ApplicationResult result = apiInstance.UpdateAnApplication(applicationId, applicationRequest); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.UpdateAnApplication: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.UpdateAnApplication: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -4443,12 +5626,35 @@ namespace Example } ``` +#### Using the UpdateAnApplicationWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Update an application + ApiResponse response = apiInstance.UpdateAnApplicationWithHttpInfo(applicationId, applicationRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.UpdateAnApplicationWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **applicationId** | **string**| A string that uniquely identifies this application resource. | - **applicationRequest** | [**ApplicationRequest**](ApplicationRequest.md)| Application details to update. | [optional] +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **applicationId** | **string** | A string that uniquely identifies this application resource. | | + +| **applicationRequest** | [**ApplicationRequest?**](ApplicationRequest?.md) | Application details to update. | [optional] | ### Return type @@ -4472,9 +5678,9 @@ 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) - + # **UpdateAnIncomingNumber** -> IncomingNumberResult UpdateAnIncomingNumber (string phoneNumberId, IncomingNumberRequest incomingNumberRequest = null) +> IncomingNumberResult UpdateAnIncomingNumber (string phoneNumberId, IncomingNumberRequest? incomingNumberRequest = null) Update an Incoming Number @@ -4495,26 +5701,25 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "https://www.freeclimb.com/apiserver"; // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; var apiInstance = new DefaultApi(config); var phoneNumberId = "phoneNumberId_example"; // string | String that uniquely identifies this phone number resource. - - - var incomingNumberRequest = new IncomingNumberRequest(ApplicationId={ ID of the Application that should handle calls to this number. }, Alias={ Description for this phone number. }, CampaignId={ The campaign ID generated by the campaign registry }); // IncomingNumberRequest | Incoming Number details to update (optional) - + + var incomingNumberRequest = new IncomingNumberRequest?(); // IncomingNumberRequest? | Incoming Number details to update (optional) + try { // Update an Incoming Number IncomingNumberResult result = apiInstance.UpdateAnIncomingNumber(phoneNumberId, incomingNumberRequest); - Debug.WriteLine(result); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.UpdateAnIncomingNumber: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print("Exception when calling DefaultApi.UpdateAnIncomingNumber: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); Debug.Print(e.StackTrace); } } @@ -4522,93 +5727,40 @@ namespace Example } ``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **phoneNumberId** | **string**| String that uniquely identifies this phone number resource. | - **incomingNumberRequest** | [**IncomingNumberRequest**](IncomingNumberRequest.md)| Incoming Number details to update | [optional] - - -### Return type - -[**IncomingNumberResult**](IncomingNumberResult.md) - -### Authorization - -[fc](../README.md#fc) +#### Using the UpdateAnIncomingNumberWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Updated Incoming Phone Number | - | - -[[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) - - -# **GetNextPage** -> T GetNextPage(T: response) where T : PaginationModel - -Get next page of a paginated resource - -### Example ```csharp -using System.Collections.Generic; -using System.Diagnostics; -using freeclimb.Api; -using freeclimb.Client; -using freeclimb.Model; - -namespace Example +try { - public class GetNextPageExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://www.freeclimb.com/apiserver"; - // Configure HTTP basic authorization: fc - config.Username = "YOUR_ACCOUNT_ID"; - config.Password = "YOUR_API_KEY"; - - var apiInstance = new DefaultApi(config); - - var alias = "alias_example"; // string | Return only applications with aliases that exactly match this value. (optional) - - - try - { - // List applications - ApplicationList result = apiInstance.ListApplications(alias); - Debug.WriteLine(result); - ApplicationList nextPageResult = apiInstance.GetNextPage(result); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } + // Update an Incoming Number + ApiResponse response = apiInstance.UpdateAnIncomingNumberWithHttpInfo(phoneNumberId, incomingNumberRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling DefaultApi.UpdateAnIncomingNumberWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); } ``` ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | T where T : PaginationModel | The response from previous request to list paginated resource | + +| Name | Type | Description | Notes | +|------|------|-------------|-------| + + +| **phoneNumberId** | **string** | String that uniquely identifies this phone number resource. | | + +| **incomingNumberRequest** | [**IncomingNumberRequest?**](IncomingNumberRequest?.md) | Incoming Number details to update | [optional] | + ### Return type -T where T : PaginationModel +[**IncomingNumberResult**](IncomingNumberResult.md) ### Authorization @@ -4616,14 +5768,14 @@ T where T : PaginationModel ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| 200 | Successfully retrieved resource | - | +| **200** | Updated Incoming Phone Number | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/Dequeue.md b/docs/Dequeue.md index 443f0cfe..f7d13381 100644 --- a/docs/Dequeue.md +++ b/docs/Dequeue.md @@ -1,14 +1,11 @@ # freeclimb.Model.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** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 00000000..93e4695e --- /dev/null +++ b/docs/DequeueWebhook.md @@ -0,0 +1,21 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | 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] +**CallId** | **string** | Unique ID for this Call, generated by FreeClimb. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | Unique ID of the Conference. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**QueueResult** | **string** | 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] +**QueueTime** | **int?** | Time (in seconds) the call spent in the Queue. This is only available if the Call was actually enqueued. | [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/Enqueue.md b/docs/Enqueue.md index a989eb22..22db99ff 100644 --- a/docs/Enqueue.md +++ b/docs/Enqueue.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -11,8 +11,5 @@ Name | Type | Description | Notes **QueueId** | **string** | 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. | **WaitUrl** | **string** | 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. | -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 0d7b3e2a..00000000 --- a/docs/EnqueueAllOf.md +++ /dev/null @@ -1,17 +0,0 @@ -# freeclimb.Model.EnqueueAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActionUrl** | **string** | 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. | -**NotificationUrl** | **string** | 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] -**QueueId** | **string** | 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. | -**WaitUrl** | **string** | 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. | - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 35c46014..26fdb1c8 100644 --- a/docs/FilterLogsRequest.md +++ b/docs/FilterLogsRequest.md @@ -1,14 +1,10 @@ # freeclimb.Model.FilterLogsRequest - ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Pql** | **string** | The filter query for retrieving logs. See **Performance Query Language** below. | -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 9be0ee53..e4943b8f 100644 --- a/docs/GetDigits.md +++ b/docs/GetDigits.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -16,8 +16,5 @@ Name | Type | Description | Notes **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] **PrivacyMode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 272d770c..00000000 --- a/docs/GetDigitsAllOf.md +++ /dev/null @@ -1,22 +0,0 @@ -# freeclimb.Model.GetDigitsAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActionUrl** | **string** | 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. | -**DigitTimeoutMs** | **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] -**FinishOnKey** | **string** | 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] -**FlushBuffer** | **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] -**InitialTimeoutMs** | **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] -**MaxDigits** | **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] -**MinDigits** | **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** | [**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] -**PrivacyMode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..eb69542f --- /dev/null +++ b/docs/GetDigitsReason.md @@ -0,0 +1,14 @@ +# freeclimb.Enums.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. +## Properties + +Name | Value | Notes +------------ | ------------- | ------------- +**FINISH_KEY** | finishKey | Represented in C# as 1 +**TIMEOUT** | timeout | Represented in C# as 2 +**MAX_DIGITS** | maxDigits | Represented in C# as 3 +**TONE** | tone | Represented in C# as 4 + +[[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 00000000..4b823d40 --- /dev/null +++ b/docs/GetDigitsWebhook.md @@ -0,0 +1,22 @@ +# freeclimb.Model.GetDigitsWebhook + +A POST request with the following fields will be sent to the actionUrl provided in your GetDigits command. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | Context or reason why this request is being made. Will be getDigits - The GetDigits command has completed and its actionUrl is being invoked. | [optional] +**CallId** | **string** | Unique ID for this Call, generated by FreeClimb. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | Unique ID of the Conference. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**Digits** | **string** | 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** | | [optional] +**ParentCallId** | **string** | ID of the Call that created this leg (child 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/GetSpeech.md b/docs/GetSpeech.md index 0b176b31..dfe6fa77 100644 --- a/docs/GetSpeech.md +++ b/docs/GetSpeech.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -20,8 +20,5 @@ Name | Type | Description | Notes **SpeechIncompleteTimeoutMs** | **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] **PrivacyMode** | **bool** | Parameter privacyMode will not log the `text` as required by PCI compliance. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 c2818b8e..00000000 --- a/docs/GetSpeechAllOf.md +++ /dev/null @@ -1,26 +0,0 @@ -# freeclimb.Model.GetSpeechAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActionUrl** | **string** | 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. | -**GrammarType** | **GrammarType** | | [optional] -**GrammarFile** | **string** | The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL. | -**GrammarRule** | **string** | 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] -**PlayBeep** | **bool** | Indicates whether a beep should be played just before speech recognition is initiated so that the speaker can start to speak. | [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] -**NoInputTimeoutMs** | **int** | When recognition is started and there is no speech detected for `noInputTimeoutMs` milliseconds, the recognizer will terminate the recognition operation. | [optional] -**RecognitionTimeoutMs** | **int** | When playback of prompts ends and there is no match for `recognitionTimeoutMs` milliseconds, the recognizer will terminate the recognition operation. | [optional] -**ConfidenceThreshold** | **decimal** | 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] -**SensitivityLevel** | **decimal** | 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] -**SpeechCompleteTimeoutMs** | **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] -**SpeechIncompleteTimeoutMs** | **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] -**PrivacyMode** | **bool** | Parameter privacyMode will not log the `text` as required by PCI compliance. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 c8271ce8..5a1cd801 100644 --- a/docs/GetSpeechReason.md +++ b/docs/GetSpeechReason.md @@ -11,9 +11,5 @@ Name | Value | Notes **NO_MATCH** | noMatch | Represented in C# as 5 **RECOGNITION** | recognition | Represented in C# as 6 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..6e779dde --- /dev/null +++ b/docs/GetSpeechWebhook.md @@ -0,0 +1,27 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | Context or reason why this request is being made. Will be getSpeech - The GetSpeech command has completed and its actionUrl is being invoked. | [optional] +**CallId** | **string** | Unique ID for this Call, generated by FreeClimb. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | Unique ID of the Conference. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**Reason** | **GetSpeechReason** | | [optional] +**RecognitionResult** | **string** | 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] +**ParentCallId** | **string** | ID of the Call that created this leg (child call). | [optional] +**CompletionReason** | **string** | Advanced diagnostic information if reason was error. See RFC 6787 section 9.4.12 - speech recognition. | [optional] +**CompletionCause** | **string** | Advanced diagnostic information if reason was error. See RFC 6787 section 9.4.11 - speech recognition. | [optional] +**MrcpCode** | **int** | Advanced diagnostic information if reason was error. See RFC 6787 section 5.4 - MRCPv2 specification. | [optional] +**MrcpDiagnostic** | **string** | Advanced diagnostic information if reason was error. See RFC 6787 section 5.4 - MRCPv2 specification. | [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/GrammarFileBuiltIn.md b/docs/GrammarFileBuiltIn.md index 9978d20a..fab86ea3 100644 --- a/docs/GrammarFileBuiltIn.md +++ b/docs/GrammarFileBuiltIn.md @@ -20,9 +20,5 @@ Name | Value | Notes **UP_TO_20_DIGIT_SEQUENCE** | UP_TO_20_DIGIT_SEQUENCE | Represented in C# as 14 **VERSAY_YESNO** | VERSAY_YESNO | Represented in C# as 15 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 2cfb843c..9fc85ef5 100644 --- a/docs/GrammarType.md +++ b/docs/GrammarType.md @@ -1,5 +1,6 @@ # freeclimb.Enums.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 | Value | Notes @@ -7,9 +8,5 @@ Name | Value | Notes **URL** | URL | Represented in C# as 1 **BUILT_IN** | BUILTIN | Represented in C# as 2 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 a70f8798..b3f6a8bd 100644 --- a/docs/Hangup.md +++ b/docs/Hangup.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -8,8 +8,5 @@ Name | Type | Description | Notes **Command** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] **Reason** | **string** | 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] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 598d9d09..00000000 --- a/docs/HangupAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.HangupAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Reason** | **string** | 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] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 12b4673e..932b7969 100644 --- a/docs/IfMachine.md +++ b/docs/IfMachine.md @@ -1,5 +1,6 @@ # freeclimb.Enums.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 | Value | Notes @@ -7,9 +8,5 @@ Name | Value | Notes **REDIRECT** | redirect | Represented in C# as 1 **HANGUP** | hangup | Represented in C# as 2 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..eba47456 --- /dev/null +++ b/docs/InboundCallWebhook.md @@ -0,0 +1,20 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | Context or reason why this request is being made. Will be inboundCall - An inbound call was received and the voiceUrl is being invoked. | [optional] +**CallId** | **string** | Unique ID for this Call, generated by FreeClimb. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | This is only populated if request pertains to a Conference. Otherwise, it is set to null. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**ParentCallId** | **string** | | [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/IncomingNumberList.md b/docs/IncomingNumberList.md index 7f0343b3..df1af922 100644 --- a/docs/IncomingNumberList.md +++ b/docs/IncomingNumberList.md @@ -1,6 +1,5 @@ # freeclimb.Model.IncomingNumberList - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **IncomingPhoneNumbers** | [**List<IncomingNumberResult>**](IncomingNumberResult.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 809b2f00..00000000 --- a/docs/IncomingNumberListAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.IncomingNumberListAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**IncomingPhoneNumbers** | [**List<IncomingNumberResult>**](IncomingNumberResult.md) | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 976b7913..ccdf10de 100644 --- a/docs/IncomingNumberRequest.md +++ b/docs/IncomingNumberRequest.md @@ -1,6 +1,5 @@ # freeclimb.Model.IncomingNumberRequest - ## Properties Name | Type | Description | Notes @@ -9,8 +8,5 @@ Name | Type | Description | Notes **Alias** | **string** | Description for this phone number. | [optional] **CampaignId** | **string** | The campaign ID generated by the campaign registry | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 b106625c..1324253d 100644 --- a/docs/IncomingNumberResult.md +++ b/docs/IncomingNumberResult.md @@ -1,6 +1,5 @@ # freeclimb.Model.IncomingNumberResult - ## Properties Name | Type | Description | Notes @@ -23,8 +22,5 @@ Name | Type | Description | Notes **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] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 393cf303..00000000 --- a/docs/IncomingNumberResultAllOf.md +++ /dev/null @@ -1,26 +0,0 @@ -# freeclimb.Model.IncomingNumberResultAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Capabilities** | [**Capabilities**](Capabilities.md) | | [optional] -**CampaignId** | **string** | The campaign ID generated by the campaign registry | [optional] -**PhoneNumberId** | **string** | String that uniquely identifies this phone number resource. | [optional] -**AccountId** | **string** | ID of the account that owns this phone number. | [optional] -**ApplicationId** | **string** | 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] -**PhoneNumber** | **string** | Phone number in E.164 format. | [optional] -**Alias** | **string** | Description for this phone number. Typically the conventionally-formatted version of the phone number. | [optional] -**Region** | **string** | State or province of this phone number. | [optional] -**Country** | **string** | Country of this phone number. | [optional] -**VoiceEnabled** | **bool?** | Indicates whether the phone number can handle Calls. Typically set to true for all numbers. | [optional] -**SmsEnabled** | **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] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 0238b2ce..cd025fcd 100644 --- a/docs/Language.md +++ b/docs/Language.md @@ -31,9 +31,5 @@ Name | Value | Notes **CHINESE_HK** | zh-HK | Represented in C# as 25 **CHINESE_TW** | zh-TW | Represented in C# as 26 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..e1e064cb --- /dev/null +++ b/docs/LeaveConferenceWebhook.md @@ -0,0 +1,19 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | 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] +**CallId** | **string** | Unique ID for this Call, generated by FreeClimb. This is the call leg which has left the Conference | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | This is only populated if request pertains to a Conference. Otherwise, it is set to null. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [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/LogLevel.md b/docs/LogLevel.md index 23c3dc6a..9cb97ef4 100644 --- a/docs/LogLevel.md +++ b/docs/LogLevel.md @@ -1,5 +1,6 @@ # freeclimb.Enums.LogLevel +Level of the log. Possible values are info, warning, and error. ## Properties Name | Value | Notes @@ -8,9 +9,5 @@ Name | Value | Notes **WARNING** | warning | Represented in C# as 2 **ERROR** | error | Represented in C# as 3 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 9374b1f0..6fb437c5 100644 --- a/docs/LogList.md +++ b/docs/LogList.md @@ -1,6 +1,5 @@ # freeclimb.Model.LogList - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **Logs** | [**List<LogResult>**](LogResult.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 e213b205..00000000 --- a/docs/LogListAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.LogListAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Logs** | [**List<LogResult>**](LogResult.md) | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 c4761502..78e97af9 100644 --- a/docs/LogResult.md +++ b/docs/LogResult.md @@ -1,6 +1,5 @@ # freeclimb.Model.LogResult - ## Properties Name | Type | Description | Notes @@ -13,8 +12,5 @@ Name | Type | Description | Notes **Message** | **string** | 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] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 00000000..9927afb8 --- /dev/null +++ b/docs/MachineDetectedWebhook.md @@ -0,0 +1,21 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | 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] +**CallId** | **string** | Unique ID for this Call, generated by FreeClimb. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | This is only populated if request pertains to a Conference. Otherwise, it is set to null. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a Queue. Otherwise, it is set to null. | [optional] +**ParentCallId** | **string** | Call ID of the leg which initiated the OutDial. | [optional] +**MachineType** | **MachineType** | | [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/MachineType.md b/docs/MachineType.md index dec9d341..f2cf0252 100644 --- a/docs/MachineType.md +++ b/docs/MachineType.md @@ -4,12 +4,8 @@ Name | Value | Notes ------------ | ------------- | ------------- -**ANSWERING_MACHINE** | answeringMachine | Represented in C# as 1 -**FAX_MACHINE** | faxMachine | Represented in C# as 2 +**ANSWERING_MACHINE** | answering machine | Represented in C# as 1 +**FAX_MODEM** | fax modem | Represented in C# as 2 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 4a9ec19f..0195336d 100644 --- a/docs/MakeCallRequest.md +++ b/docs/MakeCallRequest.md @@ -1,6 +1,5 @@ # freeclimb.Model.MakeCallRequest - ## Properties Name | Type | Description | Notes @@ -16,8 +15,5 @@ Name | Type | Description | Notes **PrivacyMode** | **bool** | Activate privacy mode in order to obscure log data that can potentially expose private information. | [optional] **CallConnectUrl** | **string** | 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] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 00000000..f947bc99 --- /dev/null +++ b/docs/MessageDeliveryWebhook.md @@ -0,0 +1,20 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | 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] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to you and to which this Call is directed (in E.164 format). | [optional] +**Text** | **string** | Body of the SMS message. | [optional] +**Direction** | **string** | Value will be inbound to indicate the receipt of a message into the FreeClimb platform. | [optional] +**ApplicationId** | **string** | ID of the application to which the destination number is assigned. | [optional] +**Status** | **string** | Value will be received to indicate that the platform has successfully received the incoming message. | [optional] +**PhoneNumberId** | **string** | ID of the destination phone number. | [optional] +**Uri** | **string** | The URI for this resource, relative to the API base URL | [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/MessageDirection.md b/docs/MessageDirection.md index 0c2f0006..9c9dede6 100644 --- a/docs/MessageDirection.md +++ b/docs/MessageDirection.md @@ -7,9 +7,5 @@ Name | Value | Notes **INBOUND** | inbound | Represented in C# as 1 **OUTBOUND** | outbound | Represented in C# as 2 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 ee04c911..1c496881 100644 --- a/docs/MessageRequest.md +++ b/docs/MessageRequest.md @@ -1,6 +1,5 @@ # freeclimb.Model.MessageRequest - ## Properties Name | Type | Description | Notes @@ -15,8 +14,5 @@ Name | Type | Description | Notes **NotificationUrl** | **string** | 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] **MediaUrls** | **List<string>** | 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] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 153dcb41..00000000 --- a/docs/MessageRequestAllOf.md +++ /dev/null @@ -1,18 +0,0 @@ -# freeclimb.Model.MessageRequestAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**From** | **string** | Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb. | -**To** | **string** | Phone number to receive the message. Must be within FreeClimb's service area. | -**Text** | **string** | Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported. | -**NotificationUrl** | **string** | 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] -**MediaUrls** | **List<string>** | 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] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 36b775d7..e89c9fb1 100644 --- a/docs/MessageResult.md +++ b/docs/MessageResult.md @@ -1,6 +1,5 @@ # freeclimb.Model.MessageResult - ## Properties Name | Type | Description | Notes @@ -22,8 +21,5 @@ Name | Type | Description | Notes **SegmentCount** | **decimal?** | The number of segments into which the message was split | [optional] **MediaUrls** | **List<string>** | an array of HTTP URLs which were attached this this message | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 79921829..00000000 --- a/docs/MessageResultAllOf.md +++ /dev/null @@ -1,25 +0,0 @@ -# freeclimb.Model.MessageResultAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccountId** | **string** | String that uniquely identifies this account resource. | [optional] -**MessageId** | **string** | String that uniquely identifies this message resource | [optional] -**Status** | **MessageStatus** | | [optional] -**From** | **string** | Phone number in E.164 format that sent the message. | [optional] -**To** | **string** | Phone number in E.164 format that received the message. | [optional] -**Text** | **string** | Message contents | [optional] -**Direction** | **string** | Noting whether the message was inbound or outbound | [optional] -**NotificationUrl** | **string** | URL invoked when message sent | [optional] -**BrandId** | **string** | The unique identifier for the brand associated with the message | [optional] -**CampaignId** | **string** | The unique identifier for the campaign associated with the message | [optional] -**SegmentCount** | **decimal?** | The number of segments into which the message was split | [optional] -**MediaUrls** | **List<string>** | an array of HTTP URLs which were attached this this message | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 05a1f8f8..8b344d7a 100644 --- a/docs/MessageStatus.md +++ b/docs/MessageStatus.md @@ -1,5 +1,6 @@ # freeclimb.Enums.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 | Value | Notes @@ -16,9 +17,5 @@ Name | Value | Notes **DELETED** | deleted | Represented in C# as 10 **UNKNOWN** | unknown | Represented in C# as 11 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..abfc9dbb --- /dev/null +++ b/docs/MessageStatusWebhook.md @@ -0,0 +1,21 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | Value will be messageStatus - An outbound SMS has changed status and the Sms command's notificationUrl is being invoked. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**MessageId** | **string** | Unique ID for this message, generated by FreeClimb. | [optional] +**CallId** | **string** | Unique ID for the Call in the context of which the Sms PerCL command was issued. | [optional] +**From** | **string** | aPhone number used to initiate the SMS message (in E.164 format). | [optional] +**To** | **string** | Destination number of the SMS message (in E.164 format). | [optional] +**Text** | **string** | Body of the SMS message. | [optional] +**Direction** | **string** | Value will be outbound to indicate an outgoing SMS from FreeClimb. | [optional] +**ApplicationId** | **string** | 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** | | [optional] +**PhoneNumberId** | **string** | ID of the destination phone number. | [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/MessagesList.md b/docs/MessagesList.md index ef09f838..33deda02 100644 --- a/docs/MessagesList.md +++ b/docs/MessagesList.md @@ -1,6 +1,5 @@ # freeclimb.Model.MessagesList - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **Messages** | [**List<MessageResult>**](MessageResult.md) | Array of messages | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 24c195c2..00000000 --- a/docs/MessagesListAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.MessagesListAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Messages** | [**List<MessageResult>**](MessageResult.md) | Array of messages | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 7d4ae71b..cf2cfd7b 100644 --- a/docs/MutableResourceModel.md +++ b/docs/MutableResourceModel.md @@ -1,6 +1,5 @@ # freeclimb.Model.MutableResourceModel - ## Properties Name | Type | Description | Notes @@ -10,8 +9,5 @@ Name | Type | Description | Notes **DateUpdated** | **string** | 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] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 b7a6d42f..69aa52a9 100644 --- a/docs/OutDial.md +++ b/docs/OutDial.md @@ -1,6 +1,6 @@ # freeclimb.Model.OutDial - +The OutDial command is used to call a phone number ## Properties Name | Type | Description | Notes @@ -17,8 +17,5 @@ Name | Type | Description | Notes **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] **PrivacyMode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 c4236dde..00000000 --- a/docs/OutDialAllOf.md +++ /dev/null @@ -1,23 +0,0 @@ -# freeclimb.Model.OutDialAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActionUrl** | **string** | URL to which FreeClimb sends an HTTP POST request. | -**CallConnectUrl** | **string** | URL to which FreeClimb makes an HTTP POST request informing the result of the OutDial. | -**CallingNumber** | **string** | 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** | **string** | E.164 representation of the phone number to Call. | -**IfMachine** | **IfMachine** | | [optional] -**IfMachineUrl** | **string** | 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] -**SendDigits** | **string** | DTMF tones to play to the outdialed Call. This is typically used to dial a number and then dial an extension. | [optional] -**StatusCallbackUrl** | **string** | 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] -**PrivacyMode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..42415328 --- /dev/null +++ b/docs/OutDialApiConnectWebhook.md @@ -0,0 +1,20 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | 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] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**CallId** | **string** | Unique identifier for this Call, generated by FreeClimb | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number or SIP URL of the party that is receiving the call (phone number in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | This is only populated if request pertains to a conference. Otherwise, it is set to null. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a queue. Otherwise, it is set to null. | [optional] +**ParentCallId** | **string** | ID of the Call that created this leg (child 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/OutDialConnectWebhook.md b/docs/OutDialConnectWebhook.md new file mode 100644 index 00000000..0db2013f --- /dev/null +++ b/docs/OutDialConnectWebhook.md @@ -0,0 +1,20 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | 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] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**CallId** | **string** | Unique identifier for this Call, generated by FreeClimb | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number or SIP URL of the party that is receiving the call (phone number in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | This is only populated if request pertains to a conference. Otherwise, it is set to null. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a queue. Otherwise, it is set to null. | [optional] +**ParentCallId** | **string** | ID of the Call that created this leg (child 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/OutDialStartWebhook.md b/docs/OutDialStartWebhook.md new file mode 100644 index 00000000..afca1300 --- /dev/null +++ b/docs/OutDialStartWebhook.md @@ -0,0 +1,21 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | Context or reason why this request is being made. Will be outDialStart - The OutDial command has started and the actionUrl is being invoked. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**CallId** | **string** | Unique identifier for this Call, generated by FreeClimb | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to the customer and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | This is only populated if request pertains to a conference. Otherwise, it is set to null. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a queue. Otherwise, it is set to null. | [optional] +**DialCallId** | **string** | ID of the child call that was generated as a result of the Outdial. | [optional] +**ParentCallId** | **string** | 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] + +[[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 ae2d7034..228e4482 100644 --- a/docs/PaginationModel.md +++ b/docs/PaginationModel.md @@ -1,6 +1,5 @@ # freeclimb.Model.PaginationModel - ## Properties Name | Type | Description | Notes @@ -13,8 +12,5 @@ Name | Type | Description | Notes **PageSize** | **int?** | Number of items per page | [optional] **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 124c6057..5052708f 100644 --- a/docs/Park.md +++ b/docs/Park.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -10,8 +10,5 @@ Name | Type | Description | Notes **ActionUrl** | **string** | 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. | **NotificationUrl** | **string** | URL to be invoked when the Call is parked. The request to the URL contains the standard request parameters. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 892cb8ca..00000000 --- a/docs/ParkAllOf.md +++ /dev/null @@ -1,16 +0,0 @@ -# freeclimb.Model.ParkAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**WaitUrl** | **string** | 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. | -**ActionUrl** | **string** | 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. | -**NotificationUrl** | **string** | URL to be invoked when the Call is parked. The request to the URL contains the standard request parameters. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 ea5e9783..ec925a41 100644 --- a/docs/Pause.md +++ b/docs/Pause.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -8,8 +8,5 @@ Name | Type | Description | Notes **Command** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] **Length** | **int** | Length in milliseconds. FreeClimb will wait silently before continuing on. | -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 54d1e13d..00000000 --- a/docs/PauseAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.PauseAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Length** | **int** | Length in milliseconds. FreeClimb will wait silently before continuing on. | - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 71fff235..dcf909c4 100644 --- a/docs/PerclCommand.md +++ b/docs/PerclCommand.md @@ -1,14 +1,11 @@ # freeclimb.Model.PerclCommand - +An individual command used in a PerCLScript. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Command** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 5f9f6d61..45758a58 100644 --- a/docs/PerclScript.md +++ b/docs/PerclScript.md @@ -1,14 +1,11 @@ # freeclimb.Model.PerclScript - +A PerCL script to be returned to the FreeClimb servers in FreeClimb applications ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Commands** | [**List<PerclCommand>**](PerclCommand.md) | A JSON array of PerCL commands | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 1cf9a77d..507e540b 100644 --- a/docs/Play.md +++ b/docs/Play.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -10,8 +10,5 @@ Name | Type | Description | Notes **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] **PrivacyMode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 733251b4..00000000 --- a/docs/PlayAllOf.md +++ /dev/null @@ -1,16 +0,0 @@ -# freeclimb.Model.PlayAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**File** | **string** | 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] -**PrivacyMode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 ad600824..09514589 100644 --- a/docs/PlayBeep.md +++ b/docs/PlayBeep.md @@ -1,5 +1,6 @@ # freeclimb.Enums.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 | Value | Notes @@ -9,9 +10,5 @@ Name | Value | Notes **ENTRY_ONLY** | entryOnly | Represented in C# as 3 **EXIT_ONLY** | exitOnly | Represented in C# as 4 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 06e1346d..d5d62dff 100644 --- a/docs/PlayEarlyMedia.md +++ b/docs/PlayEarlyMedia.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -8,8 +8,5 @@ Name | Type | Description | Notes **Command** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] **File** | **string** | 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. | -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 e45f1281..00000000 --- a/docs/PlayEarlyMediaAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.PlayEarlyMediaAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**File** | **string** | 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. | - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 e09a766e..5da654db 100644 --- a/docs/QueueList.md +++ b/docs/QueueList.md @@ -1,6 +1,5 @@ # freeclimb.Model.QueueList - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **Queues** | [**List<QueueResult>**](QueueResult.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 2d79db90..00000000 --- a/docs/QueueListAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.QueueListAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Queues** | [**List<QueueResult>**](QueueResult.md) | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 04f1b904..b72873ea 100644 --- a/docs/QueueMember.md +++ b/docs/QueueMember.md @@ -1,6 +1,5 @@ # freeclimb.Model.QueueMember - ## Properties Name | Type | Description | Notes @@ -11,8 +10,5 @@ Name | Type | Description | Notes **Position** | **int?** | Member's current position in the Queue, 1 indexed. | [optional] **DateEnqueued** | **string** | Date that the Member was enqueued (GMT), given in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT). | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 72fed79c..f3ecc0f1 100644 --- a/docs/QueueMemberList.md +++ b/docs/QueueMemberList.md @@ -1,6 +1,5 @@ # freeclimb.Model.QueueMemberList - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **QueueMembers** | [**List<QueueMember>**](QueueMember.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 7ac975d5..00000000 --- a/docs/QueueMemberListAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.QueueMemberListAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**QueueMembers** | [**List<QueueMember>**](QueueMember.md) | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 e343e5b6..58f9e0fd 100644 --- a/docs/QueueRequest.md +++ b/docs/QueueRequest.md @@ -1,6 +1,5 @@ # freeclimb.Model.QueueRequest - ## Properties Name | Type | Description | Notes @@ -8,8 +7,5 @@ Name | Type | Description | Notes **Alias** | **string** | Description for this Queue. Max length is 64 characters. | [optional] **MaxSize** | **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] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 da572441..2feacc32 100644 --- a/docs/QueueResult.md +++ b/docs/QueueResult.md @@ -1,6 +1,5 @@ # freeclimb.Model.QueueResult - ## Properties Name | Type | Description | Notes @@ -17,8 +16,5 @@ Name | Type | Description | Notes **AverageQueueRemovalTime** | **int?** | The average amount of time (in seconds) for a call to be removed from the queue. | [optional] **SubresourceUris** | **Object** | List of subresources for this Queue (which includes Queue members). | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 f433563f..00000000 --- a/docs/QueueResultAllOf.md +++ /dev/null @@ -1,20 +0,0 @@ -# freeclimb.Model.QueueResultAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccountId** | **string** | ID of the account that created this Queue. | [optional] -**QueueId** | **string** | A string that uniquely identifies this Queue resource. | [optional] -**Alias** | **string** | A description for this Queue. | [optional] -**MaxSize** | **int?** | The maximum number of Calls permitted in the Queue. Default is 100. Maximum is 1000. | [optional] -**CurrentSize** | **int?** | Count of Calls currently in the Queue. | [optional] -**AverageQueueRemovalTime** | **int?** | The average amount of time (in seconds) for a call to be removed from the queue. | [optional] -**SubresourceUris** | **Object** | List of subresources for this Queue (which includes Queue members). | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 5aca5d97..cb69a2de 100644 --- a/docs/QueueResultStatus.md +++ b/docs/QueueResultStatus.md @@ -9,9 +9,5 @@ Name | Value | Notes **HANGUP** | hangup | Represented in C# as 3 **SYSTEM_ERROR** | systemError | Represented in C# as 4 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..2e0b85c6 --- /dev/null +++ b/docs/QueueWaitWebhook.md @@ -0,0 +1,22 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | 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] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**CallId** | **string** | Unique identifier for this Call, generated by FreeClimb | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to the customer and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | This is only populated if request pertains to a conference. Otherwise, it is set to null. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a queue. Otherwise, it is set to null. | [optional] +**QueuePosition** | **string** | Current queue position of the enqueued Call. | [optional] +**QueueTime** | **int** | Time (in seconds) the Call spent in the Queue. This is only available if the Call was actually enqueued. | [optional] +**CurrentQueueSize** | **int** | Current number of enqueued Calls in this Queue. | [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/RecordUtterance.md b/docs/RecordUtterance.md index 184ca1b2..0dda770f 100644 --- a/docs/RecordUtterance.md +++ b/docs/RecordUtterance.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -14,8 +14,5 @@ Name | Type | Description | Notes **AutoStart** | **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] **PrivacyMode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 46777f37..00000000 --- a/docs/RecordUtteranceAllOf.md +++ /dev/null @@ -1,20 +0,0 @@ -# freeclimb.Model.RecordUtteranceAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActionUrl** | **string** | URL to which information on the completed recording is submitted. The PerCL received in response is then used to continue with Call processing. | -**SilenceTimeoutMs** | **int** | Interval of silence that should elapse before ending the recording. | [optional] -**FinishOnKey** | **string** | Key that triggers the end of the recording. any digit, '#', or '*' | [optional] -**MaxLengthSec** | **int** | Maximum length for the command execution in seconds. | [optional] -**PlayBeep** | **bool** | Indicates whether to play a beep sound before the start of the recording. If set to `false`, no beep is played. | [optional] -**AutoStart** | **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] -**PrivacyMode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 8daa8d0c..aeef2ba7 100644 --- a/docs/RecordUtteranceTermReason.md +++ b/docs/RecordUtteranceTermReason.md @@ -9,9 +9,5 @@ Name | Value | Notes **HANGUP** | hangup | Represented in C# as 3 **MAX_LENGTH** | maxLength | Represented in C# as 4 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..e0a0ca5d --- /dev/null +++ b/docs/RecordWebhook.md @@ -0,0 +1,27 @@ +# freeclimb.Model.RecordWebhook + +The RecordUtterance command has completed and its actionUrl is being invoked. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | 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] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**CallId** | **string** | Unique identifier for this Call, generated by FreeClimb | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to the customer and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | This is only populated if request pertains to a conference. Otherwise, it is set to null. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a queue. Otherwise, it is set to null. | [optional] +**RecordingId** | **string** | ID of the recording. | [optional] +**RecordingUrl** | **string** | 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] +**RecordingSize** | **string** | Size of the recording in bytes | [optional] +**RecordingFormat** | **string** | File type of the recording (audio/wav) | [optional] +**RecordingDurationSec** | **int** | Duration of the recorded audio rounded up to the nearest second (in seconds) | [optional] +**TermReason** | **RecordUtteranceTermReason** | | [optional] +**ParentCallId** | **string** | ID of Call that created this leg (child call). | [optional] +**PrivacyMode** | **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] + +[[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 eb95b388..3a064db4 100644 --- a/docs/RecordingList.md +++ b/docs/RecordingList.md @@ -1,6 +1,5 @@ # freeclimb.Model.RecordingList - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **Recordings** | [**List<RecordingResult>**](RecordingResult.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 06802471..00000000 --- a/docs/RecordingListAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.RecordingListAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Recordings** | [**List<RecordingResult>**](RecordingResult.md) | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 f842d428..b4f2d709 100644 --- a/docs/RecordingResult.md +++ b/docs/RecordingResult.md @@ -1,6 +1,5 @@ # freeclimb.Model.RecordingResult - ## Properties Name | Type | Description | Notes @@ -15,8 +14,5 @@ Name | Type | Description | Notes **DurationSec** | **int?** | Length of the recording in seconds. | [optional] **ConferenceId** | **string** | ID of the Conference that was recorded. If a Call was recorded, this value is empty and the callId property is populated. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 313d35fc..00000000 --- a/docs/RecordingResultAllOf.md +++ /dev/null @@ -1,18 +0,0 @@ -# freeclimb.Model.RecordingResultAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RecordingId** | **string** | String that uniquely identifies this recording resource. | [optional] -**AccountId** | **string** | ID of the account that created this recording. | [optional] -**CallId** | **string** | ID of the Call that was recorded. If a Conference was recorded, this value is empty and the conferenceId property is populated. | [optional] -**DurationSec** | **int?** | Length of the recording in seconds. | [optional] -**ConferenceId** | **string** | ID of the Conference that was recorded. If a Call was recorded, this value is empty and the callId property is populated. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 38b8dc73..e9a00d6a 100644 --- a/docs/Redirect.md +++ b/docs/Redirect.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -8,8 +8,5 @@ Name | Type | Description | Notes **Command** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] **ActionUrl** | **string** | 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. | -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 18c6ad2c..00000000 --- a/docs/RedirectAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.RedirectAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActionUrl** | **string** | 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. | - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..e265416d --- /dev/null +++ b/docs/RedirectWebhook.md @@ -0,0 +1,20 @@ +# freeclimb.Model.RedirectWebhook + +The Redirect command is executing and its actionUrl is being invoked. A PerCL response is expected. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | Context or reason why this request is being made. Will be redirect - The Redirect command is executing and its actionUrl is being invoked. | [optional] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**CallId** | **string** | Unique identifier for this Call, generated by FreeClimb | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to the customer and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | This is only populated if request pertains to a conference. Otherwise, it is set to null. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a queue. Otherwise, it is set to null. | [optional] +**ParentCallId** | **string** | ID of Call that created this leg (child 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/Reject.md b/docs/Reject.md index 363415ea..52f4dcd7 100644 --- a/docs/Reject.md +++ b/docs/Reject.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -8,8 +8,5 @@ Name | Type | Description | Notes **Command** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] **Reason** | **string** | 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] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 e6e1532d..00000000 --- a/docs/RejectAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.RejectAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Reason** | **string** | 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] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 7c0178dc..e57e36e9 100644 --- a/docs/RemoveFromConference.md +++ b/docs/RemoveFromConference.md @@ -1,14 +1,11 @@ # freeclimb.Model.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** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 b5847043..00000000 --- a/docs/RemoveFromConferenceAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.RemoveFromConferenceAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CallId** | **string** | ID of the Call leg to be removed from the Conference. The Call must be in a Conference or an error will be triggered. | - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..949f95aa --- /dev/null +++ b/docs/RemoveFromQueueNotificationWebhook.md @@ -0,0 +1,21 @@ +# freeclimb.Model.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 +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | 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] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**CallId** | **string** | Unique identifier for this Call, generated by FreeClimb | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to the customer and to which this Call is directed (in E.164 format). | [optional] +**CallStatus** | **CallStatus** | | [optional] +**Direction** | **CallDirection** | | [optional] +**ConferenceId** | **string** | This is only populated if request pertains to a conference. Otherwise, it is set to null. | [optional] +**QueueId** | **string** | This is only populated if the request pertains to a queue. Otherwise, it is set to null. | [optional] +**QueueResult** | **QueueResultStatus** | | [optional] +**QueueTime** | **int** | Time (in seconds) the Call spent in the Queue. This is only available if the Call was actually enqueued. | [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/RequestType.md b/docs/RequestType.md index c2db7b3f..6306a561 100644 --- a/docs/RequestType.md +++ b/docs/RequestType.md @@ -28,9 +28,5 @@ Name | Value | Notes **MESSAGE_DELIVERY** | messageDelivery | Represented in C# as 22 **MESSAGE_STATUS** | messageStatus | Represented in C# as 23 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 c9495ce2..41fa36f2 100644 --- a/docs/SMSTenDLCBrand.md +++ b/docs/SMSTenDLCBrand.md @@ -1,12 +1,12 @@ # freeclimb.Model.SMSTenDLCBrand - +A brand is a business identity behind the campaign. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AccountId** | **string** | ID of the account that created this Queue. | [optional] -**EntityType** | **string** | Entity type behind the brand. This is the form of business establishment. | +**EntityType** | **SMSTenDLCBrandEntityType** | | **CspId** | **string** | Unique identifier assigned to the csp by the registry. | [optional] [readonly] **BrandId** | **string** | Unique identifier assigned to the brand by the registry. | [optional] [readonly] **FirstName** | **string** | First or given name. | [optional] @@ -23,22 +23,19 @@ Name | Type | Description | Notes **Country** | **string** | ISO2 2 characters country code. Example: US - United States | **Email** | **string** | Valid email address of brand support contact. | **StockSymbol** | **string** | (Required for public company) stock symbol. | [optional] -**StockExchange** | **string** | (Required for public company) stock exchange. | [optional] +**StockExchange** | **SMSTenDLCBrandStockExchange** | | [optional] **IpAddress** | **string** | IP address of the browser requesting to create brand identity. | [optional] **Website** | **string** | Brand website URL. | [optional] -**BrandRelationship** | **string** | Brand relationship to the CSP | +**BrandRelationship** | **SMSTenDLCBrandRelationship** | | **Vertical** | **string** | Vertical or industry segment of the brand. | **AltBusinessId** | **string** | Alternate business identifier such as DUNS, LEI, or GIIN | [optional] -**AltBusinessIdType** | **string** | The type of the Alternative business identifier | [optional] +**AltBusinessIdType** | **SMSTenDLCBrandAltBusinessIdType** | | [optional] **UniversalEin** | **string** | Universal EIN of Brand, Read Only. | [optional] [readonly] **ReferenceId** | **string** | 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] **OptionalAttributes** | **Dictionary<string, Object>** | Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names. | [optional] **Mock** | **bool** | Test brand. | -**IdentityStatus** | **string** | TCR assessment of the brand identification status. | +**IdentityStatus** | **SMSTenDLCBrandIdentityStatus** | | **CreateDate** | **DateTime** | Unix timestamp when brand was created. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 00000000..d2858a18 --- /dev/null +++ b/docs/SMSTenDLCBrandAltBusinessIdType.md @@ -0,0 +1,14 @@ +# freeclimb.Enums.SMSTenDLCBrandAltBusinessIdType + +The type of the Alternative business identifier +## Properties + +Name | Value | Notes +------------ | ------------- | ------------- +**NONE** | NONE | Represented in C# as 1 +**DUNS** | DUNS | Represented in C# as 2 +**GIIN** | GIIN | Represented in C# as 3 +**LEI** | LEI | Represented in C# as 4 + +[[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 00000000..b5d7595d --- /dev/null +++ b/docs/SMSTenDLCBrandEntityType.md @@ -0,0 +1,15 @@ +# freeclimb.Enums.SMSTenDLCBrandEntityType + +Entity type behind the brand. This is the form of business establishment. +## Properties + +Name | Value | Notes +------------ | ------------- | ------------- +**PRIVATE_PROFIT** | PRIVATE_PROFIT | Represented in C# as 1 +**PUBLIC_PROFIT** | PUBLIC_PROFIT | Represented in C# as 2 +**NON_PROFIT** | NON_PROFIT | Represented in C# as 3 +**GOVERNMENT** | GOVERNMENT | Represented in C# as 4 +**SOLE_PROPRIETOR** | SOLE_PROPRIETOR | Represented in C# as 5 + +[[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 00000000..3a8368e0 --- /dev/null +++ b/docs/SMSTenDLCBrandIdentityStatus.md @@ -0,0 +1,14 @@ +# freeclimb.Enums.SMSTenDLCBrandIdentityStatus + +TCR assessment of the brand identification status. +## Properties + +Name | Value | Notes +------------ | ------------- | ------------- +**SELF_DECLARED** | SELF_DECLARED | Represented in C# as 1 +**UNVERIFIED** | UNVERIFIED | Represented in C# as 2 +**VERIFIED** | VERIFIED | Represented in C# as 3 +**VETTED_VERIFIED** | VETTED_VERIFIED | Represented in C# as 4 + +[[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 00000000..9f09224a --- /dev/null +++ b/docs/SMSTenDLCBrandRelationship.md @@ -0,0 +1,15 @@ +# freeclimb.Enums.SMSTenDLCBrandRelationship + +Brand relationship to the CSP +## Properties + +Name | Value | Notes +------------ | ------------- | ------------- +**BASIC_ACCOUNT** | BASIC_ACCOUNT | Represented in C# as 1 +**SMALL_ACCOUNT** | SMALL_ACCOUNT | Represented in C# as 2 +**MEDIUM_ACCOUNT** | MEDIUM_ACCOUNT | Represented in C# as 3 +**LARGE_ACCOUNT** | LARGE_ACCOUNT | Represented in C# as 4 +**KEY_ACCOUNT** | KEY_ACCOUNT | Represented in C# as 5 + +[[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 00000000..d1be35d3 --- /dev/null +++ b/docs/SMSTenDLCBrandStockExchange.md @@ -0,0 +1,37 @@ +# freeclimb.Enums.SMSTenDLCBrandStockExchange + +(Required for public company) stock exchange. +## Properties + +Name | Value | Notes +------------ | ------------- | ------------- +**NONE** | NONE | Represented in C# as 1 +**NASDAQ** | NASDAQ | Represented in C# as 2 +**NYSE** | NYSE | Represented in C# as 3 +**AMEX** | AMEX | Represented in C# as 4 +**AMX** | AMX | Represented in C# as 5 +**ASX** | ASX | Represented in C# as 6 +**B3** | B3 | Represented in C# as 7 +**BME** | BME | Represented in C# as 8 +**BSE** | BSE | Represented in C# as 9 +**FRA** | FRA | Represented in C# as 10 +**ICEX** | ICEX | Represented in C# as 11 +**JPX** | JPX | Represented in C# as 12 +**JSE** | JSE | Represented in C# as 13 +**KRX** | KRX | Represented in C# as 14 +**LON** | LON | Represented in C# as 15 +**NSE** | NSE | Represented in C# as 16 +**OMX** | OMX | Represented in C# as 17 +**SEHK** | SEHK | Represented in C# as 18 +**SGX** | SGX | Represented in C# as 19 +**SSE** | SSE | Represented in C# as 20 +**STO** | STO | Represented in C# as 21 +**SWX** | SWX | Represented in C# as 22 +**SZSE** | SZSE | Represented in C# as 23 +**TSX** | TSX | Represented in C# as 24 +**TWSE** | TWSE | Represented in C# as 25 +**VSE** | VSE | Represented in C# as 26 +**OTHER** | OTHER | Represented in C# as 27 + +[[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 4f26a4d7..fb366c3b 100644 --- a/docs/SMSTenDLCBrandsListResult.md +++ b/docs/SMSTenDLCBrandsListResult.md @@ -1,6 +1,5 @@ # freeclimb.Model.SMSTenDLCBrandsListResult - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **Brands** | [**List<SMSTenDLCBrand>**](SMSTenDLCBrand.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 35fe51d3..00000000 --- a/docs/SMSTenDLCBrandsListResultAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.SMSTenDLCBrandsListResultAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Brands** | [**List<SMSTenDLCBrand>**](SMSTenDLCBrand.md) | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 899e3c9e..3c996736 100644 --- a/docs/SMSTenDLCCampaign.md +++ b/docs/SMSTenDLCCampaign.md @@ -1,6 +1,5 @@ # freeclimb.Model.SMSTenDLCCampaign - ## Properties Name | Type | Description | Notes @@ -9,7 +8,7 @@ Name | Type | Description | Notes **CampaignId** | **string** | Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. | **CspId** | **string** | Alphanumeric identifier of the CSP associated with this campaign. | **ResellerId** | **string** | Alphanumeric identifier of the reseller that you want to associate with this campaign. | [optional] -**Status** | **string** | Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. | [optional] +**Status** | **SMSTenDLCCampaignStatus** | | [optional] **CreateDate** | **DateTime** | Unix timestamp when campaign was created. | [optional] **AutoRenewal** | **bool** | Campaign subscription auto-renewal status. | [optional] **BilledDate** | **DateTime?** | Campaign recent billed date. | [optional] @@ -40,10 +39,7 @@ Name | Type | Description | Notes **OptoutMessage** | **string** | Subscriber opt-out message. | [optional] **ReferenceId** | **string** | 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. | -**NextRenewalOrExpirationDate** | **DateTime?** | When the campaign would be due for its next renew/bill date. | [optional] +**NextRenewalOrExpirationDate** | **DateOnly?** | When the campaign would be due for its next renew/bill date. | [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) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..6013f76e --- /dev/null +++ b/docs/SMSTenDLCCampaignStatus.md @@ -0,0 +1,12 @@ +# freeclimb.Enums.SMSTenDLCCampaignStatus + +Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. +## Properties + +Name | Value | Notes +------------ | ------------- | ------------- +**ACTIVE** | ACTIVE | Represented in C# as 1 +**EXPIRED** | EXPIRED | Represented in C# as 2 + +[[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 d9cc0842..f13ae298 100644 --- a/docs/SMSTenDLCCampaignsListResult.md +++ b/docs/SMSTenDLCCampaignsListResult.md @@ -1,6 +1,5 @@ # freeclimb.Model.SMSTenDLCCampaignsListResult - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **Campaigns** | [**List<SMSTenDLCCampaign>**](SMSTenDLCCampaign.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 e8436549..00000000 --- a/docs/SMSTenDLCCampaignsListResultAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.SMSTenDLCCampaignsListResultAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Campaigns** | [**List<SMSTenDLCCampaign>**](SMSTenDLCCampaign.md) | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 cac657e4..cc437819 100644 --- a/docs/SMSTenDLCPartnerCampaign.md +++ b/docs/SMSTenDLCPartnerCampaign.md @@ -1,13 +1,12 @@ # freeclimb.Model.SMSTenDLCPartnerCampaign - ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AccountId** | **string** | ID of the account that created this Queue. | [optional] **CampaignId** | **string** | Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. | -**Status** | **string** | Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. | [optional] +**Status** | **SMSTenDLCPartnerCampaignStatus** | | [optional] **CreateDate** | **DateTime** | Unix timestamp when campaign was created. | [optional] **BrandId** | **string** | Alphanumeric identifier of the brand associated with this campaign. | **Usecase** | **string** | Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. | @@ -35,8 +34,5 @@ Name | Type | Description | Notes **OptoutMessage** | **string** | Subscriber opt-out message. | [optional] **Brand** | [**SMSTenDLCPartnerCampaignBrand**](SMSTenDLCPartnerCampaignBrand.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 a9146e53..67d0a32a 100644 --- a/docs/SMSTenDLCPartnerCampaignBrand.md +++ b/docs/SMSTenDLCPartnerCampaignBrand.md @@ -1,6 +1,5 @@ # freeclimb.Model.SMSTenDLCPartnerCampaignBrand - ## Properties Name | Type | Description | Notes @@ -17,8 +16,5 @@ Name | Type | Description | Notes **OptionalAttributes** | **Dictionary<string, Object>** | Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names. | [optional] **EvpVettingScore** | **int** | External vetting score. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 00000000..df3d2c6e --- /dev/null +++ b/docs/SMSTenDLCPartnerCampaignStatus.md @@ -0,0 +1,12 @@ +# freeclimb.Enums.SMSTenDLCPartnerCampaignStatus + +Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. +## Properties + +Name | Value | Notes +------------ | ------------- | ------------- +**ACTIVE** | ACTIVE | Represented in C# as 1 +**EXPIRED** | EXPIRED | Represented in C# as 2 + +[[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 bf33dbda..51020065 100644 --- a/docs/SMSTenDLCPartnerCampaignsListResult.md +++ b/docs/SMSTenDLCPartnerCampaignsListResult.md @@ -1,6 +1,5 @@ # freeclimb.Model.SMSTenDLCPartnerCampaignsListResult - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **PartnerCampaigns** | [**List<SMSTenDLCPartnerCampaign>**](SMSTenDLCPartnerCampaign.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 072ad2ba..00000000 --- a/docs/SMSTenDLCPartnerCampaignsListResultAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.SMSTenDLCPartnerCampaignsListResultAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**PartnerCampaigns** | [**List<SMSTenDLCPartnerCampaign>**](SMSTenDLCPartnerCampaign.md) | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 f8848b1e..9add57c3 100644 --- a/docs/SMSTollFreeCampaign.md +++ b/docs/SMSTollFreeCampaign.md @@ -1,6 +1,5 @@ # freeclimb.Model.SMSTollFreeCampaign - ## Properties Name | Type | Description | Notes @@ -8,13 +7,10 @@ Name | Type | Description | Notes **AccountId** | **string** | ID of the account that created this toll-free campaign | **CampaignId** | **string** | Alphanumeric identifier used by the platform to identify this toll-free campaign | **UseCase** | **string** | | -**RegistrationStatus** | **string** | Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. | +**RegistrationStatus** | **SMSTollFreeCampaignRegistrationStatus** | | **DateCreated** | **string** | | **DateUpdated** | **string** | | **Revision** | **int** | | -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 00000000..fdccfcaa --- /dev/null +++ b/docs/SMSTollFreeCampaignRegistrationStatus.md @@ -0,0 +1,15 @@ +# freeclimb.Enums.SMSTollFreeCampaignRegistrationStatus + +Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. +## Properties + +Name | Value | Notes +------------ | ------------- | ------------- +**UNREGISTERED** | UNREGISTERED | Represented in C# as 1 +**INITIATED** | INITIATED | Represented in C# as 2 +**PENDING** | PENDING | Represented in C# as 3 +**DECLINED** | DECLINED | Represented in C# as 4 +**REGISTERED** | REGISTERED | Represented in C# as 5 + +[[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 a62f1fd3..cbf32856 100644 --- a/docs/SMSTollFreeCampaignsListResult.md +++ b/docs/SMSTollFreeCampaignsListResult.md @@ -1,6 +1,5 @@ # freeclimb.Model.SMSTollFreeCampaignsListResult - ## Properties Name | Type | Description | Notes @@ -14,8 +13,5 @@ Name | Type | Description | Notes **NextPageUri** | **string** | Uri to retrieve the next page of items | [optional] **Brands** | [**List<SMSTollFreeCampaign>**](SMSTollFreeCampaign.md) | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 2f02e9cc..00000000 --- a/docs/SMSTollFreeCampaignsListResultAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.SMSTollFreeCampaignsListResultAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Brands** | [**List<SMSTollFreeCampaign>**](SMSTollFreeCampaign.md) | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 7944ad96..8d13ee85 100644 --- a/docs/Say.md +++ b/docs/Say.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -11,8 +11,5 @@ Name | Type | Description | Notes **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] **PrivacyMode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 0a00b3e7..00000000 --- a/docs/SayAllOf.md +++ /dev/null @@ -1,17 +0,0 @@ -# freeclimb.Model.SayAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Text** | **string** | 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** | **string** | 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] [default to 1] -**PrivacyMode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 88e615f9..c3d4991a 100644 --- a/docs/SendDigits.md +++ b/docs/SendDigits.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -10,8 +10,5 @@ Name | Type | Description | Notes **PauseMs** | **int** | Pause between digits in milliseconds. Valid values are 100-1000 milliseconds and will be adjusted by FreeClimb to satisfy the constraint. | [optional] **PrivacyMode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 374d3d30..00000000 --- a/docs/SendDigitsAllOf.md +++ /dev/null @@ -1,16 +0,0 @@ -# freeclimb.Model.SendDigitsAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Digits** | **string** | 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. | -**PauseMs** | **int** | Pause between digits in milliseconds. Valid values are 100-1000 milliseconds and will be adjusted by FreeClimb to satisfy the constraint. | [optional] -**PrivacyMode** | **bool** | Parameter `privacyMode` will not log the `text` as required by PCI compliance. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 c6e9ecab..97c5db2f 100644 --- a/docs/SetDTMFPassThrough.md +++ b/docs/SetDTMFPassThrough.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -8,8 +8,5 @@ Name | Type | Description | Notes **Command** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] **DtmfPassThrough** | **bool** | Specifying `false` mutes the Participant's dtmf audio. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 a0165dbc..00000000 --- a/docs/SetDTMFPassThroughAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.SetDTMFPassThroughAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DtmfPassThrough** | **bool** | Specifying `false` mutes the Participant's dtmf audio. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 e2e964ef..40f4e960 100644 --- a/docs/SetListen.md +++ b/docs/SetListen.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -8,8 +8,5 @@ Name | Type | Description | Notes **Command** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] **Listen** | **bool** | Specifying `false` will silence the Conference for this Participant. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 988fec98..00000000 --- a/docs/SetListenAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.SetListenAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Listen** | **bool** | Specifying `false` will silence the Conference for this Participant. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 aede984c..30158ad8 100644 --- a/docs/SetTalk.md +++ b/docs/SetTalk.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -8,8 +8,5 @@ Name | Type | Description | Notes **Command** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] **Talk** | **bool** | Specifying `false` mutes the Participant. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 f166cec1..00000000 --- a/docs/SetTalkAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.SetTalkAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Talk** | **bool** | Specifying `false` mutes the Participant. | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 47fdc017..bceaabd7 100644 --- a/docs/Sms.md +++ b/docs/Sms.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -11,8 +11,5 @@ Name | Type | Description | Notes **Text** | **string** | Text contained in the message (maximum 160 characters). | **NotificationUrl** | **string** | 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] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 ff83a6dc..00000000 --- a/docs/SmsAllOf.md +++ /dev/null @@ -1,17 +0,0 @@ -# freeclimb.Model.SmsAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**To** | **string** | 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** | **string** | 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** | **string** | Text contained in the message (maximum 160 characters). | -**NotificationUrl** | **string** | 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] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 30036d82..b536a0b7 100644 --- a/docs/StartRecordCall.md +++ b/docs/StartRecordCall.md @@ -1,14 +1,11 @@ # freeclimb.Model.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** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 a6b71cbc..5e30ea69 100644 --- a/docs/TFN.md +++ b/docs/TFN.md @@ -1,14 +1,11 @@ # freeclimb.Model.TFN - +TollFree Campaign details for this number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CampaignId** | **string** | alphanumeric identifier for the TollFree campaign associated with this number | -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 71313e14..a540385f 100644 --- a/docs/TerminateConference.md +++ b/docs/TerminateConference.md @@ -1,14 +1,11 @@ # freeclimb.Model.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** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 51004c8d..00000000 --- a/docs/TerminateConferenceAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# freeclimb.Model.TerminateConferenceAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ConferenceId** | **string** | ID of the conference to terminate. | - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..ddc081b3 --- /dev/null +++ b/docs/TranscribeReason.md @@ -0,0 +1,14 @@ +# freeclimb.Enums.TranscribeReason + +## Properties + +Name | Value | Notes +------------ | ------------- | ------------- +**INTERNAL_ERROR** | internalError | Represented in C# as 1 +**HANGUP** | hangup | Represented in C# as 2 +**MAX_LENGTH** | maxLength | Represented in C# as 3 +**DIGIT** | digit | Represented in C# as 4 +**NO_INPUT** | noInput | Represented in C# as 5 + +[[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 00000000..2148e2de --- /dev/null +++ b/docs/TranscribeTermReason.md @@ -0,0 +1,11 @@ +# freeclimb.Enums.TranscribeTermReason + +## Properties + +Name | Value | Notes +------------ | ------------- | ------------- +**ERROR** | error | Represented in C# as 1 +**COMPLETED** | completed | Represented in C# as 2 + +[[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 fed05e74..eb5d745b 100644 --- a/docs/TranscribeUtterance.md +++ b/docs/TranscribeUtterance.md @@ -1,6 +1,6 @@ # freeclimb.Model.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 @@ -8,13 +8,10 @@ Name | Type | Description | Notes **Command** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] **ActionUrl** | **string** | | **PlayBeep** | **bool** | | [optional] [default to false] -**Record** | [**TranscribeUtteranceAllOfRecord**](TranscribeUtteranceAllOfRecord.md) | | [optional] +**Record** | [**TranscribeUtteranceRecord**](TranscribeUtteranceRecord.md) | | [optional] **PrivacyForLogging** | **bool** | | [optional] [default to false] **PrivacyForRecording** | **bool** | | [optional] [default to false] -**Prompts** | **List<Object>** | | [optional] +**Prompts** | [**List<PerclCommand>**](PerclCommand.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) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 34a1020d..00000000 --- a/docs/TranscribeUtteranceAllOf.md +++ /dev/null @@ -1,19 +0,0 @@ -# freeclimb.Model.TranscribeUtteranceAllOf - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActionUrl** | **string** | | -**PlayBeep** | **bool** | | [optional] [default to false] -**Record** | [**TranscribeUtteranceAllOfRecord**](TranscribeUtteranceAllOfRecord.md) | | [optional] -**PrivacyForLogging** | **bool** | | [optional] [default to false] -**PrivacyForRecording** | **bool** | | [optional] [default to false] -**Prompts** | **List<Object>** | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 d7b86314..00000000 --- a/docs/TranscribeUtteranceAllOfRecord.md +++ /dev/null @@ -1,16 +0,0 @@ -# freeclimb.Model.TranscribeUtteranceAllOfRecord - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SaveRecording** | **bool** | | [optional] [default to false] -**MaxLengthSec** | **int** | | [optional] [default to 60] -**RcrdTerminationSilenceTimeMs** | **int** | | [optional] - -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 d66b1979..c31a40e3 100644 --- a/docs/TranscribeUtteranceRecord.md +++ b/docs/TranscribeUtteranceRecord.md @@ -1,6 +1,5 @@ # freeclimb.Model.TranscribeUtteranceRecord - ## Properties Name | Type | Description | Notes @@ -9,8 +8,5 @@ Name | Type | Description | Notes **MaxLengthSec** | **int** | | [optional] [default to 60] **RcrdTerminationSilenceTimeMs** | **int** | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 00000000..1906b51f --- /dev/null +++ b/docs/TranscribeWebhook.md @@ -0,0 +1,32 @@ +# freeclimb.Model.TranscribeWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | 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] +**AccountId** | **string** | Account ID associated with your account. | [optional] +**CallId** | **string** | Unique identifier for this Call, generated by FreeClimb | [optional] +**From** | **string** | Phone number of the party that initiated the Call (in E.164 format). | [optional] +**To** | **string** | Phone number provisioned to the customer and to which this Call is directed (in E.164 format). | [optional] +**RecordingId** | **string** | 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] +**RecordingUrl** | **string** | 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] +**RecordingSize** | **int** | The size of the recording in bytes. | [optional] +**RecordingFormat** | **string** | The media type of the recording. | [optional] +**RecordingDurationMs** | **int** | The duration of the recorded audio in milliseconds. | [optional] +**TermReason** | **TranscribeTermReason** | | [optional] +**RecordTermReason** | **RecordUtteranceTermReason** | | [optional] +**Digit** | **string** | If recordTermReason is digit, this will be the digit that was pressed. Otherwise it will be null. | [optional] +**PrivacyForLogging** | **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] +**PrivacyForRecording** | **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] +**BargeInReason** | **BargeInReason** | | [optional] +**BargedInPromptNo** | **int** | | [optional] +**BargedInPromptMs** | **int** | duration in ms bargedInPromptNo prompt was executing until barge-in occurred. | [optional] +**BargedInPromptLoopNo** | **int** | | [optional] +**BargeInTimeMs** | **int** | epoch time in ms | [optional] +**Transcript** | **string** | 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] +**TranscribeReason** | **TranscribeReason** | | [optional] +**TranscriptionDurationMs** | **int** | The duration of the audio being transcribed in milliseconds | [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/Unpark.md b/docs/Unpark.md index 0ce5d0f3..5ab0c713 100644 --- a/docs/Unpark.md +++ b/docs/Unpark.md @@ -1,14 +1,11 @@ # freeclimb.Model.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** | **string** | Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 8916cde3..8b0cfa3b 100644 --- a/docs/UpdateCallRequest.md +++ b/docs/UpdateCallRequest.md @@ -1,14 +1,10 @@ # freeclimb.Model.UpdateCallRequest - ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Status** | **UpdateCallRequestStatus** | | -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 cb5f1ea5..0f4803e2 100644 --- a/docs/UpdateCallRequestStatus.md +++ b/docs/UpdateCallRequestStatus.md @@ -1,5 +1,6 @@ # freeclimb.Enums.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 | Value | Notes @@ -7,9 +8,5 @@ Name | Value | Notes **CANCELED** | canceled | Represented in C# as 1 **COMPLETED** | completed | Represented in C# as 2 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 47169e97..cf970d7b 100644 --- a/docs/UpdateConferenceParticipantRequest.md +++ b/docs/UpdateConferenceParticipantRequest.md @@ -1,6 +1,5 @@ # freeclimb.Model.UpdateConferenceParticipantRequest - ## Properties Name | Type | Description | Notes @@ -9,8 +8,5 @@ Name | Type | Description | Notes **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] **DtmfPassThrough** | **bool** | (Optional) Default is `true`. Setting to `false` mutes dtmf audio for this Participant. FreeClimb returns an error and ignores any other value. | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 5f88d408..df47a304 100644 --- a/docs/UpdateConferenceRequest.md +++ b/docs/UpdateConferenceRequest.md @@ -1,6 +1,5 @@ # freeclimb.Model.UpdateConferenceRequest - ## Properties Name | Type | Description | Notes @@ -9,8 +8,5 @@ Name | Type | Description | Notes **PlayBeep** | **PlayBeep** | | [optional] **Status** | **UpdateConferenceRequestStatus** | | [optional] -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[Back to Model list]](../README.md#documentation-for-models)
-[[Back to API list]](../README.md#documentation-for-api-endpoints)
-[[Back to README]](../README.md)
+[[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 f71d4fb0..9ffe00a2 100644 --- a/docs/UpdateConferenceRequestStatus.md +++ b/docs/UpdateConferenceRequestStatus.md @@ -1,5 +1,6 @@ # freeclimb.Enums.UpdateConferenceRequestStatus +New status of the conference. Valid values: `empty` or `terminated`. For more information, see **Status Parameter** below.** ## Properties Name | Value | Notes @@ -7,9 +8,5 @@ Name | Value | Notes **EMPTY** | empty | Represented in C# as 1 **TERMINATED** | terminated | Represented in C# as 2 +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) -[[Link to Serialization/Deserialization]](../README.md#documentation-for-serialization-deserialization)
-[[Back to Enum list]](../README.md#documentation-for-enums)
-[[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 00000000..8032da04 --- /dev/null +++ b/docs/Webhook.md @@ -0,0 +1,10 @@ +# freeclimb.Model.Webhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestType** | **string** | Type of webhook request | [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/freeclimb.sln b/freeclimb.sln index 8792e3b2..f5f35b7f 100644 --- a/freeclimb.sln +++ b/freeclimb.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "freeclimb", "src\freeclimb\freeclimb.csproj", "{D96E6496-DA7A-473C-AB39-4F3271DC1F08}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "freeclimb", "src\freeclimb\freeclimb.csproj", "{E31D44D0-DF1A-48CD-BA05-314917BFFDED}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "freeclimb.Test", "src\freeclimb.Test\freeclimb.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D96E6496-DA7A-473C-AB39-4F3271DC1F08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D96E6496-DA7A-473C-AB39-4F3271DC1F08}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D96E6496-DA7A-473C-AB39-4F3271DC1F08}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D96E6496-DA7A-473C-AB39-4F3271DC1F08}.Release|Any CPU.Build.0 = Release|Any CPU + {E31D44D0-DF1A-48CD-BA05-314917BFFDED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E31D44D0-DF1A-48CD-BA05-314917BFFDED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E31D44D0-DF1A-48CD-BA05-314917BFFDED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E31D44D0-DF1A-48CD-BA05-314917BFFDED}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/package.json b/package.json index c6f6aac1..df830c52 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/src/freeclimb.Test/Api/DefaultApiTests.cs b/src/freeclimb.Test/Api/DefaultApiTests.cs index 4d76513d..baf0f465 100644 --- a/src/freeclimb.Test/Api/DefaultApiTests.cs +++ b/src/freeclimb.Test/Api/DefaultApiTests.cs @@ -9,21 +9,19 @@ */ using System; -using System.IO; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.IO; using System.Linq; using System.Reflection; -using RestSharp; -using Moq; -using Moq.Protected; -using Xunit; - -using freeclimb.Client; +using System.Reflection; using freeclimb.Api; +using freeclimb.Client; +using freeclimb.Enums; // uncomment below to import models using freeclimb.Model; -using freeclimb.Enums; +using RestSharp; +using Xunit; namespace freeclimb.Test.Api { @@ -36,13 +34,11 @@ namespace freeclimb.Test.Api /// public class DefaultApiTests : IDisposable { - private Configuration config; - private DefaultApi instance; public DefaultApiTests() { - config = new Configuration(); + Configuration config = new Configuration(); config.BasePath = "http://127.0.0.1:4010/"; config.Username = "TEST-ACCOUNT-ID"; config.Password = "TEST-API-KEY"; @@ -62,921 +58,875 @@ public void InstanceTest() { Assert.IsType(instance); } - + /// /// Test BuyAPhoneNumber /// [Fact] - public void BuyAPhoneNumberTest() { - BuyIncomingNumberRequest buyIncomingNumberRequest = buyIncomingNumberRequestTestValue(); - + var response = instance.BuyAPhoneNumber(buyIncomingNumberRequest); Assert.IsAssignableFrom(response); } - + /// /// Test CreateAConference /// [Fact] - public void CreateAConferenceTest() { - - CreateConferenceRequest createConferenceRequest = createConferenceRequestTestValue(); - + CreateConferenceRequest? createConferenceRequest = createConferenceRequestTestValue(); + var response = instance.CreateAConference(createConferenceRequest); Assert.IsAssignableFrom(response); } - + /// /// Test CreateAQueue /// [Fact] - public void CreateAQueueTest() { - - QueueRequest queueRequest = queueRequestTestValue(); - + QueueRequest? queueRequest = queueRequestTestValue(); + var response = instance.CreateAQueue(queueRequest); Assert.IsAssignableFrom(response); } - + /// /// Test CreateAnApplication /// [Fact] - public void CreateAnApplicationTest() { - - ApplicationRequest applicationRequest = applicationRequestTestValue(); - + ApplicationRequest? applicationRequest = applicationRequestTestValue(); + var response = instance.CreateAnApplication(applicationRequest); Assert.IsAssignableFrom(response); } - + /// /// Test CreateKnowledgeBaseCompletion /// [Fact] - public void CreateKnowledgeBaseCompletionTest() { - string knowledgeBaseId = knowledgeBaseIdTestValue(); - - CompletionRequest completionRequest = completionRequestTestValue(); - - var response = instance.CreateKnowledgeBaseCompletion(knowledgeBaseId, completionRequest); + + CompletionRequest? completionRequest = completionRequestTestValue(); + + var response = instance.CreateKnowledgeBaseCompletion( + knowledgeBaseId, + completionRequest + ); Assert.IsAssignableFrom(response); } - + /// /// Test DeleteARecording /// [Fact] - public void DeleteARecordingTest() { - string recordingId = recordingIdTestValue(); - + instance.DeleteARecording(recordingId); } - + /// /// Test DeleteAnApplication /// [Fact] - public void DeleteAnApplicationTest() { - string applicationId = applicationIdTestValue(); - + instance.DeleteAnApplication(applicationId); } - + /// /// Test DeleteAnIncomingNumber /// [Fact] - public void DeleteAnIncomingNumberTest() { - string phoneNumberId = phoneNumberIdTestValue(); - + instance.DeleteAnIncomingNumber(phoneNumberId); } - + /// /// Test DequeueAMember /// [Fact] - public void DequeueAMemberTest() { - string queueId = queueIdTestValue(); - + string callId = callIdTestValue(); - + var response = instance.DequeueAMember(queueId, callId); Assert.IsAssignableFrom(response); } - + /// /// Test DequeueHeadMember /// [Fact] - public void DequeueHeadMemberTest() { - string queueId = queueIdTestValue(); - + var response = instance.DequeueHeadMember(queueId); Assert.IsAssignableFrom(response); } - + /// /// Test DownloadARecordingFile /// [Fact] - public void DownloadARecordingFileTest() { - string recordingId = recordingIdTestValue(); - + var response = instance.DownloadARecordingFile(recordingId); Assert.IsAssignableFrom(response); } - + /// /// Test FilterLogs /// [Fact] - public void FilterLogsTest() { - FilterLogsRequest filterLogsRequest = filterLogsRequestTestValue(); - + var response = instance.FilterLogs(filterLogsRequest); Assert.IsAssignableFrom(response); } - + /// /// Test GetACall /// [Fact] - public void GetACallTest() { - string callId = callIdTestValue(); - + var response = instance.GetACall(callId); Assert.IsAssignableFrom(response); } - + /// /// Test GetAConference /// [Fact] - public void GetAConferenceTest() { - string conferenceId = conferenceIdTestValue(); - + var response = instance.GetAConference(conferenceId); Assert.IsAssignableFrom(response); } - + /// /// Test GetAMember /// [Fact] - public void GetAMemberTest() { - string queueId = queueIdTestValue(); - + string callId = callIdTestValue(); - + var response = instance.GetAMember(queueId, callId); Assert.IsAssignableFrom(response); } - + /// /// Test GetAParticipant /// [Fact] - public void GetAParticipantTest() { - string conferenceId = conferenceIdTestValue(); - + string callId = callIdTestValue(); - + var response = instance.GetAParticipant(conferenceId, callId); Assert.IsAssignableFrom(response); } - + /// /// Test GetAQueue /// [Fact] - public void GetAQueueTest() { - string queueId = queueIdTestValue(); - + var response = instance.GetAQueue(queueId); Assert.IsAssignableFrom(response); } - + /// /// Test GetARecording /// [Fact] - public void GetARecordingTest() { - string recordingId = recordingIdTestValue(); - + var response = instance.GetARecording(recordingId); Assert.IsAssignableFrom(response); } - + /// /// Test GetAnAccount /// [Fact] - public void GetAnAccountTest() { - var response = instance.GetAnAccount(); Assert.IsAssignableFrom(response); } - + /// /// Test GetAnApplication /// [Fact] - public void GetAnApplicationTest() { - string applicationId = applicationIdTestValue(); - + var response = instance.GetAnApplication(applicationId); Assert.IsAssignableFrom(response); } - + /// /// Test GetAnIncomingNumber /// [Fact] - public void GetAnIncomingNumberTest() { - string phoneNumberId = phoneNumberIdTestValue(); - + var response = instance.GetAnIncomingNumber(phoneNumberId); Assert.IsAssignableFrom(response); } - + /// /// Test GetAnSmsMessage /// [Fact] - public void GetAnSmsMessageTest() { - string messageId = messageIdTestValue(); - + var response = instance.GetAnSmsMessage(messageId); Assert.IsAssignableFrom(response); } - + /// /// Test GetHeadMember /// [Fact] - public void GetHeadMemberTest() { - string queueId = queueIdTestValue(); - + var response = instance.GetHeadMember(queueId); Assert.IsAssignableFrom(response); } - + /// /// Test GetTenDLCSmsBrand /// [Fact] - public void GetTenDLCSmsBrandTest() { - string brandId = brandIdTestValue(); - + var response = instance.GetTenDLCSmsBrand(brandId); Assert.IsAssignableFrom(response); } - + /// /// Test GetTenDLCSmsBrands /// [Fact] - public void GetTenDLCSmsBrandsTest() { - var response = instance.GetTenDLCSmsBrands(); Assert.IsAssignableFrom(response); } - + /// /// Test GetTenDLCSmsCampaign /// [Fact] - public void GetTenDLCSmsCampaignTest() { - string campaignId = campaignIdTestValue(); - + var response = instance.GetTenDLCSmsCampaign(campaignId); Assert.IsAssignableFrom(response); } - + /// /// Test GetTenDLCSmsCampaigns /// [Fact] - public void GetTenDLCSmsCampaignsTest() { - - string brandId = brandIdTestValue(); - + string? brandId = brandIdTestValue(); + var response = instance.GetTenDLCSmsCampaigns(brandId); Assert.IsAssignableFrom(response); } - + /// /// Test GetTenDLCSmsPartnerCampaign /// [Fact] - public void GetTenDLCSmsPartnerCampaignTest() { - string campaignId = campaignIdTestValue(); - + var response = instance.GetTenDLCSmsPartnerCampaign(campaignId); Assert.IsAssignableFrom(response); } - + /// /// Test GetTenDLCSmsPartnerCampaigns /// [Fact] - public void GetTenDLCSmsPartnerCampaignsTest() { - - string brandId = brandIdTestValue(); - + string? brandId = brandIdTestValue(); + var response = instance.GetTenDLCSmsPartnerCampaigns(brandId); Assert.IsAssignableFrom(response); } - + /// /// Test GetTollFreeSmsCampaign /// [Fact] - public void GetTollFreeSmsCampaignTest() { - string campaignId = campaignIdTestValue(); - + var response = instance.GetTollFreeSmsCampaign(campaignId); Assert.IsAssignableFrom(response); } - + /// /// Test GetTollFreeSmsCampaigns /// [Fact] - public void GetTollFreeSmsCampaignsTest() { - var response = instance.GetTollFreeSmsCampaigns(); Assert.IsAssignableFrom(response); } - + /// /// Test ListActiveQueues /// [Fact] - public void ListActiveQueuesTest() { - - string alias = aliasTestValue(); - + string? alias = aliasTestValue(); + var response = instance.ListActiveQueues(alias); Assert.IsAssignableFrom(response); } - + /// /// Test ListAllAccountLogs /// [Fact] - public void ListAllAccountLogsTest() { - var response = instance.ListAllAccountLogs(); Assert.IsAssignableFrom(response); } - + /// /// Test ListApplications /// [Fact] - public void ListApplicationsTest() { - - string alias = aliasTestValue(); - + string? alias = aliasTestValue(); + var response = instance.ListApplications(alias); Assert.IsAssignableFrom(response); } - + /// /// Test ListAvailableNumbers /// [Fact] - public void ListAvailableNumbersTest() { - - string phoneNumber = phoneNumberTestValue(); - - string region = regionTestValue(); - - string country = countryTestValue(); - + string? phoneNumber = phoneNumberTestValue(); + + string? region = regionTestValue(); + + string? country = countryTestValue(); + bool? voiceEnabled = voiceEnabledTestValue(); - + bool? smsEnabled = smsEnabledTestValue(); - + bool? capabilitiesVoice = capabilitiesVoiceTestValue(); - + bool? capabilitiesSms = capabilitiesSmsTestValue(); - + bool? capabilitiesTollFree = capabilitiesTollFreeTestValue(); - + bool? capabilitiesTenDLC = capabilitiesTenDLCTestValue(); - + bool? capabilitiesShortCode = capabilitiesShortCodeTestValue(); - - var response = instance.ListAvailableNumbers(phoneNumber, region, country, voiceEnabled, smsEnabled, capabilitiesVoice, capabilitiesSms, capabilitiesTollFree, capabilitiesTenDLC, capabilitiesShortCode); + + var response = instance.ListAvailableNumbers( + phoneNumber, + region, + country, + voiceEnabled, + smsEnabled, + capabilitiesVoice, + capabilitiesSms, + capabilitiesTollFree, + capabilitiesTenDLC, + capabilitiesShortCode + ); Assert.IsAssignableFrom(response); } - + /// /// Test ListCallLogs /// [Fact] - public void ListCallLogsTest() { - string callId = callIdTestValue(); - + var response = instance.ListCallLogs(callId); Assert.IsAssignableFrom(response); } - + /// /// Test ListCallRecordings /// [Fact] - public void ListCallRecordingsTest() { - string callId = callIdTestValue(); - - string dateCreated = dateCreatedTestValue(); - + + string? dateCreated = dateCreatedTestValue(); + var response = instance.ListCallRecordings(callId, dateCreated); Assert.IsAssignableFrom(response); } - + /// /// Test ListCalls /// [Fact] - public void ListCallsTest() { - bool? active = activeTestValue(); - - string to = toTestValue(); - - string from = fromTestValue(); - + + string? to = toTestValue(); + + string? from = fromTestValue(); + CallStatus? status = statusTestEnum(); - - string startTime = startTimeTestValue(); - - string endTime = endTimeTestValue(); - - string parentCallId = parentCallIdTestValue(); - - List applicationId = applicationIdTestArray(); - - var response = instance.ListCalls(active, to, from, status, startTime, endTime, parentCallId, applicationId); + + string? startTime = startTimeTestValue(); + + string? endTime = endTimeTestValue(); + + string? parentCallId = parentCallIdTestValue(); + + List? applicationId = applicationIdTestArray(); + + var response = instance.ListCalls( + active, + to, + from, + status, + startTime, + endTime, + parentCallId, + applicationId + ); Assert.IsAssignableFrom(response); } - + /// /// Test ListConferenceRecordings /// [Fact] - public void ListConferenceRecordingsTest() { - string conferenceId = conferenceIdTestValue(); - - string callId = callIdTestValue(); - - string dateCreated = dateCreatedTestValue(); - + + string? callId = callIdTestValue(); + + string? dateCreated = dateCreatedTestValue(); + var response = instance.ListConferenceRecordings(conferenceId, callId, dateCreated); Assert.IsAssignableFrom(response); } - + /// /// Test ListConferences /// [Fact] - public void ListConferencesTest() { - - string status = statusTestValue(); - - string alias = aliasTestValue(); - - string dateCreated = dateCreatedTestValue(); - - string dateUpdated = dateUpdatedTestValue(); - + string? status = statusTestValue(); + + string? alias = aliasTestValue(); + + string? dateCreated = dateCreatedTestValue(); + + string? dateUpdated = dateUpdatedTestValue(); + var response = instance.ListConferences(status, alias, dateCreated, dateUpdated); Assert.IsAssignableFrom(response); } - + /// /// Test ListIncomingNumbers /// [Fact] - public void ListIncomingNumbersTest() { - - string phoneNumber = phoneNumberTestValue(); - - string alias = aliasTestValue(); - - string region = regionTestValue(); - - string country = countryTestValue(); - - string applicationId = applicationIdTestValue(); - + string? phoneNumber = phoneNumberTestValue(); + + string? alias = aliasTestValue(); + + string? region = regionTestValue(); + + string? country = countryTestValue(); + + string? applicationId = applicationIdTestValue(); + bool? hasApplication = hasApplicationTestValue(); - + bool? voiceEnabled = voiceEnabledTestValue(); - + bool? smsEnabled = smsEnabledTestValue(); - + bool? hasCampaign = hasCampaignTestValue(); - + bool? capabilitiesVoice = capabilitiesVoiceTestValue(); - + bool? capabilitiesSms = capabilitiesSmsTestValue(); - + bool? capabilitiesTollFree = capabilitiesTollFreeTestValue(); - + bool? capabilitiesTenDLC = capabilitiesTenDLCTestValue(); - + bool? capabilitiesShortCode = capabilitiesShortCodeTestValue(); - - string tfnCampaignId = tfnCampaignIdTestValue(); - + + string? tfnCampaignId = tfnCampaignIdTestValue(); + bool? offnet = offnetTestValue(); - - var response = instance.ListIncomingNumbers(phoneNumber, alias, region, country, applicationId, hasApplication, voiceEnabled, smsEnabled, hasCampaign, capabilitiesVoice, capabilitiesSms, capabilitiesTollFree, capabilitiesTenDLC, capabilitiesShortCode, tfnCampaignId, offnet); + + var response = instance.ListIncomingNumbers( + phoneNumber, + alias, + region, + country, + applicationId, + hasApplication, + voiceEnabled, + smsEnabled, + hasCampaign, + capabilitiesVoice, + capabilitiesSms, + capabilitiesTollFree, + capabilitiesTenDLC, + capabilitiesShortCode, + tfnCampaignId, + offnet + ); Assert.IsAssignableFrom(response); } - + /// /// Test ListMembers /// [Fact] - public void ListMembersTest() { - string queueId = queueIdTestValue(); - + var response = instance.ListMembers(queueId); Assert.IsAssignableFrom(response); } - + /// /// Test ListParticipants /// [Fact] - public void ListParticipantsTest() { - string conferenceId = conferenceIdTestValue(); - + bool? talk = talkTestValue(); - + bool? listen = listenTestValue(); - + bool? dtmfPassThrough = dtmfPassThroughTestValue(); - + var response = instance.ListParticipants(conferenceId, talk, listen, dtmfPassThrough); Assert.IsAssignableFrom(response); } - + /// /// Test ListRecordings /// [Fact] - public void ListRecordingsTest() { - - string callId = callIdTestValue(); - - string conferenceId = conferenceIdTestValue(); - - string dateCreated = dateCreatedTestValue(); - + string? callId = callIdTestValue(); + + string? conferenceId = conferenceIdTestValue(); + + string? dateCreated = dateCreatedTestValue(); + var response = instance.ListRecordings(callId, conferenceId, dateCreated); Assert.IsAssignableFrom(response); } - + /// /// Test ListSmsMessages /// [Fact] - public void ListSmsMessagesTest() { - - string to = toTestValue(); - - string from = fromTestValue(); - - string beginTime = beginTimeTestValue(); - - string endTime = endTimeTestValue(); - + string? to = toTestValue(); + + string? from = fromTestValue(); + + string? beginTime = beginTimeTestValue(); + + string? endTime = endTimeTestValue(); + MessageDirection? direction = directionTestEnum(); - - string campaignId = campaignIdTestValue(); - - string brandId = brandIdTestValue(); - + + string? campaignId = campaignIdTestValue(); + + string? brandId = brandIdTestValue(); + bool? is10DLC = is10DLCTestValue(); - - var response = instance.ListSmsMessages(to, from, beginTime, endTime, direction, campaignId, brandId, is10DLC); + + var response = instance.ListSmsMessages( + to, + from, + beginTime, + endTime, + direction, + campaignId, + brandId, + is10DLC + ); Assert.IsAssignableFrom(response); } - + /// /// Test MakeACall /// [Fact] - public void MakeACallTest() { - - MakeCallRequest makeCallRequest = makeCallRequestTestValue(); - + MakeCallRequest? makeCallRequest = makeCallRequestTestValue(); + var response = instance.MakeACall(makeCallRequest); Assert.IsAssignableFrom(response); } - + /// /// Test MakeAWebrtcJwt /// [Fact] - public void MakeAWebrtcJwtTest() { - CreateWebRTCToken createWebRTCToken = createWebRTCTokenTestValue(); - + var response = instance.MakeAWebrtcJwt(createWebRTCToken); Assert.IsAssignableFrom(response); } - + /// /// Test RemoveAParticipant /// [Fact] - public void RemoveAParticipantTest() { - string conferenceId = conferenceIdTestValue(); - + string callId = callIdTestValue(); - + instance.RemoveAParticipant(conferenceId, callId); } - + /// /// Test SendAnSmsMessage /// [Fact] - public void SendAnSmsMessageTest() { - MessageRequest messageRequest = messageRequestTestValue(); - + var response = instance.SendAnSmsMessage(messageRequest); Assert.IsAssignableFrom(response); } - + /// /// Test StreamARecordingFile /// [Fact] - public void StreamARecordingFileTest() { - string recordingId = recordingIdTestValue(); - + var response = instance.StreamARecordingFile(recordingId); Assert.IsAssignableFrom(response); } - + /// /// Test UpdateAConference /// [Fact] - public void UpdateAConferenceTest() { - string conferenceId = conferenceIdTestValue(); - - UpdateConferenceRequest updateConferenceRequest = updateConferenceRequestTestValue(); - + + UpdateConferenceRequest? updateConferenceRequest = updateConferenceRequestTestValue(); + instance.UpdateAConference(conferenceId, updateConferenceRequest); } - + /// /// Test UpdateALiveCall /// [Fact] - public void UpdateALiveCallTest() { - string callId = callIdTestValue(); - + UpdateCallRequest updateCallRequest = updateCallRequestTestValue(); - + instance.UpdateALiveCall(callId, updateCallRequest); } - + /// /// Test UpdateAParticipant /// [Fact] - public void UpdateAParticipantTest() { - string conferenceId = conferenceIdTestValue(); - + string callId = callIdTestValue(); - - UpdateConferenceParticipantRequest updateConferenceParticipantRequest = updateConferenceParticipantRequestTestValue(); - - var response = instance.UpdateAParticipant(conferenceId, callId, updateConferenceParticipantRequest); + + UpdateConferenceParticipantRequest? updateConferenceParticipantRequest = + updateConferenceParticipantRequestTestValue(); + + var response = instance.UpdateAParticipant( + conferenceId, + callId, + updateConferenceParticipantRequest + ); Assert.IsAssignableFrom(response); } - + /// /// Test UpdateAQueue /// [Fact] - public void UpdateAQueueTest() { - string queueId = queueIdTestValue(); - - QueueRequest queueRequest = queueRequestTestValue(); - + + QueueRequest? queueRequest = queueRequestTestValue(); + var response = instance.UpdateAQueue(queueId, queueRequest); Assert.IsAssignableFrom(response); } - + /// /// Test UpdateAnAccount /// [Fact] - public void UpdateAnAccountTest() { - - AccountRequest accountRequest = accountRequestTestValue(); - + AccountRequest? accountRequest = accountRequestTestValue(); + instance.UpdateAnAccount(accountRequest); } - + /// /// Test UpdateAnApplication /// [Fact] - public void UpdateAnApplicationTest() { - string applicationId = applicationIdTestValue(); - - ApplicationRequest applicationRequest = applicationRequestTestValue(); - + + ApplicationRequest? applicationRequest = applicationRequestTestValue(); + var response = instance.UpdateAnApplication(applicationId, applicationRequest); Assert.IsAssignableFrom(response); } - + /// /// Test UpdateAnIncomingNumber /// [Fact] - public void UpdateAnIncomingNumberTest() { - string phoneNumberId = phoneNumberIdTestValue(); - - IncomingNumberRequest incomingNumberRequest = incomingNumberRequestTestValue(); - + + IncomingNumberRequest? incomingNumberRequest = incomingNumberRequestTestValue(); + var response = instance.UpdateAnIncomingNumber(phoneNumberId, incomingNumberRequest); Assert.IsAssignableFrom(response); } - /// - /// Test GetTenDLCSmsBrands + /// Test FilterLogs /// [Fact] + public void FilterLogsGetNextPageTest() + { + FilterLogsRequest filterLogsRequest = filterLogsRequestTestValue(); + + var response = instance.FilterLogs(filterLogsRequest); + //Assert.IsType(response); + Assert.IsAssignableFrom(response); + response.NextPageUri = "/Accounts/{accountId}/Logs?cursor=1"; + var nextPageResponse = instance.GetNextPage(response); + //Assert.IsType(response); + Assert.IsAssignableFrom(nextPageResponse); + } + /// + /// Test GetTenDLCSmsBrands + /// + [Fact] public void GetTenDLCSmsBrandsGetNextPageTest() { - var response = instance.GetTenDLCSmsBrands(); //Assert.IsType(response); Assert.IsAssignableFrom(response); @@ -984,19 +934,16 @@ public void GetTenDLCSmsBrandsGetNextPageTest() var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test GetTenDLCSmsCampaigns /// [Fact] - public void GetTenDLCSmsCampaignsGetNextPageTest() { - - string brandId = brandIdTestValue(); - + string? brandId = brandIdTestValue(); + var response = instance.GetTenDLCSmsCampaigns(brandId); //Assert.IsType(response); Assert.IsAssignableFrom(response); @@ -1004,19 +951,16 @@ public void GetTenDLCSmsCampaignsGetNextPageTest() var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test GetTenDLCSmsPartnerCampaigns /// [Fact] - public void GetTenDLCSmsPartnerCampaignsGetNextPageTest() { - - string brandId = brandIdTestValue(); - + string? brandId = brandIdTestValue(); + var response = instance.GetTenDLCSmsPartnerCampaigns(brandId); //Assert.IsType(response); Assert.IsAssignableFrom(response); @@ -1024,17 +968,14 @@ public void GetTenDLCSmsPartnerCampaignsGetNextPageTest() var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test GetTollFreeSmsCampaigns /// [Fact] - public void GetTollFreeSmsCampaignsGetNextPageTest() { - var response = instance.GetTollFreeSmsCampaigns(); //Assert.IsType(response); Assert.IsAssignableFrom(response); @@ -1042,19 +983,16 @@ public void GetTollFreeSmsCampaignsGetNextPageTest() var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test ListActiveQueues /// [Fact] - public void ListActiveQueuesGetNextPageTest() { - - string alias = aliasTestValue(); - + string? alias = aliasTestValue(); + var response = instance.ListActiveQueues(alias); //Assert.IsType(response); Assert.IsAssignableFrom(response); @@ -1062,17 +1000,14 @@ public void ListActiveQueuesGetNextPageTest() var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test ListAllAccountLogs /// [Fact] - public void ListAllAccountLogsGetNextPageTest() { - var response = instance.ListAllAccountLogs(); //Assert.IsType(response); Assert.IsAssignableFrom(response); @@ -1080,19 +1015,16 @@ public void ListAllAccountLogsGetNextPageTest() var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test ListApplications /// [Fact] - public void ListApplicationsGetNextPageTest() { - - string alias = aliasTestValue(); - + string? alias = aliasTestValue(); + var response = instance.ListApplications(alias); //Assert.IsType(response); Assert.IsAssignableFrom(response); @@ -1100,57 +1032,62 @@ public void ListApplicationsGetNextPageTest() var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test ListAvailableNumbers /// [Fact] - public void ListAvailableNumbersGetNextPageTest() { - - string phoneNumber = phoneNumberTestValue(); - - string region = regionTestValue(); - - string country = countryTestValue(); - + string? phoneNumber = phoneNumberTestValue(); + + string? region = regionTestValue(); + + string? country = countryTestValue(); + bool? voiceEnabled = voiceEnabledTestValue(); - + bool? smsEnabled = smsEnabledTestValue(); - + bool? capabilitiesVoice = capabilitiesVoiceTestValue(); - + bool? capabilitiesSms = capabilitiesSmsTestValue(); - + bool? capabilitiesTollFree = capabilitiesTollFreeTestValue(); - + bool? capabilitiesTenDLC = capabilitiesTenDLCTestValue(); - + bool? capabilitiesShortCode = capabilitiesShortCodeTestValue(); - - var response = instance.ListAvailableNumbers(phoneNumber, region, country, voiceEnabled, smsEnabled, capabilitiesVoice, capabilitiesSms, capabilitiesTollFree, capabilitiesTenDLC, capabilitiesShortCode); + + var response = instance.ListAvailableNumbers( + phoneNumber, + region, + country, + voiceEnabled, + smsEnabled, + capabilitiesVoice, + capabilitiesSms, + capabilitiesTollFree, + capabilitiesTenDLC, + capabilitiesShortCode + ); //Assert.IsType(response); Assert.IsAssignableFrom(response); response.NextPageUri = "/AvailablePhoneNumbers?cursor=1"; var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test ListCallLogs /// [Fact] - public void ListCallLogsGetNextPageTest() { - string callId = callIdTestValue(); - + var response = instance.ListCallLogs(callId); //Assert.IsType(response); Assert.IsAssignableFrom(response); @@ -1158,21 +1095,18 @@ public void ListCallLogsGetNextPageTest() var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test ListCallRecordings /// [Fact] - public void ListCallRecordingsGetNextPageTest() { - string callId = callIdTestValue(); - - string dateCreated = dateCreatedTestValue(); - + + string? dateCreated = dateCreatedTestValue(); + var response = instance.ListCallRecordings(callId, dateCreated); //Assert.IsType(response); Assert.IsAssignableFrom(response); @@ -1180,83 +1114,84 @@ public void ListCallRecordingsGetNextPageTest() var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test ListCalls /// [Fact] - public void ListCallsGetNextPageTest() { - bool? active = activeTestValue(); - - string to = toTestValue(); - - string from = fromTestValue(); - + + string? to = toTestValue(); + + string? from = fromTestValue(); + CallStatus? status = statusTestEnum(); - - string startTime = startTimeTestValue(); - - string endTime = endTimeTestValue(); - - string parentCallId = parentCallIdTestValue(); - - List applicationId = applicationIdTestArray(); - - var response = instance.ListCalls(active, to, from, status, startTime, endTime, parentCallId, applicationId); + + string? startTime = startTimeTestValue(); + + string? endTime = endTimeTestValue(); + + string? parentCallId = parentCallIdTestValue(); + + List? applicationId = applicationIdTestArray(); + + var response = instance.ListCalls( + active, + to, + from, + status, + startTime, + endTime, + parentCallId, + applicationId + ); //Assert.IsType(response); Assert.IsAssignableFrom(response); response.NextPageUri = "/Accounts/{accountId}/Calls?cursor=1"; var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test ListConferenceRecordings /// [Fact] - public void ListConferenceRecordingsGetNextPageTest() { - string conferenceId = conferenceIdTestValue(); - - string callId = callIdTestValue(); - - string dateCreated = dateCreatedTestValue(); - + + string? callId = callIdTestValue(); + + string? dateCreated = dateCreatedTestValue(); + var response = instance.ListConferenceRecordings(conferenceId, callId, dateCreated); //Assert.IsType(response); Assert.IsAssignableFrom(response); - response.NextPageUri = "/Accounts/{accountId}/Conferences/{conferenceId}/Recordings?cursor=1"; + response.NextPageUri = + "/Accounts/{accountId}/Conferences/{conferenceId}/Recordings?cursor=1"; var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test ListConferences /// [Fact] - public void ListConferencesGetNextPageTest() { - - string status = statusTestValue(); - - string alias = aliasTestValue(); - - string dateCreated = dateCreatedTestValue(); - - string dateUpdated = dateUpdatedTestValue(); - + string? status = statusTestValue(); + + string? alias = aliasTestValue(); + + string? dateCreated = dateCreatedTestValue(); + + string? dateUpdated = dateUpdatedTestValue(); + var response = instance.ListConferences(status, alias, dateCreated, dateUpdated); //Assert.IsType(response); Assert.IsAssignableFrom(response); @@ -1264,69 +1199,80 @@ public void ListConferencesGetNextPageTest() var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test ListIncomingNumbers /// [Fact] - public void ListIncomingNumbersGetNextPageTest() { - - string phoneNumber = phoneNumberTestValue(); - - string alias = aliasTestValue(); - - string region = regionTestValue(); - - string country = countryTestValue(); - - string applicationId = applicationIdTestValue(); - + string? phoneNumber = phoneNumberTestValue(); + + string? alias = aliasTestValue(); + + string? region = regionTestValue(); + + string? country = countryTestValue(); + + string? applicationId = applicationIdTestValue(); + bool? hasApplication = hasApplicationTestValue(); - + bool? voiceEnabled = voiceEnabledTestValue(); - + bool? smsEnabled = smsEnabledTestValue(); - + bool? hasCampaign = hasCampaignTestValue(); - + bool? capabilitiesVoice = capabilitiesVoiceTestValue(); - + bool? capabilitiesSms = capabilitiesSmsTestValue(); - + bool? capabilitiesTollFree = capabilitiesTollFreeTestValue(); - + bool? capabilitiesTenDLC = capabilitiesTenDLCTestValue(); - + bool? capabilitiesShortCode = capabilitiesShortCodeTestValue(); - - string tfnCampaignId = tfnCampaignIdTestValue(); - + + string? tfnCampaignId = tfnCampaignIdTestValue(); + bool? offnet = offnetTestValue(); - - var response = instance.ListIncomingNumbers(phoneNumber, alias, region, country, applicationId, hasApplication, voiceEnabled, smsEnabled, hasCampaign, capabilitiesVoice, capabilitiesSms, capabilitiesTollFree, capabilitiesTenDLC, capabilitiesShortCode, tfnCampaignId, offnet); + + var response = instance.ListIncomingNumbers( + phoneNumber, + alias, + region, + country, + applicationId, + hasApplication, + voiceEnabled, + smsEnabled, + hasCampaign, + capabilitiesVoice, + capabilitiesSms, + capabilitiesTollFree, + capabilitiesTenDLC, + capabilitiesShortCode, + tfnCampaignId, + offnet + ); //Assert.IsType(response); Assert.IsAssignableFrom(response); response.NextPageUri = "/Accounts/{accountId}/IncomingPhoneNumbers?cursor=1"; var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test ListMembers /// [Fact] - public void ListMembersGetNextPageTest() { - string queueId = queueIdTestValue(); - + var response = instance.ListMembers(queueId); //Assert.IsType(response); Assert.IsAssignableFrom(response); @@ -1334,49 +1280,44 @@ public void ListMembersGetNextPageTest() var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test ListParticipants /// [Fact] - public void ListParticipantsGetNextPageTest() { - string conferenceId = conferenceIdTestValue(); - + bool? talk = talkTestValue(); - + bool? listen = listenTestValue(); - + bool? dtmfPassThrough = dtmfPassThroughTestValue(); - + var response = instance.ListParticipants(conferenceId, talk, listen, dtmfPassThrough); //Assert.IsType(response); Assert.IsAssignableFrom(response); - response.NextPageUri = "/Accounts/{accountId}/Conferences/{conferenceId}/Participants?cursor=1"; + response.NextPageUri = + "/Accounts/{accountId}/Conferences/{conferenceId}/Participants?cursor=1"; var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test ListRecordings /// [Fact] - public void ListRecordingsGetNextPageTest() { - - string callId = callIdTestValue(); - - string conferenceId = conferenceIdTestValue(); - - string dateCreated = dateCreatedTestValue(); - + string? callId = callIdTestValue(); + + string? conferenceId = conferenceIdTestValue(); + + string? dateCreated = dateCreatedTestValue(); + var response = instance.ListRecordings(callId, conferenceId, dateCreated); //Assert.IsType(response); Assert.IsAssignableFrom(response); @@ -1384,48 +1325,53 @@ public void ListRecordingsGetNextPageTest() var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } - + /// /// Test ListSmsMessages /// [Fact] - public void ListSmsMessagesGetNextPageTest() { - - string to = toTestValue(); - - string from = fromTestValue(); - - string beginTime = beginTimeTestValue(); - - string endTime = endTimeTestValue(); - + string? to = toTestValue(); + + string? from = fromTestValue(); + + string? beginTime = beginTimeTestValue(); + + string? endTime = endTimeTestValue(); + MessageDirection? direction = directionTestEnum(); - - string campaignId = campaignIdTestValue(); - - string brandId = brandIdTestValue(); - + + string? campaignId = campaignIdTestValue(); + + string? brandId = brandIdTestValue(); + bool? is10DLC = is10DLCTestValue(); - - var response = instance.ListSmsMessages(to, from, beginTime, endTime, direction, campaignId, brandId, is10DLC); + + var response = instance.ListSmsMessages( + to, + from, + beginTime, + endTime, + direction, + campaignId, + brandId, + is10DLC + ); //Assert.IsType(response); Assert.IsAssignableFrom(response); response.NextPageUri = "/Accounts/{accountId}/Messages?cursor=1"; var nextPageResponse = instance.GetNextPage(response); //Assert.IsType(response); Assert.IsAssignableFrom(nextPageResponse); - } private string accountIdTestValue() { return "AC0000000000000000000000000000000000000000"; } - + private string applicationIdTestValue() { return "AP0000000000000000000000000000000000000000"; @@ -1490,11 +1436,17 @@ private IncomingNumberRequest incomingNumberRequestTestValue() { return new IncomingNumberRequest(applicationIdTestValue(), aliasTestValue()); } - + private IncomingNumberResult incomingNumberResultTestValue() { Capabilities capabilities = new Capabilities(true, true, true, true, false); - return new IncomingNumberResult("example.com", "Mon, 15 Jun 2020 20:20:20 GMT", "Wed, 17 Jun 2020 20:20:20 GMT", 0, capabilities); + return new IncomingNumberResult( + "example.com", + "Mon, 15 Jun 2020 20:20:20 GMT", + "Wed, 17 Jun 2020 20:20:20 GMT", + 0, + capabilities + ); } private MakeCallRequest makeCallRequestTestValue() @@ -1504,7 +1456,7 @@ private MakeCallRequest makeCallRequestTestValue() private CreateConferenceRequest createConferenceRequestTestValue() { - PlayBeep enumPlayBeepStatus = Reflection.GetEnumByValue("always"); + PlayBeep enumPlayBeepStatus = PlayBeepValueConverter.FromString("always"); return new CreateConferenceRequest("TEST-CONF", enumPlayBeepStatus, true); } @@ -1517,30 +1469,65 @@ private QueueRequest queueRequestTestValue() { return new QueueRequest("TEST-QUEUE"); } - + private QueueMember queueMemberTestValue() { - return new QueueMember("example.com", callIdTestValue(), 0, 0, "Mon, 15 Jun 2009 20:45:30 GMT"); - + return new QueueMember( + "example.com", + callIdTestValue(), + 0, + 0, + "Mon, 15 Jun 2009 20:45:30 GMT" + ); } - + private QueueResult queueResultTestValue() { - return new QueueResult("example.com", "Mon, 15 Jun 2020 20:20:20 GMT", - "Wed, 17 Jun 2020 20:20:20 GMT", 0, accountIdTestValue(), - queueIdTestValue(), "TEST-QUEUE", 100, 0, 0, 0); + return new QueueResult( + "example.com", + "Mon, 15 Jun 2020 20:20:20 GMT", + "Wed, 17 Jun 2020 20:20:20 GMT", + 0, + accountIdTestValue(), + queueIdTestValue(), + "TEST-QUEUE", + 100, + 0, + 0, + 0 + ); } private ApplicationRequest applicationRequestTestValue() { - return new ApplicationRequest("TEST-APP", "voice.com", "voicefallback.com", "callconnect.com", "status.com", "sms.com", "smsfallback.com"); + return new ApplicationRequest( + "TEST-APP", + "https://voice.com", + "https://voicefallback.com", + "https://callconnect.com", + "https://status.com", + "https://sms.com", + "smsfallback.com" + ); } private ApplicationResult applicationResultTestValue() { - return new ApplicationResult("example.com", "Mon, 15 Jun 2009 20:45:30 GMT", "Wed, 17 Jun 2009 20:45:30 GMT", 3, - accountIdTestValue(), applicationIdTestValue(), "TEST-APP", "voice.com", "voicefallback.com", "callconnect.com", - "status.com", "sms.com", "smsfallback.com"); + return new ApplicationResult( + "example.com", + "Mon, 15 Jun 2009 20:45:30 GMT", + "Wed, 17 Jun 2009 20:45:30 GMT", + 3, + accountIdTestValue(), + applicationIdTestValue(), + "TEST-APP", + "voice.com", + "voicefallback.com", + "callconnect.com", + "status.com", + "sms.com", + "smsfallback.com" + ); } private string regionTestValue() @@ -1572,21 +1559,22 @@ private bool capabilitiesSmsTestValue() { return true; } - + private bool capabilitiesTollFreeTestValue() { return false; } - + private bool capabilitiesTenDLCTestValue() { return true; } - + private bool capabilitiesShortCodeTestValue() { return true; } + private bool offnetTestValue() { return true; @@ -1596,8 +1584,24 @@ private AvailableNumberList availableNumberListTestValue() { List numList = new List(); Capabilities capabilities = new Capabilities(true, true, true, true, false); - AvailableNumber num1 = new AvailableNumber(capabilities, "TEST-CAMPAIGN", "+18003608245", true, true, "US", "IL"); - AvailableNumber num2 = new AvailableNumber(capabilities, "TEST-CAMPAIGN", phoneNumberTestValue(), true, true, "US", "IL"); + AvailableNumber num1 = new AvailableNumber( + capabilities, + "TEST-CAMPAIGN", + "+18003608245", + true, + true, + "US", + "IL" + ); + AvailableNumber num2 = new AvailableNumber( + capabilities, + "TEST-CAMPAIGN", + phoneNumberTestValue(), + true, + true, + "US", + "IL" + ); numList.Add(num1); numList.Add(num2); return new AvailableNumberList(2, 1, 1, 1, 1, 10, "example.com", numList); @@ -1615,33 +1619,84 @@ private LogList logListTestValue() private CallResult callResultTestValue() { - CallStatus enumCallStatus = Reflection.GetEnumByValue("inProgress"); - return new CallResult("example.com", dateCreatedTestValue(), "Mon, 15 Jun 2020 20:45:32 GMT", - 1, callIdTestValue(), null, accountIdTestValue(), phoneNumberTestValue(), "+13124567890", - null, enumCallStatus, dateCreatedTestValue(), dateCreatedTestValue(), null); + CallStatus enumCallStatus = CallStatusValueConverter.FromString("inProgress"); + return new CallResult( + "example.com", + dateCreatedTestValue(), + "Mon, 15 Jun 2020 20:45:32 GMT", + 1, + callIdTestValue(), + null, + accountIdTestValue(), + phoneNumberTestValue(), + "+13124567890", + null, + enumCallStatus, + dateCreatedTestValue(), + dateCreatedTestValue(), + null + ); } - + private ConferenceParticipantResult conferenceParticipantResultTestValue() { - return new ConferenceParticipantResult("example.com", dateCreatedTestValue(), null, 1, - accountIdTestValue(), conferenceIdTestValue(), callIdTestValue(), true, true, true); + return new ConferenceParticipantResult( + "example.com", + dateCreatedTestValue(), + null, + 1, + accountIdTestValue(), + conferenceIdTestValue(), + callIdTestValue(), + true, + true, + true + ); } - + private RecordingResult recordingResultTestValue() { - return new RecordingResult("example.com", dateCreatedTestValue(), null, 1, recordingIdTestValue(), accountIdTestValue(), callIdTestValue(), 10); + return new RecordingResult( + "example.com", + dateCreatedTestValue(), + null, + 1, + recordingIdTestValue(), + accountIdTestValue(), + callIdTestValue(), + 10 + ); } private AccountResult accountResultTestValue() { - return new AccountResult("example.com", dateCreatedTestValue(), null, 1, accountIdTestValue(), "TEST-API-KEY", "TEST-ALIAS"); + return new AccountResult( + "example.com", + dateCreatedTestValue(), + null, + 1, + accountIdTestValue(), + "TEST-API-KEY", + "TEST-ALIAS" + ); } private MessageResult messageResultTestValue() { - MessageStatus enumMessageStatus = Reflection.GetEnumByValue("sent"); - return new MessageResult("example.com", dateCreatedTestValue(), null, 1, accountIdTestValue(), messageIdTestValue(), enumMessageStatus, - phoneNumberTestValue(), "+13121113456", "Test text message", "outbound"); + MessageStatus enumMessageStatus = MessageStatusValueConverter.FromString("sent"); + return new MessageResult( + "example.com", + dateCreatedTestValue(), + null, + 1, + accountIdTestValue(), + messageIdTestValue(), + enumMessageStatus, + phoneNumberTestValue(), + "+13121113456", + "Test text message", + "outbound" + ); } public QueueList queueListTestValue() @@ -1657,7 +1712,7 @@ private ApplicationList applicationListTestValue() applicationResults.Add(applicationResultTestValue()); return new ApplicationList(1, 1, 1, 1, 1, 10, null, applicationResults); } - + private RecordingList recordingListTestValue() { List recordingList = new List(); @@ -1695,14 +1750,18 @@ private string statusTestValue() return "completed"; } - private CallStatus statusTestEnum() { - return Reflection.GetEnumByValue("completed"); + private CallStatus statusTestEnum() + { + return CallStatusValueConverter.FromString("completed"); } private List applicationIdTestArray() { - return new List() { - "AP0123456789ABCDEFabcedf000000000000000001", "AP0123456789ABCDEFabcedf000000000000000002", "AP0123456789ABCDEFabcedf000000000000000003" + return new List() + { + "AP0123456789ABCDEFabcedf000000000000000001", + "AP0123456789ABCDEFabcedf000000000000000002", + "AP0123456789ABCDEFabcedf000000000000000003", }; } @@ -1747,41 +1806,58 @@ private QueueMemberList queueMemberListTestValue() return new QueueMemberList(1, 1, 1, 1, 1, 10, null, queues); } - private bool talkTestValue() { return true; } + private bool talkTestValue() + { + return true; + } - private bool listenTestValue() { return true; } + private bool listenTestValue() + { + return true; + } private ConferenceParticipantList conferenceParticipantListTestValue() { List conferences = new List(); conferences.Add(conferenceParticipantResultTestValue()); - return new ConferenceParticipantList(1,1,1,1,1,10,null,conferences); + return new ConferenceParticipantList(1, 1, 1, 1, 1, 10, null, conferences); } - private string beginTimeTestValue() { return "2022-12-12 01:01:01:01"; } - - private string directionTestValue() { return "outbound"; } + private string beginTimeTestValue() + { + return "2022-12-12 01:01:01:01"; + } - private MessageDirection directionTestEnum() { - return Reflection.GetEnumByValue("outbound"); + private string directionTestValue() + { + return "outbound"; + } + + private MessageDirection directionTestEnum() + { + MessageDirection messageDirection = MessageDirectionValueConverter.FromString( + "outbound" + ); + return messageDirection; } private MessagesList messagesListTestValue() { List messages = new List(); messages.Add(messageResultTestValue()); - return new MessagesList(1,1,1,1,1,10,null,messages); + return new MessagesList(1, 1, 1, 1, 1, 10, null, messages); } private UpdateConferenceRequest updateConferenceRequestTestValue() { - PlayBeep enumPlayBeepStatus = Reflection.GetEnumByValue("always"); + PlayBeep enumPlayBeepStatus = PlayBeepValueConverter.FromString("always"); return new UpdateConferenceRequest("TEST-CONF", enumPlayBeepStatus); } private UpdateCallRequest updateCallRequestTestValue() { - UpdateCallRequestStatus enumCallRequestStatus = Reflection.GetEnumByValue("completed"); + UpdateCallRequestStatus enumCallRequestStatus = + UpdateCallRequestStatusValueConverter.FromString("completed"); return new UpdateCallRequest(enumCallRequestStatus); } @@ -1797,8 +1873,17 @@ private AccountRequest accountRequestTestValue() private MessageRequest messageRequestTestValue() { - return new MessageRequest("example.com", dateCreatedTestValue(), dateUpdatedTestValue(), 2, phoneNumberTestValue(), "+13124445555", - "test text message", null, mediaUrlsTestValue()); + return new MessageRequest( + "example.com", + dateCreatedTestValue(), + dateUpdatedTestValue(), + 2, + phoneNumberTestValue(), + "+13124445555", + "test text message", + null, + mediaUrlsTestValue() + ); } private string brandIdTestValue() @@ -1816,7 +1901,7 @@ private bool hasCampaignTestValue() return true; } - private bool is10DLCTestValue() + private bool is10DLCTestValue() { return true; } @@ -1838,19 +1923,22 @@ private CreateWebRTCToken createWebRTCTokenTestValue() return new CreateWebRTCToken("to_example", "from_example", 1); } - private List mediaUrlsTestValue() { + private List mediaUrlsTestValue() + { return new List(); } - private string knowledgeBaseIdTestValue() { + private string knowledgeBaseIdTestValue() + { return "KNOWLEDGE-BASE-ID"; } - private CompletionRequest completionRequestTestValue() { + private CompletionRequest completionRequestTestValue() + { return new CompletionRequest("QUERY"); } - private bool dtmfPassThroughTestValue() + private bool dtmfPassThroughTestValue() { return true; } diff --git a/src/freeclimb.Test/Api/SmokeTests.cs b/src/freeclimb.Test/Api/SmokeTests.cs deleted file mode 100644 index 516b3e79..00000000 --- a/src/freeclimb.Test/Api/SmokeTests.cs +++ /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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using Moq; -using Moq.Protected; -using Xunit; - -using freeclimb.Client; -using freeclimb.Api; -// uncomment below to import models -using freeclimb.Model; -using freeclimb.Enums; - -namespace freeclimb.Test.Api -{ - /// - /// Class for testing DefaultApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class SmokeTests : freeclimb.Client.ApiClient, IDisposable - { - private DefaultApi instance; - private Configuration config; - - public SmokeTests() - { - config = new Configuration(); - config.BasePath = "http://127.0.0.1:4010"; - //TEST-API-USERNAME replace username with this - config.Username = "TEST-ACCOUNT-ID"; - //TEST-API-KEY replace password with this - config.Password = "TEST-API-KEY"; - instance = new DefaultApi(config); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of DefaultApi - /// - [Fact] - public void InstanceTest() - { - Assert.IsType(instance); - } - [Fact] - public void getAccountInfo() - { - var response = instance.GetAnAccount(); - Assert.IsAssignableFrom(response); - Assert.IsAssignableFrom(response.Status); - Assert.IsAssignableFrom(response.Type); - } - } -} diff --git a/src/freeclimb.Test/Enums/AccountStatusTests.cs b/src/freeclimb.Test/Enums/AccountStatusTests.cs index 1395be28..a4aedaa8 100644 --- a/src/freeclimb.Test/Enums/AccountStatusTests.cs +++ b/src/freeclimb.Test/Enums/AccountStatusTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class AccountStatusTests + + public class AccountStatusTests : IDisposable { private AccountStatus instance; public AccountStatusTests() { instance = new AccountStatus(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void AccountStatusInstanceTest() Assert.IsType(instance); } - [Fact] public void TestCLOSEDShouldWork() { @@ -67,7 +66,8 @@ public void TestCLOSEDShouldWork() public void TestCLOSEDShouldSerializeToEnum() { AccountStatus expectedValue = AccountStatus.CLOSED; - AccountStatus calculatedValue = (AccountStatus)Enum.Parse(typeof(AccountStatus), "CLOSED"); + AccountStatus calculatedValue = (AccountStatus) + Enum.Parse(typeof(AccountStatus), "CLOSED"); Assert.Equal(expectedValue, calculatedValue); } @@ -91,7 +91,8 @@ public void TestSUSPENDEDShouldWork() public void TestSUSPENDEDShouldSerializeToEnum() { AccountStatus expectedValue = AccountStatus.SUSPENDED; - AccountStatus calculatedValue = (AccountStatus)Enum.Parse(typeof(AccountStatus), "SUSPENDED"); + AccountStatus calculatedValue = (AccountStatus) + Enum.Parse(typeof(AccountStatus), "SUSPENDED"); Assert.Equal(expectedValue, calculatedValue); } @@ -115,7 +116,8 @@ public void TestACTIVEShouldWork() public void TestACTIVEShouldSerializeToEnum() { AccountStatus expectedValue = AccountStatus.ACTIVE; - AccountStatus calculatedValue = (AccountStatus)Enum.Parse(typeof(AccountStatus), "ACTIVE"); + AccountStatus calculatedValue = (AccountStatus) + Enum.Parse(typeof(AccountStatus), "ACTIVE"); Assert.Equal(expectedValue, calculatedValue); } @@ -127,6 +129,5 @@ public void TestACTIVEShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/AccountTypeTests.cs b/src/freeclimb.Test/Enums/AccountTypeTests.cs index 4b62c165..ffc5cf20 100644 --- a/src/freeclimb.Test/Enums/AccountTypeTests.cs +++ b/src/freeclimb.Test/Enums/AccountTypeTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class AccountTypeTests + + public class AccountTypeTests : IDisposable { private AccountType instance; public AccountTypeTests() { instance = new AccountType(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void AccountTypeInstanceTest() Assert.IsType(instance); } - [Fact] public void TestTRIALShouldWork() { @@ -103,6 +102,5 @@ public void TestFULLShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/AnsweredByTests.cs b/src/freeclimb.Test/Enums/AnsweredByTests.cs index 3e0d16bc..839b152b 100644 --- a/src/freeclimb.Test/Enums/AnsweredByTests.cs +++ b/src/freeclimb.Test/Enums/AnsweredByTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class AnsweredByTests + + public class AnsweredByTests : IDisposable { private AnsweredBy instance; public AnsweredByTests() { instance = new AnsweredBy(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void AnsweredByInstanceTest() Assert.IsType(instance); } - [Fact] public void TestHUMANShouldWork() { @@ -103,6 +102,5 @@ public void TestMACHINEShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/BargeInReasonTests.cs b/src/freeclimb.Test/Enums/BargeInReasonTests.cs new file mode 100644 index 00000000..ecce2d72 --- /dev/null +++ b/src/freeclimb.Test/Enums/BargeInReasonTests.cs @@ -0,0 +1,133 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Enums +{ + /// + /// Class for testing BargeInReason + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class BargeInReasonTests : IDisposable + { + private BargeInReason instance; + + public BargeInReasonTests() + { + instance = new BargeInReason(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of BargeInReason + /// + [Fact] + public void BargeInReasonInstanceTest() + { + Assert.IsType(instance); + } + + [Fact] + public void TestNO_BARGE_INShouldWork() + { + BargeInReason test = BargeInReason.NO_BARGE_IN; + Assert.Equal(typeof(BargeInReason), test.GetType()); + } + + [Fact] + public void TestNO_BARGE_INShouldSerializeToEnum() + { + BargeInReason expectedValue = BargeInReason.NO_BARGE_IN; + BargeInReason calculatedValue = (BargeInReason) + Enum.Parse(typeof(BargeInReason), "NO_BARGE_IN"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNO_BARGE_INShouldDeserializeToString() + { + BargeInReason test = BargeInReason.NO_BARGE_IN; + string expectedValue = "NO_BARGE_IN"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestBARGE_IN_BY_DTMFShouldWork() + { + BargeInReason test = BargeInReason.BARGE_IN_BY_DTMF; + Assert.Equal(typeof(BargeInReason), test.GetType()); + } + + [Fact] + public void TestBARGE_IN_BY_DTMFShouldSerializeToEnum() + { + BargeInReason expectedValue = BargeInReason.BARGE_IN_BY_DTMF; + BargeInReason calculatedValue = (BargeInReason) + Enum.Parse(typeof(BargeInReason), "BARGE_IN_BY_DTMF"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestBARGE_IN_BY_DTMFShouldDeserializeToString() + { + BargeInReason test = BargeInReason.BARGE_IN_BY_DTMF; + string expectedValue = "BARGE_IN_BY_DTMF"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestBARGE_IN_BY_ENERGYShouldWork() + { + BargeInReason test = BargeInReason.BARGE_IN_BY_ENERGY; + Assert.Equal(typeof(BargeInReason), test.GetType()); + } + + [Fact] + public void TestBARGE_IN_BY_ENERGYShouldSerializeToEnum() + { + BargeInReason expectedValue = BargeInReason.BARGE_IN_BY_ENERGY; + BargeInReason calculatedValue = (BargeInReason) + Enum.Parse(typeof(BargeInReason), "BARGE_IN_BY_ENERGY"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestBARGE_IN_BY_ENERGYShouldDeserializeToString() + { + BargeInReason test = BargeInReason.BARGE_IN_BY_ENERGY; + string expectedValue = "BARGE_IN_BY_ENERGY"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + } +} diff --git a/src/freeclimb.Test/Enums/CallDirectionTests.cs b/src/freeclimb.Test/Enums/CallDirectionTests.cs index 25780cba..0a046eac 100644 --- a/src/freeclimb.Test/Enums/CallDirectionTests.cs +++ b/src/freeclimb.Test/Enums/CallDirectionTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class CallDirectionTests + + public class CallDirectionTests : IDisposable { private CallDirection instance; public CallDirectionTests() { instance = new CallDirection(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void CallDirectionInstanceTest() Assert.IsType(instance); } - [Fact] public void TestINBOUNDShouldWork() { @@ -67,7 +66,8 @@ public void TestINBOUNDShouldWork() public void TestINBOUNDShouldSerializeToEnum() { CallDirection expectedValue = CallDirection.INBOUND; - CallDirection calculatedValue = (CallDirection)Enum.Parse(typeof(CallDirection), "INBOUND"); + CallDirection calculatedValue = (CallDirection) + Enum.Parse(typeof(CallDirection), "INBOUND"); Assert.Equal(expectedValue, calculatedValue); } @@ -91,7 +91,8 @@ public void TestOUTBOUND_APIShouldWork() public void TestOUTBOUND_APIShouldSerializeToEnum() { CallDirection expectedValue = CallDirection.OUTBOUND_API; - CallDirection calculatedValue = (CallDirection)Enum.Parse(typeof(CallDirection), "OUTBOUND_API"); + CallDirection calculatedValue = (CallDirection) + Enum.Parse(typeof(CallDirection), "OUTBOUND_API"); Assert.Equal(expectedValue, calculatedValue); } @@ -115,7 +116,8 @@ public void TestOUTBOUND_DIALShouldWork() public void TestOUTBOUND_DIALShouldSerializeToEnum() { CallDirection expectedValue = CallDirection.OUTBOUND_DIAL; - CallDirection calculatedValue = (CallDirection)Enum.Parse(typeof(CallDirection), "OUTBOUND_DIAL"); + CallDirection calculatedValue = (CallDirection) + Enum.Parse(typeof(CallDirection), "OUTBOUND_DIAL"); Assert.Equal(expectedValue, calculatedValue); } @@ -127,6 +129,5 @@ public void TestOUTBOUND_DIALShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/CallEndedReasonTests.cs b/src/freeclimb.Test/Enums/CallEndedReasonTests.cs new file mode 100644 index 00000000..2d887029 --- /dev/null +++ b/src/freeclimb.Test/Enums/CallEndedReasonTests.cs @@ -0,0 +1,633 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Enums +{ + /// + /// Class for testing CallEndedReason + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class CallEndedReasonTests : IDisposable + { + private CallEndedReason instance; + + public CallEndedReasonTests() + { + instance = new CallEndedReason(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CallEndedReason + /// + [Fact] + public void CallEndedReasonInstanceTest() + { + Assert.IsType(instance); + } + + [Fact] + public void TestBUSYShouldWork() + { + CallEndedReason test = CallEndedReason.BUSY; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestBUSYShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.BUSY; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "BUSY"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestBUSYShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.BUSY; + string expectedValue = "BUSY"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestFAILEDShouldWork() + { + CallEndedReason test = CallEndedReason.FAILED; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestFAILEDShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.FAILED; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "FAILED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestFAILEDShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.FAILED; + string expectedValue = "FAILED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNO_ANSWERShouldWork() + { + CallEndedReason test = CallEndedReason.NO_ANSWER; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestNO_ANSWERShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.NO_ANSWER; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "NO_ANSWER"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNO_ANSWERShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.NO_ANSWER; + string expectedValue = "NO_ANSWER"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestCALL_CANCELEDShouldWork() + { + CallEndedReason test = CallEndedReason.CALL_CANCELED; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestCALL_CANCELEDShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.CALL_CANCELED; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "CALL_CANCELED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestCALL_CANCELEDShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.CALL_CANCELED; + string expectedValue = "CALL_CANCELED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestFAR_END_HANGUPShouldWork() + { + CallEndedReason test = CallEndedReason.FAR_END_HANGUP; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestFAR_END_HANGUPShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.FAR_END_HANGUP; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "FAR_END_HANGUP"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestFAR_END_HANGUPShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.FAR_END_HANGUP; + string expectedValue = "FAR_END_HANGUP"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestAPP_HANGUPShouldWork() + { + CallEndedReason test = CallEndedReason.APP_HANGUP; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestAPP_HANGUPShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.APP_HANGUP; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "APP_HANGUP"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestAPP_HANGUPShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.APP_HANGUP; + string expectedValue = "APP_HANGUP"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestAPP_REJECTShouldWork() + { + CallEndedReason test = CallEndedReason.APP_REJECT; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestAPP_REJECTShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.APP_REJECT; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "APP_REJECT"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestAPP_REJECTShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.APP_REJECT; + string expectedValue = "APP_REJECT"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestAPP_NO_PERCLShouldWork() + { + CallEndedReason test = CallEndedReason.APP_NO_PERCL; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestAPP_NO_PERCLShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.APP_NO_PERCL; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "APP_NO_PERCL"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestAPP_NO_PERCLShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.APP_NO_PERCL; + string expectedValue = "APP_NO_PERCL"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestAPP_INVALID_PERCLShouldWork() + { + CallEndedReason test = CallEndedReason.APP_INVALID_PERCL; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestAPP_INVALID_PERCLShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.APP_INVALID_PERCL; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "APP_INVALID_PERCL"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestAPP_INVALID_PERCLShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.APP_INVALID_PERCL; + string expectedValue = "APP_INVALID_PERCL"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestCONFERENCE_TERMINATEDShouldWork() + { + CallEndedReason test = CallEndedReason.CONFERENCE_TERMINATED; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestCONFERENCE_TERMINATEDShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.CONFERENCE_TERMINATED; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "CONFERENCE_TERMINATED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestCONFERENCE_TERMINATEDShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.CONFERENCE_TERMINATED; + string expectedValue = "CONFERENCE_TERMINATED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestCONFERENCE_EMPTIEDShouldWork() + { + CallEndedReason test = CallEndedReason.CONFERENCE_EMPTIED; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestCONFERENCE_EMPTIEDShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.CONFERENCE_EMPTIED; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "CONFERENCE_EMPTIED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestCONFERENCE_EMPTIEDShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.CONFERENCE_EMPTIED; + string expectedValue = "CONFERENCE_EMPTIED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestREMOVED_FROM_CONFERENCEShouldWork() + { + CallEndedReason test = CallEndedReason.REMOVED_FROM_CONFERENCE; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestREMOVED_FROM_CONFERENCEShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.REMOVED_FROM_CONFERENCE; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "REMOVED_FROM_CONFERENCE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestREMOVED_FROM_CONFERENCEShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.REMOVED_FROM_CONFERENCE; + string expectedValue = "REMOVED_FROM_CONFERENCE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestMACHINE_DETECTEDShouldWork() + { + CallEndedReason test = CallEndedReason.MACHINE_DETECTED; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestMACHINE_DETECTEDShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.MACHINE_DETECTED; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "MACHINE_DETECTED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestMACHINE_DETECTEDShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.MACHINE_DETECTED; + string expectedValue = "MACHINE_DETECTED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestWEBHOOK_FAILEDShouldWork() + { + CallEndedReason test = CallEndedReason.WEBHOOK_FAILED; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestWEBHOOK_FAILEDShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.WEBHOOK_FAILED; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "WEBHOOK_FAILED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestWEBHOOK_FAILEDShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.WEBHOOK_FAILED; + string expectedValue = "WEBHOOK_FAILED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestWEBHOOK_INVALID_RESPONSEShouldWork() + { + CallEndedReason test = CallEndedReason.WEBHOOK_INVALID_RESPONSE; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestWEBHOOK_INVALID_RESPONSEShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.WEBHOOK_INVALID_RESPONSE; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "WEBHOOK_INVALID_RESPONSE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestWEBHOOK_INVALID_RESPONSEShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.WEBHOOK_INVALID_RESPONSE; + string expectedValue = "WEBHOOK_INVALID_RESPONSE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestVOICE_DISABLEDShouldWork() + { + CallEndedReason test = CallEndedReason.VOICE_DISABLED; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestVOICE_DISABLEDShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.VOICE_DISABLED; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "VOICE_DISABLED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestVOICE_DISABLEDShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.VOICE_DISABLED; + string expectedValue = "VOICE_DISABLED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestCONFIG_ERROR_NO_APPLICATIONShouldWork() + { + CallEndedReason test = CallEndedReason.CONFIG_ERROR_NO_APPLICATION; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestCONFIG_ERROR_NO_APPLICATIONShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.CONFIG_ERROR_NO_APPLICATION; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "CONFIG_ERROR_NO_APPLICATION"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestCONFIG_ERROR_NO_APPLICATIONShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.CONFIG_ERROR_NO_APPLICATION; + string expectedValue = "CONFIG_ERROR_NO_APPLICATION"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestCONFIG_ERROR_NO_VOICE_URLShouldWork() + { + CallEndedReason test = CallEndedReason.CONFIG_ERROR_NO_VOICE_URL; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestCONFIG_ERROR_NO_VOICE_URLShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.CONFIG_ERROR_NO_VOICE_URL; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "CONFIG_ERROR_NO_VOICE_URL"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestCONFIG_ERROR_NO_VOICE_URLShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.CONFIG_ERROR_NO_VOICE_URL; + string expectedValue = "CONFIG_ERROR_NO_VOICE_URL"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestMAX_REDIRECTS_ERRORShouldWork() + { + CallEndedReason test = CallEndedReason.MAX_REDIRECTS_ERROR; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestMAX_REDIRECTS_ERRORShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.MAX_REDIRECTS_ERROR; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "MAX_REDIRECTS_ERROR"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestMAX_REDIRECTS_ERRORShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.MAX_REDIRECTS_ERROR; + string expectedValue = "MAX_REDIRECTS_ERROR"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestPERCL_PROCESSING_ERRORShouldWork() + { + CallEndedReason test = CallEndedReason.PERCL_PROCESSING_ERROR; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestPERCL_PROCESSING_ERRORShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.PERCL_PROCESSING_ERROR; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "PERCL_PROCESSING_ERROR"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestPERCL_PROCESSING_ERRORShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.PERCL_PROCESSING_ERROR; + string expectedValue = "PERCL_PROCESSING_ERROR"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestINTERNAL_ERRORShouldWork() + { + CallEndedReason test = CallEndedReason.INTERNAL_ERROR; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestINTERNAL_ERRORShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.INTERNAL_ERROR; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "INTERNAL_ERROR"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestINTERNAL_ERRORShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.INTERNAL_ERROR; + string expectedValue = "INTERNAL_ERROR"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestGRPC_HANGUPShouldWork() + { + CallEndedReason test = CallEndedReason.GRPC_HANGUP; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestGRPC_HANGUPShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.GRPC_HANGUP; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "GRPC_HANGUP"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestGRPC_HANGUPShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.GRPC_HANGUP; + string expectedValue = "GRPC_HANGUP"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestMAX_DURATIONShouldWork() + { + CallEndedReason test = CallEndedReason.MAX_DURATION; + Assert.Equal(typeof(CallEndedReason), test.GetType()); + } + + [Fact] + public void TestMAX_DURATIONShouldSerializeToEnum() + { + CallEndedReason expectedValue = CallEndedReason.MAX_DURATION; + CallEndedReason calculatedValue = (CallEndedReason) + Enum.Parse(typeof(CallEndedReason), "MAX_DURATION"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestMAX_DURATIONShouldDeserializeToString() + { + CallEndedReason test = CallEndedReason.MAX_DURATION; + string expectedValue = "MAX_DURATION"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + } +} diff --git a/src/freeclimb.Test/Enums/CallStatusTests.cs b/src/freeclimb.Test/Enums/CallStatusTests.cs index ca6e1b1f..57ade741 100644 --- a/src/freeclimb.Test/Enums/CallStatusTests.cs +++ b/src/freeclimb.Test/Enums/CallStatusTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class CallStatusTests + + public class CallStatusTests : IDisposable { private CallStatus instance; public CallStatusTests() { instance = new CallStatus(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void CallStatusInstanceTest() Assert.IsType(instance); } - [Fact] public void TestQUEUEDShouldWork() { @@ -247,6 +246,5 @@ public void TestNO_ANSWERShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/CompletionResultStatusTests.cs b/src/freeclimb.Test/Enums/CompletionResultStatusTests.cs new file mode 100644 index 00000000..02a5ff04 --- /dev/null +++ b/src/freeclimb.Test/Enums/CompletionResultStatusTests.cs @@ -0,0 +1,108 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Enums +{ + /// + /// Class for testing CompletionResultStatus + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class CompletionResultStatusTests : IDisposable + { + private CompletionResultStatus instance; + + public CompletionResultStatusTests() + { + instance = new CompletionResultStatus(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CompletionResultStatus + /// + [Fact] + public void CompletionResultStatusInstanceTest() + { + Assert.IsType(instance); + } + + [Fact] + public void TestSUCCESSShouldWork() + { + CompletionResultStatus test = CompletionResultStatus.SUCCESS; + Assert.Equal(typeof(CompletionResultStatus), test.GetType()); + } + + [Fact] + public void TestSUCCESSShouldSerializeToEnum() + { + CompletionResultStatus expectedValue = CompletionResultStatus.SUCCESS; + CompletionResultStatus calculatedValue = (CompletionResultStatus) + Enum.Parse(typeof(CompletionResultStatus), "SUCCESS"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSUCCESSShouldDeserializeToString() + { + CompletionResultStatus test = CompletionResultStatus.SUCCESS; + string expectedValue = "SUCCESS"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNO_CONTEXTShouldWork() + { + CompletionResultStatus test = CompletionResultStatus.NO_CONTEXT; + Assert.Equal(typeof(CompletionResultStatus), test.GetType()); + } + + [Fact] + public void TestNO_CONTEXTShouldSerializeToEnum() + { + CompletionResultStatus expectedValue = CompletionResultStatus.NO_CONTEXT; + CompletionResultStatus calculatedValue = (CompletionResultStatus) + Enum.Parse(typeof(CompletionResultStatus), "NO_CONTEXT"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNO_CONTEXTShouldDeserializeToString() + { + CompletionResultStatus test = CompletionResultStatus.NO_CONTEXT; + string expectedValue = "NO_CONTEXT"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + } +} diff --git a/src/freeclimb.Test/Enums/ConferenceStatusTests.cs b/src/freeclimb.Test/Enums/ConferenceStatusTests.cs index e783c50f..2cf6f25e 100644 --- a/src/freeclimb.Test/Enums/ConferenceStatusTests.cs +++ b/src/freeclimb.Test/Enums/ConferenceStatusTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class ConferenceStatusTests + + public class ConferenceStatusTests : IDisposable { private ConferenceStatus instance; public ConferenceStatusTests() { instance = new ConferenceStatus(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void ConferenceStatusInstanceTest() Assert.IsType(instance); } - [Fact] public void TestEMPTYShouldWork() { @@ -67,7 +66,8 @@ public void TestEMPTYShouldWork() public void TestEMPTYShouldSerializeToEnum() { ConferenceStatus expectedValue = ConferenceStatus.EMPTY; - ConferenceStatus calculatedValue = (ConferenceStatus)Enum.Parse(typeof(ConferenceStatus), "EMPTY"); + ConferenceStatus calculatedValue = (ConferenceStatus) + Enum.Parse(typeof(ConferenceStatus), "EMPTY"); Assert.Equal(expectedValue, calculatedValue); } @@ -91,7 +91,8 @@ public void TestPOPULATEDShouldWork() public void TestPOPULATEDShouldSerializeToEnum() { ConferenceStatus expectedValue = ConferenceStatus.POPULATED; - ConferenceStatus calculatedValue = (ConferenceStatus)Enum.Parse(typeof(ConferenceStatus), "POPULATED"); + ConferenceStatus calculatedValue = (ConferenceStatus) + Enum.Parse(typeof(ConferenceStatus), "POPULATED"); Assert.Equal(expectedValue, calculatedValue); } @@ -115,7 +116,8 @@ public void TestIN_PROGRESSShouldWork() public void TestIN_PROGRESSShouldSerializeToEnum() { ConferenceStatus expectedValue = ConferenceStatus.IN_PROGRESS; - ConferenceStatus calculatedValue = (ConferenceStatus)Enum.Parse(typeof(ConferenceStatus), "IN_PROGRESS"); + ConferenceStatus calculatedValue = (ConferenceStatus) + Enum.Parse(typeof(ConferenceStatus), "IN_PROGRESS"); Assert.Equal(expectedValue, calculatedValue); } @@ -139,7 +141,8 @@ public void TestTERMINATEDShouldWork() public void TestTERMINATEDShouldSerializeToEnum() { ConferenceStatus expectedValue = ConferenceStatus.TERMINATED; - ConferenceStatus calculatedValue = (ConferenceStatus)Enum.Parse(typeof(ConferenceStatus), "TERMINATED"); + ConferenceStatus calculatedValue = (ConferenceStatus) + Enum.Parse(typeof(ConferenceStatus), "TERMINATED"); Assert.Equal(expectedValue, calculatedValue); } @@ -151,6 +154,5 @@ public void TestTERMINATEDShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/GetDigitsReasonTests.cs b/src/freeclimb.Test/Enums/GetDigitsReasonTests.cs new file mode 100644 index 00000000..82edcf89 --- /dev/null +++ b/src/freeclimb.Test/Enums/GetDigitsReasonTests.cs @@ -0,0 +1,158 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Enums +{ + /// + /// Class for testing GetDigitsReason + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class GetDigitsReasonTests : IDisposable + { + private GetDigitsReason instance; + + public GetDigitsReasonTests() + { + instance = new GetDigitsReason(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of GetDigitsReason + /// + [Fact] + public void GetDigitsReasonInstanceTest() + { + Assert.IsType(instance); + } + + [Fact] + public void TestFINISH_KEYShouldWork() + { + GetDigitsReason test = GetDigitsReason.FINISH_KEY; + Assert.Equal(typeof(GetDigitsReason), test.GetType()); + } + + [Fact] + public void TestFINISH_KEYShouldSerializeToEnum() + { + GetDigitsReason expectedValue = GetDigitsReason.FINISH_KEY; + GetDigitsReason calculatedValue = (GetDigitsReason) + Enum.Parse(typeof(GetDigitsReason), "FINISH_KEY"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestFINISH_KEYShouldDeserializeToString() + { + GetDigitsReason test = GetDigitsReason.FINISH_KEY; + string expectedValue = "FINISH_KEY"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestTIMEOUTShouldWork() + { + GetDigitsReason test = GetDigitsReason.TIMEOUT; + Assert.Equal(typeof(GetDigitsReason), test.GetType()); + } + + [Fact] + public void TestTIMEOUTShouldSerializeToEnum() + { + GetDigitsReason expectedValue = GetDigitsReason.TIMEOUT; + GetDigitsReason calculatedValue = (GetDigitsReason) + Enum.Parse(typeof(GetDigitsReason), "TIMEOUT"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestTIMEOUTShouldDeserializeToString() + { + GetDigitsReason test = GetDigitsReason.TIMEOUT; + string expectedValue = "TIMEOUT"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestMAX_DIGITSShouldWork() + { + GetDigitsReason test = GetDigitsReason.MAX_DIGITS; + Assert.Equal(typeof(GetDigitsReason), test.GetType()); + } + + [Fact] + public void TestMAX_DIGITSShouldSerializeToEnum() + { + GetDigitsReason expectedValue = GetDigitsReason.MAX_DIGITS; + GetDigitsReason calculatedValue = (GetDigitsReason) + Enum.Parse(typeof(GetDigitsReason), "MAX_DIGITS"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestMAX_DIGITSShouldDeserializeToString() + { + GetDigitsReason test = GetDigitsReason.MAX_DIGITS; + string expectedValue = "MAX_DIGITS"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestTONEShouldWork() + { + GetDigitsReason test = GetDigitsReason.TONE; + Assert.Equal(typeof(GetDigitsReason), test.GetType()); + } + + [Fact] + public void TestTONEShouldSerializeToEnum() + { + GetDigitsReason expectedValue = GetDigitsReason.TONE; + GetDigitsReason calculatedValue = (GetDigitsReason) + Enum.Parse(typeof(GetDigitsReason), "TONE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestTONEShouldDeserializeToString() + { + GetDigitsReason test = GetDigitsReason.TONE; + string expectedValue = "TONE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + } +} diff --git a/src/freeclimb.Test/Enums/GetSpeechReasonTests.cs b/src/freeclimb.Test/Enums/GetSpeechReasonTests.cs index 862d5807..dcfec542 100644 --- a/src/freeclimb.Test/Enums/GetSpeechReasonTests.cs +++ b/src/freeclimb.Test/Enums/GetSpeechReasonTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class GetSpeechReasonTests + + public class GetSpeechReasonTests : IDisposable { private GetSpeechReason instance; public GetSpeechReasonTests() { instance = new GetSpeechReason(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void GetSpeechReasonInstanceTest() Assert.IsType(instance); } - [Fact] public void TestERRORShouldWork() { @@ -67,7 +66,8 @@ public void TestERRORShouldWork() public void TestERRORShouldSerializeToEnum() { GetSpeechReason expectedValue = GetSpeechReason.ERROR; - GetSpeechReason calculatedValue = (GetSpeechReason)Enum.Parse(typeof(GetSpeechReason), "ERROR"); + GetSpeechReason calculatedValue = (GetSpeechReason) + Enum.Parse(typeof(GetSpeechReason), "ERROR"); Assert.Equal(expectedValue, calculatedValue); } @@ -91,7 +91,8 @@ public void TestHANGUPShouldWork() public void TestHANGUPShouldSerializeToEnum() { GetSpeechReason expectedValue = GetSpeechReason.HANGUP; - GetSpeechReason calculatedValue = (GetSpeechReason)Enum.Parse(typeof(GetSpeechReason), "HANGUP"); + GetSpeechReason calculatedValue = (GetSpeechReason) + Enum.Parse(typeof(GetSpeechReason), "HANGUP"); Assert.Equal(expectedValue, calculatedValue); } @@ -115,7 +116,8 @@ public void TestDIGITShouldWork() public void TestDIGITShouldSerializeToEnum() { GetSpeechReason expectedValue = GetSpeechReason.DIGIT; - GetSpeechReason calculatedValue = (GetSpeechReason)Enum.Parse(typeof(GetSpeechReason), "DIGIT"); + GetSpeechReason calculatedValue = (GetSpeechReason) + Enum.Parse(typeof(GetSpeechReason), "DIGIT"); Assert.Equal(expectedValue, calculatedValue); } @@ -139,7 +141,8 @@ public void TestNO_INPUTShouldWork() public void TestNO_INPUTShouldSerializeToEnum() { GetSpeechReason expectedValue = GetSpeechReason.NO_INPUT; - GetSpeechReason calculatedValue = (GetSpeechReason)Enum.Parse(typeof(GetSpeechReason), "NO_INPUT"); + GetSpeechReason calculatedValue = (GetSpeechReason) + Enum.Parse(typeof(GetSpeechReason), "NO_INPUT"); Assert.Equal(expectedValue, calculatedValue); } @@ -163,7 +166,8 @@ public void TestNO_MATCHShouldWork() public void TestNO_MATCHShouldSerializeToEnum() { GetSpeechReason expectedValue = GetSpeechReason.NO_MATCH; - GetSpeechReason calculatedValue = (GetSpeechReason)Enum.Parse(typeof(GetSpeechReason), "NO_MATCH"); + GetSpeechReason calculatedValue = (GetSpeechReason) + Enum.Parse(typeof(GetSpeechReason), "NO_MATCH"); Assert.Equal(expectedValue, calculatedValue); } @@ -187,7 +191,8 @@ public void TestRECOGNITIONShouldWork() public void TestRECOGNITIONShouldSerializeToEnum() { GetSpeechReason expectedValue = GetSpeechReason.RECOGNITION; - GetSpeechReason calculatedValue = (GetSpeechReason)Enum.Parse(typeof(GetSpeechReason), "RECOGNITION"); + GetSpeechReason calculatedValue = (GetSpeechReason) + Enum.Parse(typeof(GetSpeechReason), "RECOGNITION"); Assert.Equal(expectedValue, calculatedValue); } @@ -199,6 +204,5 @@ public void TestRECOGNITIONShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/GrammarFileBuiltInTests.cs b/src/freeclimb.Test/Enums/GrammarFileBuiltInTests.cs index 6acd5874..dab66250 100644 --- a/src/freeclimb.Test/Enums/GrammarFileBuiltInTests.cs +++ b/src/freeclimb.Test/Enums/GrammarFileBuiltInTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class GrammarFileBuiltInTests + + public class GrammarFileBuiltInTests : IDisposable { private GrammarFileBuiltIn instance; public GrammarFileBuiltInTests() { instance = new GrammarFileBuiltIn(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void GrammarFileBuiltInInstanceTest() Assert.IsType(instance); } - [Fact] public void TestALPHNUM6ShouldWork() { @@ -67,7 +66,8 @@ public void TestALPHNUM6ShouldWork() public void TestALPHNUM6ShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.ALPHNUM6; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "ALPHNUM6"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "ALPHNUM6"); Assert.Equal(expectedValue, calculatedValue); } @@ -91,7 +91,8 @@ public void TestANY_DIGShouldWork() public void TestANY_DIGShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.ANY_DIG; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "ANY_DIG"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "ANY_DIG"); Assert.Equal(expectedValue, calculatedValue); } @@ -115,7 +116,8 @@ public void TestDIG1ShouldWork() public void TestDIG1ShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.DIG1; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "DIG1"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "DIG1"); Assert.Equal(expectedValue, calculatedValue); } @@ -139,7 +141,8 @@ public void TestDIG2ShouldWork() public void TestDIG2ShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.DIG2; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "DIG2"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "DIG2"); Assert.Equal(expectedValue, calculatedValue); } @@ -163,7 +166,8 @@ public void TestDIG3ShouldWork() public void TestDIG3ShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.DIG3; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "DIG3"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "DIG3"); Assert.Equal(expectedValue, calculatedValue); } @@ -187,7 +191,8 @@ public void TestDIG4ShouldWork() public void TestDIG4ShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.DIG4; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "DIG4"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "DIG4"); Assert.Equal(expectedValue, calculatedValue); } @@ -211,7 +216,8 @@ public void TestDIG5ShouldWork() public void TestDIG5ShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.DIG5; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "DIG5"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "DIG5"); Assert.Equal(expectedValue, calculatedValue); } @@ -235,7 +241,8 @@ public void TestDIG6ShouldWork() public void TestDIG6ShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.DIG6; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "DIG6"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "DIG6"); Assert.Equal(expectedValue, calculatedValue); } @@ -259,7 +266,8 @@ public void TestDIG7ShouldWork() public void TestDIG7ShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.DIG7; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "DIG7"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "DIG7"); Assert.Equal(expectedValue, calculatedValue); } @@ -283,7 +291,8 @@ public void TestDIG8ShouldWork() public void TestDIG8ShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.DIG8; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "DIG8"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "DIG8"); Assert.Equal(expectedValue, calculatedValue); } @@ -307,7 +316,8 @@ public void TestDIG9ShouldWork() public void TestDIG9ShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.DIG9; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "DIG9"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "DIG9"); Assert.Equal(expectedValue, calculatedValue); } @@ -331,7 +341,8 @@ public void TestDIG10ShouldWork() public void TestDIG10ShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.DIG10; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "DIG10"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "DIG10"); Assert.Equal(expectedValue, calculatedValue); } @@ -355,7 +366,8 @@ public void TestDIG11ShouldWork() public void TestDIG11ShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.DIG11; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "DIG11"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "DIG11"); Assert.Equal(expectedValue, calculatedValue); } @@ -379,7 +391,8 @@ public void TestUP_TO_20_DIGIT_SEQUENCEShouldWork() public void TestUP_TO_20_DIGIT_SEQUENCEShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.UP_TO_20_DIGIT_SEQUENCE; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "UP_TO_20_DIGIT_SEQUENCE"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "UP_TO_20_DIGIT_SEQUENCE"); Assert.Equal(expectedValue, calculatedValue); } @@ -403,7 +416,8 @@ public void TestVERSAY_YESNOShouldWork() public void TestVERSAY_YESNOShouldSerializeToEnum() { GrammarFileBuiltIn expectedValue = GrammarFileBuiltIn.VERSAY_YESNO; - GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn)Enum.Parse(typeof(GrammarFileBuiltIn), "VERSAY_YESNO"); + GrammarFileBuiltIn calculatedValue = (GrammarFileBuiltIn) + Enum.Parse(typeof(GrammarFileBuiltIn), "VERSAY_YESNO"); Assert.Equal(expectedValue, calculatedValue); } @@ -415,6 +429,5 @@ public void TestVERSAY_YESNOShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/GrammarTypeTests.cs b/src/freeclimb.Test/Enums/GrammarTypeTests.cs index 7ea0b588..4abf1b6b 100644 --- a/src/freeclimb.Test/Enums/GrammarTypeTests.cs +++ b/src/freeclimb.Test/Enums/GrammarTypeTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class GrammarTypeTests + + public class GrammarTypeTests : IDisposable { private GrammarType instance; public GrammarTypeTests() { instance = new GrammarType(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void GrammarTypeInstanceTest() Assert.IsType(instance); } - [Fact] public void TestURLShouldWork() { @@ -103,6 +102,5 @@ public void TestBUILT_INShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/IfMachineTests.cs b/src/freeclimb.Test/Enums/IfMachineTests.cs index 0edf9c5d..8a768d9d 100644 --- a/src/freeclimb.Test/Enums/IfMachineTests.cs +++ b/src/freeclimb.Test/Enums/IfMachineTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class IfMachineTests + + public class IfMachineTests : IDisposable { private IfMachine instance; public IfMachineTests() { instance = new IfMachine(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void IfMachineInstanceTest() Assert.IsType(instance); } - [Fact] public void TestREDIRECTShouldWork() { @@ -103,6 +102,5 @@ public void TestHANGUPShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/LanguageTests.cs b/src/freeclimb.Test/Enums/LanguageTests.cs index 0ea6fd54..e773d021 100644 --- a/src/freeclimb.Test/Enums/LanguageTests.cs +++ b/src/freeclimb.Test/Enums/LanguageTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class LanguageTests + + public class LanguageTests : IDisposable { private Language instance; public LanguageTests() { instance = new Language(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void LanguageInstanceTest() Assert.IsType(instance); } - [Fact] public void TestCATALANShouldWork() { @@ -679,6 +678,5 @@ public void TestCHINESE_TWShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/LogLevelTests.cs b/src/freeclimb.Test/Enums/LogLevelTests.cs index fbcaf0ce..3ee7e7db 100644 --- a/src/freeclimb.Test/Enums/LogLevelTests.cs +++ b/src/freeclimb.Test/Enums/LogLevelTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class LogLevelTests + + public class LogLevelTests : IDisposable { private LogLevel instance; public LogLevelTests() { instance = new LogLevel(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void LogLevelInstanceTest() Assert.IsType(instance); } - [Fact] public void TestINFOShouldWork() { @@ -127,6 +126,5 @@ public void TestERRORShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/MachineTypeTests.cs b/src/freeclimb.Test/Enums/MachineTypeTests.cs index 06705c98..361f9b42 100644 --- a/src/freeclimb.Test/Enums/MachineTypeTests.cs +++ b/src/freeclimb.Test/Enums/MachineTypeTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class MachineTypeTests + + public class MachineTypeTests : IDisposable { private MachineType instance; public MachineTypeTests() { instance = new MachineType(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void MachineTypeInstanceTest() Assert.IsType(instance); } - [Fact] public void TestANSWERING_MACHINEShouldWork() { @@ -67,7 +66,8 @@ public void TestANSWERING_MACHINEShouldWork() public void TestANSWERING_MACHINEShouldSerializeToEnum() { MachineType expectedValue = MachineType.ANSWERING_MACHINE; - MachineType calculatedValue = (MachineType)Enum.Parse(typeof(MachineType), "ANSWERING_MACHINE"); + MachineType calculatedValue = (MachineType) + Enum.Parse(typeof(MachineType), "ANSWERING_MACHINE"); Assert.Equal(expectedValue, calculatedValue); } @@ -81,28 +81,27 @@ public void TestANSWERING_MACHINEShouldDeserializeToString() } [Fact] - public void TestFAX_MACHINEShouldWork() + public void TestFAX_MODEMShouldWork() { - MachineType test = MachineType.FAX_MACHINE; + MachineType test = MachineType.FAX_MODEM; Assert.Equal(typeof(MachineType), test.GetType()); } [Fact] - public void TestFAX_MACHINEShouldSerializeToEnum() + public void TestFAX_MODEMShouldSerializeToEnum() { - MachineType expectedValue = MachineType.FAX_MACHINE; - MachineType calculatedValue = (MachineType)Enum.Parse(typeof(MachineType), "FAX_MACHINE"); + MachineType expectedValue = MachineType.FAX_MODEM; + MachineType calculatedValue = (MachineType)Enum.Parse(typeof(MachineType), "FAX_MODEM"); Assert.Equal(expectedValue, calculatedValue); } [Fact] - public void TestFAX_MACHINEShouldDeserializeToString() + public void TestFAX_MODEMShouldDeserializeToString() { - MachineType test = MachineType.FAX_MACHINE; - string expectedValue = "FAX_MACHINE"; + MachineType test = MachineType.FAX_MODEM; + string expectedValue = "FAX_MODEM"; string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/MessageDirectionTests.cs b/src/freeclimb.Test/Enums/MessageDirectionTests.cs index 240b1a9e..7a404f1a 100644 --- a/src/freeclimb.Test/Enums/MessageDirectionTests.cs +++ b/src/freeclimb.Test/Enums/MessageDirectionTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class MessageDirectionTests + + public class MessageDirectionTests : IDisposable { private MessageDirection instance; public MessageDirectionTests() { instance = new MessageDirection(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void MessageDirectionInstanceTest() Assert.IsType(instance); } - [Fact] public void TestINBOUNDShouldWork() { @@ -67,7 +66,8 @@ public void TestINBOUNDShouldWork() public void TestINBOUNDShouldSerializeToEnum() { MessageDirection expectedValue = MessageDirection.INBOUND; - MessageDirection calculatedValue = (MessageDirection)Enum.Parse(typeof(MessageDirection), "INBOUND"); + MessageDirection calculatedValue = (MessageDirection) + Enum.Parse(typeof(MessageDirection), "INBOUND"); Assert.Equal(expectedValue, calculatedValue); } @@ -91,7 +91,8 @@ public void TestOUTBOUNDShouldWork() public void TestOUTBOUNDShouldSerializeToEnum() { MessageDirection expectedValue = MessageDirection.OUTBOUND; - MessageDirection calculatedValue = (MessageDirection)Enum.Parse(typeof(MessageDirection), "OUTBOUND"); + MessageDirection calculatedValue = (MessageDirection) + Enum.Parse(typeof(MessageDirection), "OUTBOUND"); Assert.Equal(expectedValue, calculatedValue); } @@ -103,6 +104,5 @@ public void TestOUTBOUNDShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/MessageStatusTests.cs b/src/freeclimb.Test/Enums/MessageStatusTests.cs index 2fda81ec..9d9685e3 100644 --- a/src/freeclimb.Test/Enums/MessageStatusTests.cs +++ b/src/freeclimb.Test/Enums/MessageStatusTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class MessageStatusTests + + public class MessageStatusTests : IDisposable { private MessageStatus instance; public MessageStatusTests() { instance = new MessageStatus(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void MessageStatusInstanceTest() Assert.IsType(instance); } - [Fact] public void TestNEWShouldWork() { @@ -91,7 +90,8 @@ public void TestQUEUEDShouldWork() public void TestQUEUEDShouldSerializeToEnum() { MessageStatus expectedValue = MessageStatus.QUEUED; - MessageStatus calculatedValue = (MessageStatus)Enum.Parse(typeof(MessageStatus), "QUEUED"); + MessageStatus calculatedValue = (MessageStatus) + Enum.Parse(typeof(MessageStatus), "QUEUED"); Assert.Equal(expectedValue, calculatedValue); } @@ -115,7 +115,8 @@ public void TestREJECTEDShouldWork() public void TestREJECTEDShouldSerializeToEnum() { MessageStatus expectedValue = MessageStatus.REJECTED; - MessageStatus calculatedValue = (MessageStatus)Enum.Parse(typeof(MessageStatus), "REJECTED"); + MessageStatus calculatedValue = (MessageStatus) + Enum.Parse(typeof(MessageStatus), "REJECTED"); Assert.Equal(expectedValue, calculatedValue); } @@ -139,7 +140,8 @@ public void TestSENDINGShouldWork() public void TestSENDINGShouldSerializeToEnum() { MessageStatus expectedValue = MessageStatus.SENDING; - MessageStatus calculatedValue = (MessageStatus)Enum.Parse(typeof(MessageStatus), "SENDING"); + MessageStatus calculatedValue = (MessageStatus) + Enum.Parse(typeof(MessageStatus), "SENDING"); Assert.Equal(expectedValue, calculatedValue); } @@ -163,7 +165,8 @@ public void TestSENTShouldWork() public void TestSENTShouldSerializeToEnum() { MessageStatus expectedValue = MessageStatus.SENT; - MessageStatus calculatedValue = (MessageStatus)Enum.Parse(typeof(MessageStatus), "SENT"); + MessageStatus calculatedValue = (MessageStatus) + Enum.Parse(typeof(MessageStatus), "SENT"); Assert.Equal(expectedValue, calculatedValue); } @@ -187,7 +190,8 @@ public void TestFAILEDShouldWork() public void TestFAILEDShouldSerializeToEnum() { MessageStatus expectedValue = MessageStatus.FAILED; - MessageStatus calculatedValue = (MessageStatus)Enum.Parse(typeof(MessageStatus), "FAILED"); + MessageStatus calculatedValue = (MessageStatus) + Enum.Parse(typeof(MessageStatus), "FAILED"); Assert.Equal(expectedValue, calculatedValue); } @@ -211,7 +215,8 @@ public void TestRECEIVEDShouldWork() public void TestRECEIVEDShouldSerializeToEnum() { MessageStatus expectedValue = MessageStatus.RECEIVED; - MessageStatus calculatedValue = (MessageStatus)Enum.Parse(typeof(MessageStatus), "RECEIVED"); + MessageStatus calculatedValue = (MessageStatus) + Enum.Parse(typeof(MessageStatus), "RECEIVED"); Assert.Equal(expectedValue, calculatedValue); } @@ -235,7 +240,8 @@ public void TestUNDELIVEREDShouldWork() public void TestUNDELIVEREDShouldSerializeToEnum() { MessageStatus expectedValue = MessageStatus.UNDELIVERED; - MessageStatus calculatedValue = (MessageStatus)Enum.Parse(typeof(MessageStatus), "UNDELIVERED"); + MessageStatus calculatedValue = (MessageStatus) + Enum.Parse(typeof(MessageStatus), "UNDELIVERED"); Assert.Equal(expectedValue, calculatedValue); } @@ -259,7 +265,8 @@ public void TestEXPIREDShouldWork() public void TestEXPIREDShouldSerializeToEnum() { MessageStatus expectedValue = MessageStatus.EXPIRED; - MessageStatus calculatedValue = (MessageStatus)Enum.Parse(typeof(MessageStatus), "EXPIRED"); + MessageStatus calculatedValue = (MessageStatus) + Enum.Parse(typeof(MessageStatus), "EXPIRED"); Assert.Equal(expectedValue, calculatedValue); } @@ -283,7 +290,8 @@ public void TestDELETEDShouldWork() public void TestDELETEDShouldSerializeToEnum() { MessageStatus expectedValue = MessageStatus.DELETED; - MessageStatus calculatedValue = (MessageStatus)Enum.Parse(typeof(MessageStatus), "DELETED"); + MessageStatus calculatedValue = (MessageStatus) + Enum.Parse(typeof(MessageStatus), "DELETED"); Assert.Equal(expectedValue, calculatedValue); } @@ -307,7 +315,8 @@ public void TestUNKNOWNShouldWork() public void TestUNKNOWNShouldSerializeToEnum() { MessageStatus expectedValue = MessageStatus.UNKNOWN; - MessageStatus calculatedValue = (MessageStatus)Enum.Parse(typeof(MessageStatus), "UNKNOWN"); + MessageStatus calculatedValue = (MessageStatus) + Enum.Parse(typeof(MessageStatus), "UNKNOWN"); Assert.Equal(expectedValue, calculatedValue); } @@ -319,6 +328,5 @@ public void TestUNKNOWNShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/PlayBeepTests.cs b/src/freeclimb.Test/Enums/PlayBeepTests.cs index bbd1cf52..b4b52b3f 100644 --- a/src/freeclimb.Test/Enums/PlayBeepTests.cs +++ b/src/freeclimb.Test/Enums/PlayBeepTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class PlayBeepTests + + public class PlayBeepTests : IDisposable { private PlayBeep instance; public PlayBeepTests() { instance = new PlayBeep(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void PlayBeepInstanceTest() Assert.IsType(instance); } - [Fact] public void TestALWAYSShouldWork() { @@ -151,6 +150,5 @@ public void TestEXIT_ONLYShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/QueueResultStatusTests.cs b/src/freeclimb.Test/Enums/QueueResultStatusTests.cs index ab683729..d7db5d78 100644 --- a/src/freeclimb.Test/Enums/QueueResultStatusTests.cs +++ b/src/freeclimb.Test/Enums/QueueResultStatusTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class QueueResultStatusTests + + public class QueueResultStatusTests : IDisposable { private QueueResultStatus instance; public QueueResultStatusTests() { instance = new QueueResultStatus(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void QueueResultStatusInstanceTest() Assert.IsType(instance); } - [Fact] public void TestQUEUE_FULLShouldWork() { @@ -67,7 +66,8 @@ public void TestQUEUE_FULLShouldWork() public void TestQUEUE_FULLShouldSerializeToEnum() { QueueResultStatus expectedValue = QueueResultStatus.QUEUE_FULL; - QueueResultStatus calculatedValue = (QueueResultStatus)Enum.Parse(typeof(QueueResultStatus), "QUEUE_FULL"); + QueueResultStatus calculatedValue = (QueueResultStatus) + Enum.Parse(typeof(QueueResultStatus), "QUEUE_FULL"); Assert.Equal(expectedValue, calculatedValue); } @@ -91,7 +91,8 @@ public void TestDEQUEUEDShouldWork() public void TestDEQUEUEDShouldSerializeToEnum() { QueueResultStatus expectedValue = QueueResultStatus.DEQUEUED; - QueueResultStatus calculatedValue = (QueueResultStatus)Enum.Parse(typeof(QueueResultStatus), "DEQUEUED"); + QueueResultStatus calculatedValue = (QueueResultStatus) + Enum.Parse(typeof(QueueResultStatus), "DEQUEUED"); Assert.Equal(expectedValue, calculatedValue); } @@ -115,7 +116,8 @@ public void TestHANGUPShouldWork() public void TestHANGUPShouldSerializeToEnum() { QueueResultStatus expectedValue = QueueResultStatus.HANGUP; - QueueResultStatus calculatedValue = (QueueResultStatus)Enum.Parse(typeof(QueueResultStatus), "HANGUP"); + QueueResultStatus calculatedValue = (QueueResultStatus) + Enum.Parse(typeof(QueueResultStatus), "HANGUP"); Assert.Equal(expectedValue, calculatedValue); } @@ -139,7 +141,8 @@ public void TestSYSTEM_ERRORShouldWork() public void TestSYSTEM_ERRORShouldSerializeToEnum() { QueueResultStatus expectedValue = QueueResultStatus.SYSTEM_ERROR; - QueueResultStatus calculatedValue = (QueueResultStatus)Enum.Parse(typeof(QueueResultStatus), "SYSTEM_ERROR"); + QueueResultStatus calculatedValue = (QueueResultStatus) + Enum.Parse(typeof(QueueResultStatus), "SYSTEM_ERROR"); Assert.Equal(expectedValue, calculatedValue); } @@ -151,6 +154,5 @@ public void TestSYSTEM_ERRORShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/RecordUtteranceTermReasonTests.cs b/src/freeclimb.Test/Enums/RecordUtteranceTermReasonTests.cs index 74170c28..67f2bdfa 100644 --- a/src/freeclimb.Test/Enums/RecordUtteranceTermReasonTests.cs +++ b/src/freeclimb.Test/Enums/RecordUtteranceTermReasonTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class RecordUtteranceTermReasonTests + + public class RecordUtteranceTermReasonTests : IDisposable { private RecordUtteranceTermReason instance; public RecordUtteranceTermReasonTests() { instance = new RecordUtteranceTermReason(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void RecordUtteranceTermReasonInstanceTest() Assert.IsType(instance); } - [Fact] public void TestFINISH_KEYShouldWork() { @@ -67,7 +66,8 @@ public void TestFINISH_KEYShouldWork() public void TestFINISH_KEYShouldSerializeToEnum() { RecordUtteranceTermReason expectedValue = RecordUtteranceTermReason.FINISH_KEY; - RecordUtteranceTermReason calculatedValue = (RecordUtteranceTermReason)Enum.Parse(typeof(RecordUtteranceTermReason), "FINISH_KEY"); + RecordUtteranceTermReason calculatedValue = (RecordUtteranceTermReason) + Enum.Parse(typeof(RecordUtteranceTermReason), "FINISH_KEY"); Assert.Equal(expectedValue, calculatedValue); } @@ -91,7 +91,8 @@ public void TestTIMEOUTShouldWork() public void TestTIMEOUTShouldSerializeToEnum() { RecordUtteranceTermReason expectedValue = RecordUtteranceTermReason.TIMEOUT; - RecordUtteranceTermReason calculatedValue = (RecordUtteranceTermReason)Enum.Parse(typeof(RecordUtteranceTermReason), "TIMEOUT"); + RecordUtteranceTermReason calculatedValue = (RecordUtteranceTermReason) + Enum.Parse(typeof(RecordUtteranceTermReason), "TIMEOUT"); Assert.Equal(expectedValue, calculatedValue); } @@ -115,7 +116,8 @@ public void TestHANGUPShouldWork() public void TestHANGUPShouldSerializeToEnum() { RecordUtteranceTermReason expectedValue = RecordUtteranceTermReason.HANGUP; - RecordUtteranceTermReason calculatedValue = (RecordUtteranceTermReason)Enum.Parse(typeof(RecordUtteranceTermReason), "HANGUP"); + RecordUtteranceTermReason calculatedValue = (RecordUtteranceTermReason) + Enum.Parse(typeof(RecordUtteranceTermReason), "HANGUP"); Assert.Equal(expectedValue, calculatedValue); } @@ -139,7 +141,8 @@ public void TestMAX_LENGTHShouldWork() public void TestMAX_LENGTHShouldSerializeToEnum() { RecordUtteranceTermReason expectedValue = RecordUtteranceTermReason.MAX_LENGTH; - RecordUtteranceTermReason calculatedValue = (RecordUtteranceTermReason)Enum.Parse(typeof(RecordUtteranceTermReason), "MAX_LENGTH"); + RecordUtteranceTermReason calculatedValue = (RecordUtteranceTermReason) + Enum.Parse(typeof(RecordUtteranceTermReason), "MAX_LENGTH"); Assert.Equal(expectedValue, calculatedValue); } @@ -151,6 +154,5 @@ public void TestMAX_LENGTHShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/RequestTypeTests.cs b/src/freeclimb.Test/Enums/RequestTypeTests.cs index 2cedfe6d..56794f7f 100644 --- a/src/freeclimb.Test/Enums/RequestTypeTests.cs +++ b/src/freeclimb.Test/Enums/RequestTypeTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class RequestTypeTests + + public class RequestTypeTests : IDisposable { private RequestType instance; public RequestTypeTests() { instance = new RequestType(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void RequestTypeInstanceTest() Assert.IsType(instance); } - [Fact] public void TestINBOUND_CALLShouldWork() { @@ -67,7 +66,8 @@ public void TestINBOUND_CALLShouldWork() public void TestINBOUND_CALLShouldSerializeToEnum() { RequestType expectedValue = RequestType.INBOUND_CALL; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "INBOUND_CALL"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "INBOUND_CALL"); Assert.Equal(expectedValue, calculatedValue); } @@ -115,7 +115,8 @@ public void TestGET_DIGITSShouldWork() public void TestGET_DIGITSShouldSerializeToEnum() { RequestType expectedValue = RequestType.GET_DIGITS; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "GET_DIGITS"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "GET_DIGITS"); Assert.Equal(expectedValue, calculatedValue); } @@ -139,7 +140,8 @@ public void TestGET_SPEECHShouldWork() public void TestGET_SPEECHShouldSerializeToEnum() { RequestType expectedValue = RequestType.GET_SPEECH; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "GET_SPEECH"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "GET_SPEECH"); Assert.Equal(expectedValue, calculatedValue); } @@ -211,7 +213,8 @@ public void TestOUT_DIAL_STARTShouldWork() public void TestOUT_DIAL_STARTShouldSerializeToEnum() { RequestType expectedValue = RequestType.OUT_DIAL_START; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "OUT_DIAL_START"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "OUT_DIAL_START"); Assert.Equal(expectedValue, calculatedValue); } @@ -235,7 +238,8 @@ public void TestOUT_DIAL_CONNECTShouldWork() public void TestOUT_DIAL_CONNECTShouldSerializeToEnum() { RequestType expectedValue = RequestType.OUT_DIAL_CONNECT; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "OUT_DIAL_CONNECT"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "OUT_DIAL_CONNECT"); Assert.Equal(expectedValue, calculatedValue); } @@ -259,7 +263,8 @@ public void TestOUT_DIAL_API_CONNECTShouldWork() public void TestOUT_DIAL_API_CONNECTShouldSerializeToEnum() { RequestType expectedValue = RequestType.OUT_DIAL_API_CONNECT; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "OUT_DIAL_API_CONNECT"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "OUT_DIAL_API_CONNECT"); Assert.Equal(expectedValue, calculatedValue); } @@ -283,7 +288,8 @@ public void TestMACHINE_DETECTEDShouldWork() public void TestMACHINE_DETECTEDShouldSerializeToEnum() { RequestType expectedValue = RequestType.MACHINE_DETECTED; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "MACHINE_DETECTED"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "MACHINE_DETECTED"); Assert.Equal(expectedValue, calculatedValue); } @@ -331,7 +337,8 @@ public void TestQUEUE_WAITShouldWork() public void TestQUEUE_WAITShouldSerializeToEnum() { RequestType expectedValue = RequestType.QUEUE_WAIT; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "QUEUE_WAIT"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "QUEUE_WAIT"); Assert.Equal(expectedValue, calculatedValue); } @@ -355,7 +362,8 @@ public void TestADD_TO_QUEUE_NOTIFICATIONShouldWork() public void TestADD_TO_QUEUE_NOTIFICATIONShouldSerializeToEnum() { RequestType expectedValue = RequestType.ADD_TO_QUEUE_NOTIFICATION; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "ADD_TO_QUEUE_NOTIFICATION"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "ADD_TO_QUEUE_NOTIFICATION"); Assert.Equal(expectedValue, calculatedValue); } @@ -379,7 +387,8 @@ public void TestREMOVE_FROM_QUEUE_NOTIFICATIONShouldWork() public void TestREMOVE_FROM_QUEUE_NOTIFICATIONShouldSerializeToEnum() { RequestType expectedValue = RequestType.REMOVE_FROM_QUEUE_NOTIFICATION; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "REMOVE_FROM_QUEUE_NOTIFICATION"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "REMOVE_FROM_QUEUE_NOTIFICATION"); Assert.Equal(expectedValue, calculatedValue); } @@ -403,7 +412,8 @@ public void TestCALL_STATUSShouldWork() public void TestCALL_STATUSShouldSerializeToEnum() { RequestType expectedValue = RequestType.CALL_STATUS; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "CALL_STATUS"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "CALL_STATUS"); Assert.Equal(expectedValue, calculatedValue); } @@ -427,7 +437,8 @@ public void TestCREATE_CONFERENCEShouldWork() public void TestCREATE_CONFERENCEShouldSerializeToEnum() { RequestType expectedValue = RequestType.CREATE_CONFERENCE; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "CREATE_CONFERENCE"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "CREATE_CONFERENCE"); Assert.Equal(expectedValue, calculatedValue); } @@ -451,7 +462,8 @@ public void TestCONFERENCE_STATUSShouldWork() public void TestCONFERENCE_STATUSShouldSerializeToEnum() { RequestType expectedValue = RequestType.CONFERENCE_STATUS; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "CONFERENCE_STATUS"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "CONFERENCE_STATUS"); Assert.Equal(expectedValue, calculatedValue); } @@ -475,7 +487,8 @@ public void TestLEAVE_CONFERENCEShouldWork() public void TestLEAVE_CONFERENCEShouldSerializeToEnum() { RequestType expectedValue = RequestType.LEAVE_CONFERENCE; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "LEAVE_CONFERENCE"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "LEAVE_CONFERENCE"); Assert.Equal(expectedValue, calculatedValue); } @@ -499,7 +512,8 @@ public void TestADD_TO_CONFERENCE_NOTIFICATIONShouldWork() public void TestADD_TO_CONFERENCE_NOTIFICATIONShouldSerializeToEnum() { RequestType expectedValue = RequestType.ADD_TO_CONFERENCE_NOTIFICATION; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "ADD_TO_CONFERENCE_NOTIFICATION"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "ADD_TO_CONFERENCE_NOTIFICATION"); Assert.Equal(expectedValue, calculatedValue); } @@ -523,7 +537,8 @@ public void TestCONFERENCE_RECORDING_STATUSShouldWork() public void TestCONFERENCE_RECORDING_STATUSShouldSerializeToEnum() { RequestType expectedValue = RequestType.CONFERENCE_RECORDING_STATUS; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "CONFERENCE_RECORDING_STATUS"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "CONFERENCE_RECORDING_STATUS"); Assert.Equal(expectedValue, calculatedValue); } @@ -547,7 +562,8 @@ public void TestCONFERENCE_CALL_CONTROLShouldWork() public void TestCONFERENCE_CALL_CONTROLShouldSerializeToEnum() { RequestType expectedValue = RequestType.CONFERENCE_CALL_CONTROL; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "CONFERENCE_CALL_CONTROL"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "CONFERENCE_CALL_CONTROL"); Assert.Equal(expectedValue, calculatedValue); } @@ -571,7 +587,8 @@ public void TestMESSAGE_DELIVERYShouldWork() public void TestMESSAGE_DELIVERYShouldSerializeToEnum() { RequestType expectedValue = RequestType.MESSAGE_DELIVERY; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "MESSAGE_DELIVERY"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "MESSAGE_DELIVERY"); Assert.Equal(expectedValue, calculatedValue); } @@ -595,7 +612,8 @@ public void TestMESSAGE_STATUSShouldWork() public void TestMESSAGE_STATUSShouldSerializeToEnum() { RequestType expectedValue = RequestType.MESSAGE_STATUS; - RequestType calculatedValue = (RequestType)Enum.Parse(typeof(RequestType), "MESSAGE_STATUS"); + RequestType calculatedValue = (RequestType) + Enum.Parse(typeof(RequestType), "MESSAGE_STATUS"); Assert.Equal(expectedValue, calculatedValue); } @@ -607,6 +625,5 @@ public void TestMESSAGE_STATUSShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/SMSTenDLCBrandAltBusinessIdTypeTests.cs b/src/freeclimb.Test/Enums/SMSTenDLCBrandAltBusinessIdTypeTests.cs new file mode 100644 index 00000000..d0330e40 --- /dev/null +++ b/src/freeclimb.Test/Enums/SMSTenDLCBrandAltBusinessIdTypeTests.cs @@ -0,0 +1,158 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Enums +{ + /// + /// Class for testing SMSTenDLCBrandAltBusinessIdType + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class SMSTenDLCBrandAltBusinessIdTypeTests : IDisposable + { + private SMSTenDLCBrandAltBusinessIdType instance; + + public SMSTenDLCBrandAltBusinessIdTypeTests() + { + instance = new SMSTenDLCBrandAltBusinessIdType(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SMSTenDLCBrandAltBusinessIdType + /// + [Fact] + public void SMSTenDLCBrandAltBusinessIdTypeInstanceTest() + { + Assert.IsType(instance); + } + + [Fact] + public void TestNONEShouldWork() + { + SMSTenDLCBrandAltBusinessIdType test = SMSTenDLCBrandAltBusinessIdType.NONE; + Assert.Equal(typeof(SMSTenDLCBrandAltBusinessIdType), test.GetType()); + } + + [Fact] + public void TestNONEShouldSerializeToEnum() + { + SMSTenDLCBrandAltBusinessIdType expectedValue = SMSTenDLCBrandAltBusinessIdType.NONE; + SMSTenDLCBrandAltBusinessIdType calculatedValue = (SMSTenDLCBrandAltBusinessIdType) + Enum.Parse(typeof(SMSTenDLCBrandAltBusinessIdType), "NONE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNONEShouldDeserializeToString() + { + SMSTenDLCBrandAltBusinessIdType test = SMSTenDLCBrandAltBusinessIdType.NONE; + string expectedValue = "NONE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestDUNSShouldWork() + { + SMSTenDLCBrandAltBusinessIdType test = SMSTenDLCBrandAltBusinessIdType.DUNS; + Assert.Equal(typeof(SMSTenDLCBrandAltBusinessIdType), test.GetType()); + } + + [Fact] + public void TestDUNSShouldSerializeToEnum() + { + SMSTenDLCBrandAltBusinessIdType expectedValue = SMSTenDLCBrandAltBusinessIdType.DUNS; + SMSTenDLCBrandAltBusinessIdType calculatedValue = (SMSTenDLCBrandAltBusinessIdType) + Enum.Parse(typeof(SMSTenDLCBrandAltBusinessIdType), "DUNS"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestDUNSShouldDeserializeToString() + { + SMSTenDLCBrandAltBusinessIdType test = SMSTenDLCBrandAltBusinessIdType.DUNS; + string expectedValue = "DUNS"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestGIINShouldWork() + { + SMSTenDLCBrandAltBusinessIdType test = SMSTenDLCBrandAltBusinessIdType.GIIN; + Assert.Equal(typeof(SMSTenDLCBrandAltBusinessIdType), test.GetType()); + } + + [Fact] + public void TestGIINShouldSerializeToEnum() + { + SMSTenDLCBrandAltBusinessIdType expectedValue = SMSTenDLCBrandAltBusinessIdType.GIIN; + SMSTenDLCBrandAltBusinessIdType calculatedValue = (SMSTenDLCBrandAltBusinessIdType) + Enum.Parse(typeof(SMSTenDLCBrandAltBusinessIdType), "GIIN"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestGIINShouldDeserializeToString() + { + SMSTenDLCBrandAltBusinessIdType test = SMSTenDLCBrandAltBusinessIdType.GIIN; + string expectedValue = "GIIN"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestLEIShouldWork() + { + SMSTenDLCBrandAltBusinessIdType test = SMSTenDLCBrandAltBusinessIdType.LEI; + Assert.Equal(typeof(SMSTenDLCBrandAltBusinessIdType), test.GetType()); + } + + [Fact] + public void TestLEIShouldSerializeToEnum() + { + SMSTenDLCBrandAltBusinessIdType expectedValue = SMSTenDLCBrandAltBusinessIdType.LEI; + SMSTenDLCBrandAltBusinessIdType calculatedValue = (SMSTenDLCBrandAltBusinessIdType) + Enum.Parse(typeof(SMSTenDLCBrandAltBusinessIdType), "LEI"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestLEIShouldDeserializeToString() + { + SMSTenDLCBrandAltBusinessIdType test = SMSTenDLCBrandAltBusinessIdType.LEI; + string expectedValue = "LEI"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + } +} diff --git a/src/freeclimb.Test/Enums/SMSTenDLCBrandEntityTypeTests.cs b/src/freeclimb.Test/Enums/SMSTenDLCBrandEntityTypeTests.cs new file mode 100644 index 00000000..b858f1d2 --- /dev/null +++ b/src/freeclimb.Test/Enums/SMSTenDLCBrandEntityTypeTests.cs @@ -0,0 +1,183 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Enums +{ + /// + /// Class for testing SMSTenDLCBrandEntityType + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class SMSTenDLCBrandEntityTypeTests : IDisposable + { + private SMSTenDLCBrandEntityType instance; + + public SMSTenDLCBrandEntityTypeTests() + { + instance = new SMSTenDLCBrandEntityType(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SMSTenDLCBrandEntityType + /// + [Fact] + public void SMSTenDLCBrandEntityTypeInstanceTest() + { + Assert.IsType(instance); + } + + [Fact] + public void TestPRIVATE_PROFITShouldWork() + { + SMSTenDLCBrandEntityType test = SMSTenDLCBrandEntityType.PRIVATE_PROFIT; + Assert.Equal(typeof(SMSTenDLCBrandEntityType), test.GetType()); + } + + [Fact] + public void TestPRIVATE_PROFITShouldSerializeToEnum() + { + SMSTenDLCBrandEntityType expectedValue = SMSTenDLCBrandEntityType.PRIVATE_PROFIT; + SMSTenDLCBrandEntityType calculatedValue = (SMSTenDLCBrandEntityType) + Enum.Parse(typeof(SMSTenDLCBrandEntityType), "PRIVATE_PROFIT"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestPRIVATE_PROFITShouldDeserializeToString() + { + SMSTenDLCBrandEntityType test = SMSTenDLCBrandEntityType.PRIVATE_PROFIT; + string expectedValue = "PRIVATE_PROFIT"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestPUBLIC_PROFITShouldWork() + { + SMSTenDLCBrandEntityType test = SMSTenDLCBrandEntityType.PUBLIC_PROFIT; + Assert.Equal(typeof(SMSTenDLCBrandEntityType), test.GetType()); + } + + [Fact] + public void TestPUBLIC_PROFITShouldSerializeToEnum() + { + SMSTenDLCBrandEntityType expectedValue = SMSTenDLCBrandEntityType.PUBLIC_PROFIT; + SMSTenDLCBrandEntityType calculatedValue = (SMSTenDLCBrandEntityType) + Enum.Parse(typeof(SMSTenDLCBrandEntityType), "PUBLIC_PROFIT"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestPUBLIC_PROFITShouldDeserializeToString() + { + SMSTenDLCBrandEntityType test = SMSTenDLCBrandEntityType.PUBLIC_PROFIT; + string expectedValue = "PUBLIC_PROFIT"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNON_PROFITShouldWork() + { + SMSTenDLCBrandEntityType test = SMSTenDLCBrandEntityType.NON_PROFIT; + Assert.Equal(typeof(SMSTenDLCBrandEntityType), test.GetType()); + } + + [Fact] + public void TestNON_PROFITShouldSerializeToEnum() + { + SMSTenDLCBrandEntityType expectedValue = SMSTenDLCBrandEntityType.NON_PROFIT; + SMSTenDLCBrandEntityType calculatedValue = (SMSTenDLCBrandEntityType) + Enum.Parse(typeof(SMSTenDLCBrandEntityType), "NON_PROFIT"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNON_PROFITShouldDeserializeToString() + { + SMSTenDLCBrandEntityType test = SMSTenDLCBrandEntityType.NON_PROFIT; + string expectedValue = "NON_PROFIT"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestGOVERNMENTShouldWork() + { + SMSTenDLCBrandEntityType test = SMSTenDLCBrandEntityType.GOVERNMENT; + Assert.Equal(typeof(SMSTenDLCBrandEntityType), test.GetType()); + } + + [Fact] + public void TestGOVERNMENTShouldSerializeToEnum() + { + SMSTenDLCBrandEntityType expectedValue = SMSTenDLCBrandEntityType.GOVERNMENT; + SMSTenDLCBrandEntityType calculatedValue = (SMSTenDLCBrandEntityType) + Enum.Parse(typeof(SMSTenDLCBrandEntityType), "GOVERNMENT"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestGOVERNMENTShouldDeserializeToString() + { + SMSTenDLCBrandEntityType test = SMSTenDLCBrandEntityType.GOVERNMENT; + string expectedValue = "GOVERNMENT"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSOLE_PROPRIETORShouldWork() + { + SMSTenDLCBrandEntityType test = SMSTenDLCBrandEntityType.SOLE_PROPRIETOR; + Assert.Equal(typeof(SMSTenDLCBrandEntityType), test.GetType()); + } + + [Fact] + public void TestSOLE_PROPRIETORShouldSerializeToEnum() + { + SMSTenDLCBrandEntityType expectedValue = SMSTenDLCBrandEntityType.SOLE_PROPRIETOR; + SMSTenDLCBrandEntityType calculatedValue = (SMSTenDLCBrandEntityType) + Enum.Parse(typeof(SMSTenDLCBrandEntityType), "SOLE_PROPRIETOR"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSOLE_PROPRIETORShouldDeserializeToString() + { + SMSTenDLCBrandEntityType test = SMSTenDLCBrandEntityType.SOLE_PROPRIETOR; + string expectedValue = "SOLE_PROPRIETOR"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + } +} diff --git a/src/freeclimb.Test/Enums/SMSTenDLCBrandIdentityStatusTests.cs b/src/freeclimb.Test/Enums/SMSTenDLCBrandIdentityStatusTests.cs new file mode 100644 index 00000000..751424d9 --- /dev/null +++ b/src/freeclimb.Test/Enums/SMSTenDLCBrandIdentityStatusTests.cs @@ -0,0 +1,159 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Enums +{ + /// + /// Class for testing SMSTenDLCBrandIdentityStatus + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class SMSTenDLCBrandIdentityStatusTests : IDisposable + { + private SMSTenDLCBrandIdentityStatus instance; + + public SMSTenDLCBrandIdentityStatusTests() + { + instance = new SMSTenDLCBrandIdentityStatus(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SMSTenDLCBrandIdentityStatus + /// + [Fact] + public void SMSTenDLCBrandIdentityStatusInstanceTest() + { + Assert.IsType(instance); + } + + [Fact] + public void TestSELF_DECLAREDShouldWork() + { + SMSTenDLCBrandIdentityStatus test = SMSTenDLCBrandIdentityStatus.SELF_DECLARED; + Assert.Equal(typeof(SMSTenDLCBrandIdentityStatus), test.GetType()); + } + + [Fact] + public void TestSELF_DECLAREDShouldSerializeToEnum() + { + SMSTenDLCBrandIdentityStatus expectedValue = SMSTenDLCBrandIdentityStatus.SELF_DECLARED; + SMSTenDLCBrandIdentityStatus calculatedValue = (SMSTenDLCBrandIdentityStatus) + Enum.Parse(typeof(SMSTenDLCBrandIdentityStatus), "SELF_DECLARED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSELF_DECLAREDShouldDeserializeToString() + { + SMSTenDLCBrandIdentityStatus test = SMSTenDLCBrandIdentityStatus.SELF_DECLARED; + string expectedValue = "SELF_DECLARED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestUNVERIFIEDShouldWork() + { + SMSTenDLCBrandIdentityStatus test = SMSTenDLCBrandIdentityStatus.UNVERIFIED; + Assert.Equal(typeof(SMSTenDLCBrandIdentityStatus), test.GetType()); + } + + [Fact] + public void TestUNVERIFIEDShouldSerializeToEnum() + { + SMSTenDLCBrandIdentityStatus expectedValue = SMSTenDLCBrandIdentityStatus.UNVERIFIED; + SMSTenDLCBrandIdentityStatus calculatedValue = (SMSTenDLCBrandIdentityStatus) + Enum.Parse(typeof(SMSTenDLCBrandIdentityStatus), "UNVERIFIED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestUNVERIFIEDShouldDeserializeToString() + { + SMSTenDLCBrandIdentityStatus test = SMSTenDLCBrandIdentityStatus.UNVERIFIED; + string expectedValue = "UNVERIFIED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestVERIFIEDShouldWork() + { + SMSTenDLCBrandIdentityStatus test = SMSTenDLCBrandIdentityStatus.VERIFIED; + Assert.Equal(typeof(SMSTenDLCBrandIdentityStatus), test.GetType()); + } + + [Fact] + public void TestVERIFIEDShouldSerializeToEnum() + { + SMSTenDLCBrandIdentityStatus expectedValue = SMSTenDLCBrandIdentityStatus.VERIFIED; + SMSTenDLCBrandIdentityStatus calculatedValue = (SMSTenDLCBrandIdentityStatus) + Enum.Parse(typeof(SMSTenDLCBrandIdentityStatus), "VERIFIED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestVERIFIEDShouldDeserializeToString() + { + SMSTenDLCBrandIdentityStatus test = SMSTenDLCBrandIdentityStatus.VERIFIED; + string expectedValue = "VERIFIED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestVETTED_VERIFIEDShouldWork() + { + SMSTenDLCBrandIdentityStatus test = SMSTenDLCBrandIdentityStatus.VETTED_VERIFIED; + Assert.Equal(typeof(SMSTenDLCBrandIdentityStatus), test.GetType()); + } + + [Fact] + public void TestVETTED_VERIFIEDShouldSerializeToEnum() + { + SMSTenDLCBrandIdentityStatus expectedValue = + SMSTenDLCBrandIdentityStatus.VETTED_VERIFIED; + SMSTenDLCBrandIdentityStatus calculatedValue = (SMSTenDLCBrandIdentityStatus) + Enum.Parse(typeof(SMSTenDLCBrandIdentityStatus), "VETTED_VERIFIED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestVETTED_VERIFIEDShouldDeserializeToString() + { + SMSTenDLCBrandIdentityStatus test = SMSTenDLCBrandIdentityStatus.VETTED_VERIFIED; + string expectedValue = "VETTED_VERIFIED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + } +} diff --git a/src/freeclimb.Test/Enums/SMSTenDLCBrandRelationshipTests.cs b/src/freeclimb.Test/Enums/SMSTenDLCBrandRelationshipTests.cs new file mode 100644 index 00000000..3722662c --- /dev/null +++ b/src/freeclimb.Test/Enums/SMSTenDLCBrandRelationshipTests.cs @@ -0,0 +1,183 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Enums +{ + /// + /// Class for testing SMSTenDLCBrandRelationship + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class SMSTenDLCBrandRelationshipTests : IDisposable + { + private SMSTenDLCBrandRelationship instance; + + public SMSTenDLCBrandRelationshipTests() + { + instance = new SMSTenDLCBrandRelationship(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SMSTenDLCBrandRelationship + /// + [Fact] + public void SMSTenDLCBrandRelationshipInstanceTest() + { + Assert.IsType(instance); + } + + [Fact] + public void TestBASIC_ACCOUNTShouldWork() + { + SMSTenDLCBrandRelationship test = SMSTenDLCBrandRelationship.BASIC_ACCOUNT; + Assert.Equal(typeof(SMSTenDLCBrandRelationship), test.GetType()); + } + + [Fact] + public void TestBASIC_ACCOUNTShouldSerializeToEnum() + { + SMSTenDLCBrandRelationship expectedValue = SMSTenDLCBrandRelationship.BASIC_ACCOUNT; + SMSTenDLCBrandRelationship calculatedValue = (SMSTenDLCBrandRelationship) + Enum.Parse(typeof(SMSTenDLCBrandRelationship), "BASIC_ACCOUNT"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestBASIC_ACCOUNTShouldDeserializeToString() + { + SMSTenDLCBrandRelationship test = SMSTenDLCBrandRelationship.BASIC_ACCOUNT; + string expectedValue = "BASIC_ACCOUNT"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSMALL_ACCOUNTShouldWork() + { + SMSTenDLCBrandRelationship test = SMSTenDLCBrandRelationship.SMALL_ACCOUNT; + Assert.Equal(typeof(SMSTenDLCBrandRelationship), test.GetType()); + } + + [Fact] + public void TestSMALL_ACCOUNTShouldSerializeToEnum() + { + SMSTenDLCBrandRelationship expectedValue = SMSTenDLCBrandRelationship.SMALL_ACCOUNT; + SMSTenDLCBrandRelationship calculatedValue = (SMSTenDLCBrandRelationship) + Enum.Parse(typeof(SMSTenDLCBrandRelationship), "SMALL_ACCOUNT"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSMALL_ACCOUNTShouldDeserializeToString() + { + SMSTenDLCBrandRelationship test = SMSTenDLCBrandRelationship.SMALL_ACCOUNT; + string expectedValue = "SMALL_ACCOUNT"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestMEDIUM_ACCOUNTShouldWork() + { + SMSTenDLCBrandRelationship test = SMSTenDLCBrandRelationship.MEDIUM_ACCOUNT; + Assert.Equal(typeof(SMSTenDLCBrandRelationship), test.GetType()); + } + + [Fact] + public void TestMEDIUM_ACCOUNTShouldSerializeToEnum() + { + SMSTenDLCBrandRelationship expectedValue = SMSTenDLCBrandRelationship.MEDIUM_ACCOUNT; + SMSTenDLCBrandRelationship calculatedValue = (SMSTenDLCBrandRelationship) + Enum.Parse(typeof(SMSTenDLCBrandRelationship), "MEDIUM_ACCOUNT"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestMEDIUM_ACCOUNTShouldDeserializeToString() + { + SMSTenDLCBrandRelationship test = SMSTenDLCBrandRelationship.MEDIUM_ACCOUNT; + string expectedValue = "MEDIUM_ACCOUNT"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestLARGE_ACCOUNTShouldWork() + { + SMSTenDLCBrandRelationship test = SMSTenDLCBrandRelationship.LARGE_ACCOUNT; + Assert.Equal(typeof(SMSTenDLCBrandRelationship), test.GetType()); + } + + [Fact] + public void TestLARGE_ACCOUNTShouldSerializeToEnum() + { + SMSTenDLCBrandRelationship expectedValue = SMSTenDLCBrandRelationship.LARGE_ACCOUNT; + SMSTenDLCBrandRelationship calculatedValue = (SMSTenDLCBrandRelationship) + Enum.Parse(typeof(SMSTenDLCBrandRelationship), "LARGE_ACCOUNT"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestLARGE_ACCOUNTShouldDeserializeToString() + { + SMSTenDLCBrandRelationship test = SMSTenDLCBrandRelationship.LARGE_ACCOUNT; + string expectedValue = "LARGE_ACCOUNT"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestKEY_ACCOUNTShouldWork() + { + SMSTenDLCBrandRelationship test = SMSTenDLCBrandRelationship.KEY_ACCOUNT; + Assert.Equal(typeof(SMSTenDLCBrandRelationship), test.GetType()); + } + + [Fact] + public void TestKEY_ACCOUNTShouldSerializeToEnum() + { + SMSTenDLCBrandRelationship expectedValue = SMSTenDLCBrandRelationship.KEY_ACCOUNT; + SMSTenDLCBrandRelationship calculatedValue = (SMSTenDLCBrandRelationship) + Enum.Parse(typeof(SMSTenDLCBrandRelationship), "KEY_ACCOUNT"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestKEY_ACCOUNTShouldDeserializeToString() + { + SMSTenDLCBrandRelationship test = SMSTenDLCBrandRelationship.KEY_ACCOUNT; + string expectedValue = "KEY_ACCOUNT"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + } +} diff --git a/src/freeclimb.Test/Enums/SMSTenDLCBrandStockExchangeTests.cs b/src/freeclimb.Test/Enums/SMSTenDLCBrandStockExchangeTests.cs new file mode 100644 index 00000000..82196408 --- /dev/null +++ b/src/freeclimb.Test/Enums/SMSTenDLCBrandStockExchangeTests.cs @@ -0,0 +1,733 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Enums +{ + /// + /// Class for testing SMSTenDLCBrandStockExchange + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class SMSTenDLCBrandStockExchangeTests : IDisposable + { + private SMSTenDLCBrandStockExchange instance; + + public SMSTenDLCBrandStockExchangeTests() + { + instance = new SMSTenDLCBrandStockExchange(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SMSTenDLCBrandStockExchange + /// + [Fact] + public void SMSTenDLCBrandStockExchangeInstanceTest() + { + Assert.IsType(instance); + } + + [Fact] + public void TestNONEShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.NONE; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestNONEShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.NONE; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "NONE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNONEShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.NONE; + string expectedValue = "NONE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNASDAQShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.NASDAQ; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestNASDAQShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.NASDAQ; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "NASDAQ"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNASDAQShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.NASDAQ; + string expectedValue = "NASDAQ"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNYSEShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.NYSE; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestNYSEShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.NYSE; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "NYSE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNYSEShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.NYSE; + string expectedValue = "NYSE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestAMEXShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.AMEX; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestAMEXShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.AMEX; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "AMEX"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestAMEXShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.AMEX; + string expectedValue = "AMEX"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestAMXShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.AMX; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestAMXShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.AMX; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "AMX"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestAMXShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.AMX; + string expectedValue = "AMX"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestASXShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.ASX; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestASXShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.ASX; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "ASX"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestASXShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.ASX; + string expectedValue = "ASX"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestB3ShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.B3; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestB3ShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.B3; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "B3"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestB3ShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.B3; + string expectedValue = "B3"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestBMEShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.BME; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestBMEShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.BME; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "BME"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestBMEShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.BME; + string expectedValue = "BME"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestBSEShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.BSE; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestBSEShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.BSE; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "BSE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestBSEShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.BSE; + string expectedValue = "BSE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestFRAShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.FRA; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestFRAShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.FRA; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "FRA"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestFRAShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.FRA; + string expectedValue = "FRA"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestICEXShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.ICEX; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestICEXShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.ICEX; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "ICEX"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestICEXShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.ICEX; + string expectedValue = "ICEX"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestJPXShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.JPX; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestJPXShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.JPX; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "JPX"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestJPXShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.JPX; + string expectedValue = "JPX"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestJSEShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.JSE; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestJSEShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.JSE; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "JSE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestJSEShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.JSE; + string expectedValue = "JSE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestKRXShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.KRX; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestKRXShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.KRX; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "KRX"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestKRXShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.KRX; + string expectedValue = "KRX"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestLONShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.LON; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestLONShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.LON; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "LON"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestLONShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.LON; + string expectedValue = "LON"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNSEShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.NSE; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestNSEShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.NSE; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "NSE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNSEShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.NSE; + string expectedValue = "NSE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestOMXShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.OMX; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestOMXShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.OMX; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "OMX"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestOMXShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.OMX; + string expectedValue = "OMX"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSEHKShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.SEHK; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestSEHKShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.SEHK; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "SEHK"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSEHKShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.SEHK; + string expectedValue = "SEHK"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSGXShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.SGX; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestSGXShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.SGX; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "SGX"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSGXShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.SGX; + string expectedValue = "SGX"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSSEShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.SSE; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestSSEShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.SSE; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "SSE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSSEShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.SSE; + string expectedValue = "SSE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSTOShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.STO; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestSTOShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.STO; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "STO"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSTOShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.STO; + string expectedValue = "STO"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSWXShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.SWX; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestSWXShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.SWX; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "SWX"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSWXShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.SWX; + string expectedValue = "SWX"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSZSEShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.SZSE; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestSZSEShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.SZSE; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "SZSE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestSZSEShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.SZSE; + string expectedValue = "SZSE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestTSXShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.TSX; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestTSXShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.TSX; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "TSX"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestTSXShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.TSX; + string expectedValue = "TSX"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestTWSEShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.TWSE; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestTWSEShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.TWSE; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "TWSE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestTWSEShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.TWSE; + string expectedValue = "TWSE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestVSEShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.VSE; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestVSEShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.VSE; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "VSE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestVSEShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.VSE; + string expectedValue = "VSE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestOTHERShouldWork() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.OTHER; + Assert.Equal(typeof(SMSTenDLCBrandStockExchange), test.GetType()); + } + + [Fact] + public void TestOTHERShouldSerializeToEnum() + { + SMSTenDLCBrandStockExchange expectedValue = SMSTenDLCBrandStockExchange.OTHER; + SMSTenDLCBrandStockExchange calculatedValue = (SMSTenDLCBrandStockExchange) + Enum.Parse(typeof(SMSTenDLCBrandStockExchange), "OTHER"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestOTHERShouldDeserializeToString() + { + SMSTenDLCBrandStockExchange test = SMSTenDLCBrandStockExchange.OTHER; + string expectedValue = "OTHER"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + } +} diff --git a/src/freeclimb.Test/Enums/SMSTenDLCCampaignStatusTests.cs b/src/freeclimb.Test/Enums/SMSTenDLCCampaignStatusTests.cs new file mode 100644 index 00000000..f38596ed --- /dev/null +++ b/src/freeclimb.Test/Enums/SMSTenDLCCampaignStatusTests.cs @@ -0,0 +1,108 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Enums +{ + /// + /// Class for testing SMSTenDLCCampaignStatus + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class SMSTenDLCCampaignStatusTests : IDisposable + { + private SMSTenDLCCampaignStatus instance; + + public SMSTenDLCCampaignStatusTests() + { + instance = new SMSTenDLCCampaignStatus(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SMSTenDLCCampaignStatus + /// + [Fact] + public void SMSTenDLCCampaignStatusInstanceTest() + { + Assert.IsType(instance); + } + + [Fact] + public void TestACTIVEShouldWork() + { + SMSTenDLCCampaignStatus test = SMSTenDLCCampaignStatus.ACTIVE; + Assert.Equal(typeof(SMSTenDLCCampaignStatus), test.GetType()); + } + + [Fact] + public void TestACTIVEShouldSerializeToEnum() + { + SMSTenDLCCampaignStatus expectedValue = SMSTenDLCCampaignStatus.ACTIVE; + SMSTenDLCCampaignStatus calculatedValue = (SMSTenDLCCampaignStatus) + Enum.Parse(typeof(SMSTenDLCCampaignStatus), "ACTIVE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestACTIVEShouldDeserializeToString() + { + SMSTenDLCCampaignStatus test = SMSTenDLCCampaignStatus.ACTIVE; + string expectedValue = "ACTIVE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestEXPIREDShouldWork() + { + SMSTenDLCCampaignStatus test = SMSTenDLCCampaignStatus.EXPIRED; + Assert.Equal(typeof(SMSTenDLCCampaignStatus), test.GetType()); + } + + [Fact] + public void TestEXPIREDShouldSerializeToEnum() + { + SMSTenDLCCampaignStatus expectedValue = SMSTenDLCCampaignStatus.EXPIRED; + SMSTenDLCCampaignStatus calculatedValue = (SMSTenDLCCampaignStatus) + Enum.Parse(typeof(SMSTenDLCCampaignStatus), "EXPIRED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestEXPIREDShouldDeserializeToString() + { + SMSTenDLCCampaignStatus test = SMSTenDLCCampaignStatus.EXPIRED; + string expectedValue = "EXPIRED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + } +} diff --git a/src/freeclimb.Test/Enums/SMSTenDLCPartnerCampaignStatusTests.cs b/src/freeclimb.Test/Enums/SMSTenDLCPartnerCampaignStatusTests.cs new file mode 100644 index 00000000..8d73a0c0 --- /dev/null +++ b/src/freeclimb.Test/Enums/SMSTenDLCPartnerCampaignStatusTests.cs @@ -0,0 +1,108 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Enums +{ + /// + /// Class for testing SMSTenDLCPartnerCampaignStatus + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class SMSTenDLCPartnerCampaignStatusTests : IDisposable + { + private SMSTenDLCPartnerCampaignStatus instance; + + public SMSTenDLCPartnerCampaignStatusTests() + { + instance = new SMSTenDLCPartnerCampaignStatus(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SMSTenDLCPartnerCampaignStatus + /// + [Fact] + public void SMSTenDLCPartnerCampaignStatusInstanceTest() + { + Assert.IsType(instance); + } + + [Fact] + public void TestACTIVEShouldWork() + { + SMSTenDLCPartnerCampaignStatus test = SMSTenDLCPartnerCampaignStatus.ACTIVE; + Assert.Equal(typeof(SMSTenDLCPartnerCampaignStatus), test.GetType()); + } + + [Fact] + public void TestACTIVEShouldSerializeToEnum() + { + SMSTenDLCPartnerCampaignStatus expectedValue = SMSTenDLCPartnerCampaignStatus.ACTIVE; + SMSTenDLCPartnerCampaignStatus calculatedValue = (SMSTenDLCPartnerCampaignStatus) + Enum.Parse(typeof(SMSTenDLCPartnerCampaignStatus), "ACTIVE"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestACTIVEShouldDeserializeToString() + { + SMSTenDLCPartnerCampaignStatus test = SMSTenDLCPartnerCampaignStatus.ACTIVE; + string expectedValue = "ACTIVE"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestEXPIREDShouldWork() + { + SMSTenDLCPartnerCampaignStatus test = SMSTenDLCPartnerCampaignStatus.EXPIRED; + Assert.Equal(typeof(SMSTenDLCPartnerCampaignStatus), test.GetType()); + } + + [Fact] + public void TestEXPIREDShouldSerializeToEnum() + { + SMSTenDLCPartnerCampaignStatus expectedValue = SMSTenDLCPartnerCampaignStatus.EXPIRED; + SMSTenDLCPartnerCampaignStatus calculatedValue = (SMSTenDLCPartnerCampaignStatus) + Enum.Parse(typeof(SMSTenDLCPartnerCampaignStatus), "EXPIRED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestEXPIREDShouldDeserializeToString() + { + SMSTenDLCPartnerCampaignStatus test = SMSTenDLCPartnerCampaignStatus.EXPIRED; + string expectedValue = "EXPIRED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + } +} diff --git a/src/freeclimb.Test/Enums/SMSTollFreeCampaignRegistrationStatusTests.cs b/src/freeclimb.Test/Enums/SMSTollFreeCampaignRegistrationStatusTests.cs new file mode 100644 index 00000000..0fcc3171 --- /dev/null +++ b/src/freeclimb.Test/Enums/SMSTollFreeCampaignRegistrationStatusTests.cs @@ -0,0 +1,203 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Enums +{ + /// + /// Class for testing SMSTollFreeCampaignRegistrationStatus + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class SMSTollFreeCampaignRegistrationStatusTests : IDisposable + { + private SMSTollFreeCampaignRegistrationStatus instance; + + public SMSTollFreeCampaignRegistrationStatusTests() + { + instance = new SMSTollFreeCampaignRegistrationStatus(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SMSTollFreeCampaignRegistrationStatus + /// + [Fact] + public void SMSTollFreeCampaignRegistrationStatusInstanceTest() + { + Assert.IsType(instance); + } + + [Fact] + public void TestUNREGISTEREDShouldWork() + { + SMSTollFreeCampaignRegistrationStatus test = + SMSTollFreeCampaignRegistrationStatus.UNREGISTERED; + Assert.Equal(typeof(SMSTollFreeCampaignRegistrationStatus), test.GetType()); + } + + [Fact] + public void TestUNREGISTEREDShouldSerializeToEnum() + { + SMSTollFreeCampaignRegistrationStatus expectedValue = + SMSTollFreeCampaignRegistrationStatus.UNREGISTERED; + SMSTollFreeCampaignRegistrationStatus calculatedValue = + (SMSTollFreeCampaignRegistrationStatus) + Enum.Parse(typeof(SMSTollFreeCampaignRegistrationStatus), "UNREGISTERED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestUNREGISTEREDShouldDeserializeToString() + { + SMSTollFreeCampaignRegistrationStatus test = + SMSTollFreeCampaignRegistrationStatus.UNREGISTERED; + string expectedValue = "UNREGISTERED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestINITIATEDShouldWork() + { + SMSTollFreeCampaignRegistrationStatus test = + SMSTollFreeCampaignRegistrationStatus.INITIATED; + Assert.Equal(typeof(SMSTollFreeCampaignRegistrationStatus), test.GetType()); + } + + [Fact] + public void TestINITIATEDShouldSerializeToEnum() + { + SMSTollFreeCampaignRegistrationStatus expectedValue = + SMSTollFreeCampaignRegistrationStatus.INITIATED; + SMSTollFreeCampaignRegistrationStatus calculatedValue = + (SMSTollFreeCampaignRegistrationStatus) + Enum.Parse(typeof(SMSTollFreeCampaignRegistrationStatus), "INITIATED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestINITIATEDShouldDeserializeToString() + { + SMSTollFreeCampaignRegistrationStatus test = + SMSTollFreeCampaignRegistrationStatus.INITIATED; + string expectedValue = "INITIATED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestPENDINGShouldWork() + { + SMSTollFreeCampaignRegistrationStatus test = + SMSTollFreeCampaignRegistrationStatus.PENDING; + Assert.Equal(typeof(SMSTollFreeCampaignRegistrationStatus), test.GetType()); + } + + [Fact] + public void TestPENDINGShouldSerializeToEnum() + { + SMSTollFreeCampaignRegistrationStatus expectedValue = + SMSTollFreeCampaignRegistrationStatus.PENDING; + SMSTollFreeCampaignRegistrationStatus calculatedValue = + (SMSTollFreeCampaignRegistrationStatus) + Enum.Parse(typeof(SMSTollFreeCampaignRegistrationStatus), "PENDING"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestPENDINGShouldDeserializeToString() + { + SMSTollFreeCampaignRegistrationStatus test = + SMSTollFreeCampaignRegistrationStatus.PENDING; + string expectedValue = "PENDING"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestDECLINEDShouldWork() + { + SMSTollFreeCampaignRegistrationStatus test = + SMSTollFreeCampaignRegistrationStatus.DECLINED; + Assert.Equal(typeof(SMSTollFreeCampaignRegistrationStatus), test.GetType()); + } + + [Fact] + public void TestDECLINEDShouldSerializeToEnum() + { + SMSTollFreeCampaignRegistrationStatus expectedValue = + SMSTollFreeCampaignRegistrationStatus.DECLINED; + SMSTollFreeCampaignRegistrationStatus calculatedValue = + (SMSTollFreeCampaignRegistrationStatus) + Enum.Parse(typeof(SMSTollFreeCampaignRegistrationStatus), "DECLINED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestDECLINEDShouldDeserializeToString() + { + SMSTollFreeCampaignRegistrationStatus test = + SMSTollFreeCampaignRegistrationStatus.DECLINED; + string expectedValue = "DECLINED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestREGISTEREDShouldWork() + { + SMSTollFreeCampaignRegistrationStatus test = + SMSTollFreeCampaignRegistrationStatus.REGISTERED; + Assert.Equal(typeof(SMSTollFreeCampaignRegistrationStatus), test.GetType()); + } + + [Fact] + public void TestREGISTEREDShouldSerializeToEnum() + { + SMSTollFreeCampaignRegistrationStatus expectedValue = + SMSTollFreeCampaignRegistrationStatus.REGISTERED; + SMSTollFreeCampaignRegistrationStatus calculatedValue = + (SMSTollFreeCampaignRegistrationStatus) + Enum.Parse(typeof(SMSTollFreeCampaignRegistrationStatus), "REGISTERED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestREGISTEREDShouldDeserializeToString() + { + SMSTollFreeCampaignRegistrationStatus test = + SMSTollFreeCampaignRegistrationStatus.REGISTERED; + string expectedValue = "REGISTERED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + } +} diff --git a/src/freeclimb.Test/Enums/TranscribeReasonTests.cs b/src/freeclimb.Test/Enums/TranscribeReasonTests.cs new file mode 100644 index 00000000..0076eef6 --- /dev/null +++ b/src/freeclimb.Test/Enums/TranscribeReasonTests.cs @@ -0,0 +1,183 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Enums +{ + /// + /// Class for testing TranscribeReason + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class TranscribeReasonTests : IDisposable + { + private TranscribeReason instance; + + public TranscribeReasonTests() + { + instance = new TranscribeReason(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TranscribeReason + /// + [Fact] + public void TranscribeReasonInstanceTest() + { + Assert.IsType(instance); + } + + [Fact] + public void TestINTERNAL_ERRORShouldWork() + { + TranscribeReason test = TranscribeReason.INTERNAL_ERROR; + Assert.Equal(typeof(TranscribeReason), test.GetType()); + } + + [Fact] + public void TestINTERNAL_ERRORShouldSerializeToEnum() + { + TranscribeReason expectedValue = TranscribeReason.INTERNAL_ERROR; + TranscribeReason calculatedValue = (TranscribeReason) + Enum.Parse(typeof(TranscribeReason), "INTERNAL_ERROR"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestINTERNAL_ERRORShouldDeserializeToString() + { + TranscribeReason test = TranscribeReason.INTERNAL_ERROR; + string expectedValue = "INTERNAL_ERROR"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestHANGUPShouldWork() + { + TranscribeReason test = TranscribeReason.HANGUP; + Assert.Equal(typeof(TranscribeReason), test.GetType()); + } + + [Fact] + public void TestHANGUPShouldSerializeToEnum() + { + TranscribeReason expectedValue = TranscribeReason.HANGUP; + TranscribeReason calculatedValue = (TranscribeReason) + Enum.Parse(typeof(TranscribeReason), "HANGUP"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestHANGUPShouldDeserializeToString() + { + TranscribeReason test = TranscribeReason.HANGUP; + string expectedValue = "HANGUP"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestMAX_LENGTHShouldWork() + { + TranscribeReason test = TranscribeReason.MAX_LENGTH; + Assert.Equal(typeof(TranscribeReason), test.GetType()); + } + + [Fact] + public void TestMAX_LENGTHShouldSerializeToEnum() + { + TranscribeReason expectedValue = TranscribeReason.MAX_LENGTH; + TranscribeReason calculatedValue = (TranscribeReason) + Enum.Parse(typeof(TranscribeReason), "MAX_LENGTH"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestMAX_LENGTHShouldDeserializeToString() + { + TranscribeReason test = TranscribeReason.MAX_LENGTH; + string expectedValue = "MAX_LENGTH"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestDIGITShouldWork() + { + TranscribeReason test = TranscribeReason.DIGIT; + Assert.Equal(typeof(TranscribeReason), test.GetType()); + } + + [Fact] + public void TestDIGITShouldSerializeToEnum() + { + TranscribeReason expectedValue = TranscribeReason.DIGIT; + TranscribeReason calculatedValue = (TranscribeReason) + Enum.Parse(typeof(TranscribeReason), "DIGIT"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestDIGITShouldDeserializeToString() + { + TranscribeReason test = TranscribeReason.DIGIT; + string expectedValue = "DIGIT"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNO_INPUTShouldWork() + { + TranscribeReason test = TranscribeReason.NO_INPUT; + Assert.Equal(typeof(TranscribeReason), test.GetType()); + } + + [Fact] + public void TestNO_INPUTShouldSerializeToEnum() + { + TranscribeReason expectedValue = TranscribeReason.NO_INPUT; + TranscribeReason calculatedValue = (TranscribeReason) + Enum.Parse(typeof(TranscribeReason), "NO_INPUT"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestNO_INPUTShouldDeserializeToString() + { + TranscribeReason test = TranscribeReason.NO_INPUT; + string expectedValue = "NO_INPUT"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + } +} diff --git a/src/freeclimb.Test/Enums/TranscribeTermReasonTests.cs b/src/freeclimb.Test/Enums/TranscribeTermReasonTests.cs new file mode 100644 index 00000000..1733c374 --- /dev/null +++ b/src/freeclimb.Test/Enums/TranscribeTermReasonTests.cs @@ -0,0 +1,108 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Enums +{ + /// + /// Class for testing TranscribeTermReason + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class TranscribeTermReasonTests : IDisposable + { + private TranscribeTermReason instance; + + public TranscribeTermReasonTests() + { + instance = new TranscribeTermReason(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TranscribeTermReason + /// + [Fact] + public void TranscribeTermReasonInstanceTest() + { + Assert.IsType(instance); + } + + [Fact] + public void TestERRORShouldWork() + { + TranscribeTermReason test = TranscribeTermReason.ERROR; + Assert.Equal(typeof(TranscribeTermReason), test.GetType()); + } + + [Fact] + public void TestERRORShouldSerializeToEnum() + { + TranscribeTermReason expectedValue = TranscribeTermReason.ERROR; + TranscribeTermReason calculatedValue = (TranscribeTermReason) + Enum.Parse(typeof(TranscribeTermReason), "ERROR"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestERRORShouldDeserializeToString() + { + TranscribeTermReason test = TranscribeTermReason.ERROR; + string expectedValue = "ERROR"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestCOMPLETEDShouldWork() + { + TranscribeTermReason test = TranscribeTermReason.COMPLETED; + Assert.Equal(typeof(TranscribeTermReason), test.GetType()); + } + + [Fact] + public void TestCOMPLETEDShouldSerializeToEnum() + { + TranscribeTermReason expectedValue = TranscribeTermReason.COMPLETED; + TranscribeTermReason calculatedValue = (TranscribeTermReason) + Enum.Parse(typeof(TranscribeTermReason), "COMPLETED"); + Assert.Equal(expectedValue, calculatedValue); + } + + [Fact] + public void TestCOMPLETEDShouldDeserializeToString() + { + TranscribeTermReason test = TranscribeTermReason.COMPLETED; + string expectedValue = "COMPLETED"; + string calculatedValue = test.ToString(); + Assert.Equal(expectedValue, calculatedValue); + } + } +} diff --git a/src/freeclimb.Test/Enums/UpdateCallRequestStatusTests.cs b/src/freeclimb.Test/Enums/UpdateCallRequestStatusTests.cs index 58118e64..db15d2a6 100644 --- a/src/freeclimb.Test/Enums/UpdateCallRequestStatusTests.cs +++ b/src/freeclimb.Test/Enums/UpdateCallRequestStatusTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class UpdateCallRequestStatusTests + + public class UpdateCallRequestStatusTests : IDisposable { private UpdateCallRequestStatus instance; public UpdateCallRequestStatusTests() { instance = new UpdateCallRequestStatus(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void UpdateCallRequestStatusInstanceTest() Assert.IsType(instance); } - [Fact] public void TestCANCELEDShouldWork() { @@ -67,7 +66,8 @@ public void TestCANCELEDShouldWork() public void TestCANCELEDShouldSerializeToEnum() { UpdateCallRequestStatus expectedValue = UpdateCallRequestStatus.CANCELED; - UpdateCallRequestStatus calculatedValue = (UpdateCallRequestStatus)Enum.Parse(typeof(UpdateCallRequestStatus), "CANCELED"); + UpdateCallRequestStatus calculatedValue = (UpdateCallRequestStatus) + Enum.Parse(typeof(UpdateCallRequestStatus), "CANCELED"); Assert.Equal(expectedValue, calculatedValue); } @@ -91,7 +91,8 @@ public void TestCOMPLETEDShouldWork() public void TestCOMPLETEDShouldSerializeToEnum() { UpdateCallRequestStatus expectedValue = UpdateCallRequestStatus.COMPLETED; - UpdateCallRequestStatus calculatedValue = (UpdateCallRequestStatus)Enum.Parse(typeof(UpdateCallRequestStatus), "COMPLETED"); + UpdateCallRequestStatus calculatedValue = (UpdateCallRequestStatus) + Enum.Parse(typeof(UpdateCallRequestStatus), "COMPLETED"); Assert.Equal(expectedValue, calculatedValue); } @@ -103,6 +104,5 @@ public void TestCOMPLETEDShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Enums/UpdateConferenceRequestStatusTests.cs b/src/freeclimb.Test/Enums/UpdateConferenceRequestStatusTests.cs index f0591388..85a3abff 100644 --- a/src/freeclimb.Test/Enums/UpdateConferenceRequestStatusTests.cs +++ b/src/freeclimb.Test/Enums/UpdateConferenceRequestStatusTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Enums { @@ -36,14 +31,19 @@ namespace freeclimb.Test.Enums /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class UpdateConferenceRequestStatusTests + + public class UpdateConferenceRequestStatusTests : IDisposable { private UpdateConferenceRequestStatus instance; public UpdateConferenceRequestStatusTests() { instance = new UpdateConferenceRequestStatus(); - + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +55,6 @@ public void UpdateConferenceRequestStatusInstanceTest() Assert.IsType(instance); } - [Fact] public void TestEMPTYShouldWork() { @@ -67,7 +66,8 @@ public void TestEMPTYShouldWork() public void TestEMPTYShouldSerializeToEnum() { UpdateConferenceRequestStatus expectedValue = UpdateConferenceRequestStatus.EMPTY; - UpdateConferenceRequestStatus calculatedValue = (UpdateConferenceRequestStatus)Enum.Parse(typeof(UpdateConferenceRequestStatus), "EMPTY"); + UpdateConferenceRequestStatus calculatedValue = (UpdateConferenceRequestStatus) + Enum.Parse(typeof(UpdateConferenceRequestStatus), "EMPTY"); Assert.Equal(expectedValue, calculatedValue); } @@ -91,7 +91,8 @@ public void TestTERMINATEDShouldWork() public void TestTERMINATEDShouldSerializeToEnum() { UpdateConferenceRequestStatus expectedValue = UpdateConferenceRequestStatus.TERMINATED; - UpdateConferenceRequestStatus calculatedValue = (UpdateConferenceRequestStatus)Enum.Parse(typeof(UpdateConferenceRequestStatus), "TERMINATED"); + UpdateConferenceRequestStatus calculatedValue = (UpdateConferenceRequestStatus) + Enum.Parse(typeof(UpdateConferenceRequestStatus), "TERMINATED"); Assert.Equal(expectedValue, calculatedValue); } @@ -103,6 +104,5 @@ public void TestTERMINATEDShouldDeserializeToString() string calculatedValue = test.ToString(); Assert.Equal(expectedValue, calculatedValue); } - } } diff --git a/src/freeclimb.Test/Model/AccountRequestTests.cs b/src/freeclimb.Test/Model/AccountRequestTests.cs index f449c3e5..9ec15df5 100644 --- a/src/freeclimb.Test/Model/AccountRequestTests.cs +++ b/src/freeclimb.Test/Model/AccountRequestTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,22 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class AccountRequestTests + + public class AccountRequestTests : IDisposable { private AccountRequest instance; public AccountRequestTests() { - - instance = new AccountRequest("TEST_STRING", "TEST_STRING"); - + instance = new AccountRequest( + alias: (string)TestHelpers.getTestValue(typeof(string)), + label: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +58,6 @@ public void AccountRequestInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Alias' /// @@ -65,8 +66,8 @@ public void AliasTest() { instance.Alias = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Alias); - } + /// /// Test the property 'Label' /// @@ -75,130 +76,6 @@ public void LabelTest() { instance.Label = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Label); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - AccountRequest test1 = new AccountRequest("TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.Label = "TS"; - - AccountRequest test2 = new AccountRequest("TEST_STRING", "TEST_STRING"); - test2.Alias = "TS"; - test2.Label = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - AccountRequest test1 = new AccountRequest("TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.Label = "TS"; - - AccountRequest test2 = new AccountRequest("TEST_STRING", "TEST_STRING"); - test2.Alias = "ts"; - test2.Label = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - AccountRequest test1 = new AccountRequest("TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.Label = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - AccountRequest test1 = new AccountRequest("TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.Label = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - AccountRequest test1 = new AccountRequest("TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.Label = "TS"; - - AccountRequest test2 = new AccountRequest("TEST_STRING", "TEST_STRING"); - test2.Alias = "TS"; - test2.Label = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - AccountRequest test1 = new AccountRequest("TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.Label = "TS"; - - AccountRequest test2 = new AccountRequest("TEST_STRING", "TEST_STRING"); - test2.Alias = "TS"; - test2.Label = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - AccountRequest test1 = new AccountRequest("TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.Label = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - AccountRequest test2 = new AccountRequest("TEST_STRING", "TEST_STRING"); - test2.Alias = "TS"; - test2.Label = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/AccountResultAllOfTests.cs b/src/freeclimb.Test/Model/AccountResultAllOfTests.cs deleted file mode 100644 index ff33570f..00000000 --- a/src/freeclimb.Test/Model/AccountResultAllOfTests.cs +++ /dev/null @@ -1,333 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing AccountResultAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AccountResultAllOfTests - { - private AccountResultAllOf instance; - - public AccountResultAllOfTests() - { - - instance = new AccountResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - - } - - /// - /// Test an instance of AccountResultAllOf - /// - [Fact] - public void AccountResultAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'AccountId' - /// - [Fact] - public void AccountIdTest() - { - instance.AccountId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.AccountId); - - } - /// - /// Test the property 'ApiKey' - /// - [Fact] - public void ApiKeyTest() - { - instance.ApiKey = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ApiKey); - - } - /// - /// Test the property 'Alias' - /// - [Fact] - public void AliasTest() - { - instance.Alias = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Alias); - - } - /// - /// Test the property 'Label' - /// - [Fact] - public void LabelTest() - { - instance.Label = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Label); - - } - /// - /// Test the property 'Type' - /// - [Fact] - public void TypeTest() - { - instance.Type = AccountType.TRIAL; - Assert.Equal(instance.Type,AccountType.TRIAL); - instance.Type = AccountType.FULL; - Assert.Equal(instance.Type,AccountType.FULL); - - } - /// - /// Test the property 'Status' - /// - [Fact] - public void StatusTest() - { - instance.Status = AccountStatus.CLOSED; - Assert.Equal(instance.Status,AccountStatus.CLOSED); - instance.Status = AccountStatus.SUSPENDED; - Assert.Equal(instance.Status,AccountStatus.SUSPENDED); - instance.Status = AccountStatus.ACTIVE; - Assert.Equal(instance.Status,AccountStatus.ACTIVE); - - } - /// - /// Test the property 'SubresourceUris' - /// - [Fact] - public void SubresourceUrisTest() - { - object testObject = new object(); - instance.SubresourceUris = testObject; - Assert.Equal(testObject, instance.SubresourceUris); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - AccountResultAllOf test1 = new AccountResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test1.AccountId = "TS"; - test1.ApiKey = "TS"; - test1.Alias = "TS"; - test1.Label = "TS"; - test1.Type = AccountType.TRIAL; - test1.Status = AccountStatus.CLOSED; - object testObject = new object(); - test1.SubresourceUris = testObject; - - AccountResultAllOf test2 = new AccountResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test2.AccountId = "TS"; - test2.ApiKey = "TS"; - test2.Alias = "TS"; - test2.Label = "TS"; - test2.Type = AccountType.TRIAL; - test2.Status = AccountStatus.CLOSED; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - AccountResultAllOf test1 = new AccountResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test1.AccountId = "TS"; - test1.ApiKey = "TS"; - test1.Alias = "TS"; - test1.Label = "TS"; - test1.Type = AccountType.TRIAL; - test1.Status = AccountStatus.CLOSED; - object testObject = new object(); - test1.SubresourceUris = testObject; - - AccountResultAllOf test2 = new AccountResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test2.AccountId = "ts"; - test2.ApiKey = "ts"; - test2.Alias = "ts"; - test2.Label = "ts"; - test2.Type = AccountType.FULL; - test2.Status = AccountStatus.SUSPENDED; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - AccountResultAllOf test1 = new AccountResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test1.AccountId = "TS"; - test1.ApiKey = "TS"; - test1.Alias = "TS"; - test1.Label = "TS"; - test1.Type = AccountType.TRIAL; - test1.Status = AccountStatus.CLOSED; - object testObject = new object(); - test1.SubresourceUris = testObject; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - AccountResultAllOf test1 = new AccountResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test1.AccountId = "TS"; - test1.ApiKey = "TS"; - test1.Alias = "TS"; - test1.Label = "TS"; - test1.Type = AccountType.TRIAL; - test1.Status = AccountStatus.CLOSED; - object testObject = new object(); - test1.SubresourceUris = testObject; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - AccountResultAllOf test1 = new AccountResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test1.AccountId = "TS"; - test1.ApiKey = "TS"; - test1.Alias = "TS"; - test1.Label = "TS"; - test1.Type = AccountType.TRIAL; - test1.Status = AccountStatus.CLOSED; - object testObject = new object(); - test1.SubresourceUris = testObject; - - AccountResultAllOf test2 = new AccountResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test2.AccountId = "TS"; - test2.ApiKey = "TS"; - test2.Alias = "TS"; - test2.Label = "TS"; - test2.Type = AccountType.TRIAL; - test2.Status = AccountStatus.CLOSED; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - AccountResultAllOf test1 = new AccountResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test1.AccountId = "TS"; - test1.ApiKey = "TS"; - test1.Alias = "TS"; - test1.Label = "TS"; - test1.Type = AccountType.TRIAL; - test1.Status = AccountStatus.CLOSED; - object testObject = new object(); - test1.SubresourceUris = testObject; - - AccountResultAllOf test2 = new AccountResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test2.AccountId = "TS"; - test2.ApiKey = "TS"; - test2.Alias = "TS"; - test2.Label = "TS"; - test2.Type = AccountType.TRIAL; - test2.Status = AccountStatus.CLOSED; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - AccountResultAllOf test1 = new AccountResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test1.AccountId = "TS"; - test1.ApiKey = "TS"; - test1.Alias = "TS"; - test1.Label = "TS"; - test1.Type = AccountType.TRIAL; - test1.Status = AccountStatus.CLOSED; - object testObject = new object(); - test1.SubresourceUris = testObject; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - AccountResultAllOf test2 = new AccountResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test2.AccountId = "TS"; - test2.ApiKey = "TS"; - test2.Alias = "TS"; - test2.Label = "TS"; - test2.Type = AccountType.TRIAL; - test2.Status = AccountStatus.CLOSED; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/AccountResultTests.cs b/src/freeclimb.Test/Model/AccountResultTests.cs index 18c85938..3e2cd713 100644 --- a/src/freeclimb.Test/Model/AccountResultTests.cs +++ b/src/freeclimb.Test/Model/AccountResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,31 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class AccountResultTests + + public class AccountResultTests : IDisposable { private AccountResult instance; public AccountResultTests() { - - instance = new AccountResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - + instance = new AccountResult( + uri: (string)TestHelpers.getTestValue(typeof(string)), + dateCreated: (string)TestHelpers.getTestValue(typeof(string)), + dateUpdated: (string)TestHelpers.getTestValue(typeof(string)), + revision: (int)TestHelpers.getTestValue(typeof(int)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + apiKey: (string)TestHelpers.getTestValue(typeof(string)), + alias: (string)TestHelpers.getTestValue(typeof(string)), + label: (string)TestHelpers.getTestValue(typeof(string)), + type: (AccountType)TestHelpers.getTestValue(typeof(AccountType)), + status: (AccountStatus)TestHelpers.getTestValue(typeof(AccountStatus)), + subresourceUris: (Object)TestHelpers.getTestValue(typeof(Object)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +67,6 @@ public void AccountResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Uri' /// @@ -65,8 +75,8 @@ public void UriTest() { instance.Uri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Uri); - } + /// /// Test the property 'DateCreated' /// @@ -75,8 +85,8 @@ public void DateCreatedTest() { instance.DateCreated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateCreated); - } + /// /// Test the property 'DateUpdated' /// @@ -85,18 +95,18 @@ public void DateUpdatedTest() { instance.DateUpdated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateUpdated); - } + /// /// Test the property 'Revision' /// [Fact] public void RevisionTest() { - instance.Revision = 1; - Assert.Equal(1, (int) instance.Revision); + Assert.Equal(1, (int)instance.Revision); } + /// /// Test the property 'AccountId' /// @@ -105,8 +115,8 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } + /// /// Test the property 'ApiKey' /// @@ -115,8 +125,8 @@ public void ApiKeyTest() { instance.ApiKey = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ApiKey); - } + /// /// Test the property 'Alias' /// @@ -125,8 +135,8 @@ public void AliasTest() { instance.Alias = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Alias); - } + /// /// Test the property 'Label' /// @@ -135,8 +145,8 @@ public void LabelTest() { instance.Label = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Label); - } + /// /// Test the property 'Type' /// @@ -144,11 +154,11 @@ public void LabelTest() public void TypeTest() { instance.Type = AccountType.TRIAL; - Assert.Equal(instance.Type,AccountType.TRIAL); + Assert.Equal(AccountType.TRIAL, instance.Type); instance.Type = AccountType.FULL; - Assert.Equal(instance.Type,AccountType.FULL); - + Assert.Equal(AccountType.FULL, instance.Type); } + /// /// Test the property 'Status' /// @@ -156,13 +166,13 @@ public void TypeTest() public void StatusTest() { instance.Status = AccountStatus.CLOSED; - Assert.Equal(instance.Status,AccountStatus.CLOSED); + Assert.Equal(AccountStatus.CLOSED, instance.Status); instance.Status = AccountStatus.SUSPENDED; - Assert.Equal(instance.Status,AccountStatus.SUSPENDED); + Assert.Equal(AccountStatus.SUSPENDED, instance.Status); instance.Status = AccountStatus.ACTIVE; - Assert.Equal(instance.Status,AccountStatus.ACTIVE); - + Assert.Equal(AccountStatus.ACTIVE, instance.Status); } + /// /// Test the property 'SubresourceUris' /// @@ -172,250 +182,6 @@ public void SubresourceUrisTest() object testObject = new object(); instance.SubresourceUris = testObject; Assert.Equal(testObject, instance.SubresourceUris); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - AccountResult test1 = new AccountResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ApiKey = "TS"; - test1.Alias = "TS"; - test1.Label = "TS"; - test1.Type = AccountType.TRIAL; - test1.Status = AccountStatus.CLOSED; - object testObject = new object(); - test1.SubresourceUris = testObject; - - AccountResult test2 = new AccountResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.ApiKey = "TS"; - test2.Alias = "TS"; - test2.Label = "TS"; - test2.Type = AccountType.TRIAL; - test2.Status = AccountStatus.CLOSED; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - AccountResult test1 = new AccountResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ApiKey = "TS"; - test1.Alias = "TS"; - test1.Label = "TS"; - test1.Type = AccountType.TRIAL; - test1.Status = AccountStatus.CLOSED; - object testObject = new object(); - test1.SubresourceUris = testObject; - - AccountResult test2 = new AccountResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test2.Uri = "ts"; - test2.DateCreated = "ts"; - test2.DateUpdated = "ts"; - test2.Revision = 2; - test2.AccountId = "ts"; - test2.ApiKey = "ts"; - test2.Alias = "ts"; - test2.Label = "ts"; - test2.Type = AccountType.FULL; - test2.Status = AccountStatus.SUSPENDED; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - AccountResult test1 = new AccountResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ApiKey = "TS"; - test1.Alias = "TS"; - test1.Label = "TS"; - test1.Type = AccountType.TRIAL; - test1.Status = AccountStatus.CLOSED; - object testObject = new object(); - test1.SubresourceUris = testObject; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - AccountResult test1 = new AccountResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ApiKey = "TS"; - test1.Alias = "TS"; - test1.Label = "TS"; - test1.Type = AccountType.TRIAL; - test1.Status = AccountStatus.CLOSED; - object testObject = new object(); - test1.SubresourceUris = testObject; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - AccountResult test1 = new AccountResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ApiKey = "TS"; - test1.Alias = "TS"; - test1.Label = "TS"; - test1.Type = AccountType.TRIAL; - test1.Status = AccountStatus.CLOSED; - object testObject = new object(); - test1.SubresourceUris = testObject; - - AccountResult test2 = new AccountResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.ApiKey = "TS"; - test2.Alias = "TS"; - test2.Label = "TS"; - test2.Type = AccountType.TRIAL; - test2.Status = AccountStatus.CLOSED; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - AccountResult test1 = new AccountResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ApiKey = "TS"; - test1.Alias = "TS"; - test1.Label = "TS"; - test1.Type = AccountType.TRIAL; - test1.Status = AccountStatus.CLOSED; - object testObject = new object(); - test1.SubresourceUris = testObject; - - AccountResult test2 = new AccountResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.ApiKey = "TS"; - test2.Alias = "TS"; - test2.Label = "TS"; - test2.Type = AccountType.TRIAL; - test2.Status = AccountStatus.CLOSED; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - AccountResult test1 = new AccountResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ApiKey = "TS"; - test1.Alias = "TS"; - test1.Label = "TS"; - test1.Type = AccountType.TRIAL; - test1.Status = AccountStatus.CLOSED; - object testObject = new object(); - test1.SubresourceUris = testObject; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - AccountResult test2 = new AccountResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", AccountType.TRIAL, AccountStatus.CLOSED, new object()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.ApiKey = "TS"; - test2.Alias = "TS"; - test2.Label = "TS"; - test2.Type = AccountType.TRIAL; - test2.Status = AccountStatus.CLOSED; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/AddToConferenceAllOfTests.cs b/src/freeclimb.Test/Model/AddToConferenceAllOfTests.cs deleted file mode 100644 index 475cd48f..00000000 --- a/src/freeclimb.Test/Model/AddToConferenceAllOfTests.cs +++ /dev/null @@ -1,380 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing AddToConferenceAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AddToConferenceAllOfTests - { - private AddToConferenceAllOf instance; - - public AddToConferenceAllOfTests() - { - - instance = new AddToConferenceAllOf(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false); - - } - - /// - /// Test an instance of AddToConferenceAllOf - /// - [Fact] - public void AddToConferenceAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'AllowCallControl' - /// - [Fact] - public void AllowCallControlTest() - { - instance.AllowCallControl = false; - Assert.Equal(false, instance.AllowCallControl); - - } - /// - /// Test the property 'CallControlSequence' - /// - [Fact] - public void CallControlSequenceTest() - { - instance.CallControlSequence = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.CallControlSequence); - - } - /// - /// Test the property 'CallControlUrl' - /// - [Fact] - public void CallControlUrlTest() - { - instance.CallControlUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.CallControlUrl); - - } - /// - /// Test the property 'ConferenceId' - /// - [Fact] - public void ConferenceIdTest() - { - instance.ConferenceId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ConferenceId); - - } - /// - /// Test the property 'LeaveConferenceUrl' - /// - [Fact] - public void LeaveConferenceUrlTest() - { - instance.LeaveConferenceUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.LeaveConferenceUrl); - - } - /// - /// Test the property 'Listen' - /// - [Fact] - public void ListenTest() - { - instance.Listen = false; - Assert.Equal(false, instance.Listen); - - } - /// - /// Test the property 'NotificationUrl' - /// - [Fact] - public void NotificationUrlTest() - { - instance.NotificationUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.NotificationUrl); - - } - /// - /// Test the property 'StartConfOnEnter' - /// - [Fact] - public void StartConfOnEnterTest() - { - instance.StartConfOnEnter = false; - Assert.Equal(false, instance.StartConfOnEnter); - - } - /// - /// Test the property 'Talk' - /// - [Fact] - public void TalkTest() - { - instance.Talk = false; - Assert.Equal(false, instance.Talk); - - } - /// - /// Test the property 'DtmfPassThrough' - /// - [Fact] - public void DtmfPassThroughTest() - { - instance.DtmfPassThrough = false; - Assert.Equal(false, instance.DtmfPassThrough); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - AddToConferenceAllOf test1 = new AddToConferenceAllOf(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false); - test1.AllowCallControl = true; - test1.CallControlSequence = "TS"; - test1.CallControlUrl = "TS"; - test1.ConferenceId = "TS"; - test1.LeaveConferenceUrl = "TS"; - test1.Listen = true; - test1.NotificationUrl = "TS"; - test1.StartConfOnEnter = true; - test1.Talk = true; - test1.DtmfPassThrough = true; - - AddToConferenceAllOf test2 = new AddToConferenceAllOf(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false); - test2.AllowCallControl = true; - test2.CallControlSequence = "TS"; - test2.CallControlUrl = "TS"; - test2.ConferenceId = "TS"; - test2.LeaveConferenceUrl = "TS"; - test2.Listen = true; - test2.NotificationUrl = "TS"; - test2.StartConfOnEnter = true; - test2.Talk = true; - test2.DtmfPassThrough = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - AddToConferenceAllOf test1 = new AddToConferenceAllOf(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false); - test1.AllowCallControl = true; - test1.CallControlSequence = "TS"; - test1.CallControlUrl = "TS"; - test1.ConferenceId = "TS"; - test1.LeaveConferenceUrl = "TS"; - test1.Listen = true; - test1.NotificationUrl = "TS"; - test1.StartConfOnEnter = true; - test1.Talk = true; - test1.DtmfPassThrough = true; - - AddToConferenceAllOf test2 = new AddToConferenceAllOf(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false); - test2.AllowCallControl = false; - test2.CallControlSequence = "ts"; - test2.CallControlUrl = "ts"; - test2.ConferenceId = "ts"; - test2.LeaveConferenceUrl = "ts"; - test2.Listen = false; - test2.NotificationUrl = "ts"; - test2.StartConfOnEnter = false; - test2.Talk = false; - test2.DtmfPassThrough = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - AddToConferenceAllOf test1 = new AddToConferenceAllOf(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false); - test1.AllowCallControl = true; - test1.CallControlSequence = "TS"; - test1.CallControlUrl = "TS"; - test1.ConferenceId = "TS"; - test1.LeaveConferenceUrl = "TS"; - test1.Listen = true; - test1.NotificationUrl = "TS"; - test1.StartConfOnEnter = true; - test1.Talk = true; - test1.DtmfPassThrough = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - AddToConferenceAllOf test1 = new AddToConferenceAllOf(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false); - test1.AllowCallControl = true; - test1.CallControlSequence = "TS"; - test1.CallControlUrl = "TS"; - test1.ConferenceId = "TS"; - test1.LeaveConferenceUrl = "TS"; - test1.Listen = true; - test1.NotificationUrl = "TS"; - test1.StartConfOnEnter = true; - test1.Talk = true; - test1.DtmfPassThrough = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - AddToConferenceAllOf test1 = new AddToConferenceAllOf(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false); - test1.AllowCallControl = true; - test1.CallControlSequence = "TS"; - test1.CallControlUrl = "TS"; - test1.ConferenceId = "TS"; - test1.LeaveConferenceUrl = "TS"; - test1.Listen = true; - test1.NotificationUrl = "TS"; - test1.StartConfOnEnter = true; - test1.Talk = true; - test1.DtmfPassThrough = true; - - AddToConferenceAllOf test2 = new AddToConferenceAllOf(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false); - test2.AllowCallControl = true; - test2.CallControlSequence = "TS"; - test2.CallControlUrl = "TS"; - test2.ConferenceId = "TS"; - test2.LeaveConferenceUrl = "TS"; - test2.Listen = true; - test2.NotificationUrl = "TS"; - test2.StartConfOnEnter = true; - test2.Talk = true; - test2.DtmfPassThrough = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - AddToConferenceAllOf test1 = new AddToConferenceAllOf(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false); - test1.AllowCallControl = true; - test1.CallControlSequence = "TS"; - test1.CallControlUrl = "TS"; - test1.ConferenceId = "TS"; - test1.LeaveConferenceUrl = "TS"; - test1.Listen = true; - test1.NotificationUrl = "TS"; - test1.StartConfOnEnter = true; - test1.Talk = true; - test1.DtmfPassThrough = true; - - AddToConferenceAllOf test2 = new AddToConferenceAllOf(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false); - test2.AllowCallControl = true; - test2.CallControlSequence = "TS"; - test2.CallControlUrl = "TS"; - test2.ConferenceId = "TS"; - test2.LeaveConferenceUrl = "TS"; - test2.Listen = true; - test2.NotificationUrl = "TS"; - test2.StartConfOnEnter = true; - test2.Talk = true; - test2.DtmfPassThrough = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - AddToConferenceAllOf test1 = new AddToConferenceAllOf(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false); - test1.AllowCallControl = true; - test1.CallControlSequence = "TS"; - test1.CallControlUrl = "TS"; - test1.ConferenceId = "TS"; - test1.LeaveConferenceUrl = "TS"; - test1.Listen = true; - test1.NotificationUrl = "TS"; - test1.StartConfOnEnter = true; - test1.Talk = true; - test1.DtmfPassThrough = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - AddToConferenceAllOf test2 = new AddToConferenceAllOf(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false); - test2.AllowCallControl = true; - test2.CallControlSequence = "TS"; - test2.CallControlUrl = "TS"; - test2.ConferenceId = "TS"; - test2.LeaveConferenceUrl = "TS"; - test2.Listen = true; - test2.NotificationUrl = "TS"; - test2.StartConfOnEnter = true; - test2.Talk = true; - test2.DtmfPassThrough = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/AddToConferenceNotificationWebhookTests.cs b/src/freeclimb.Test/Model/AddToConferenceNotificationWebhookTests.cs new file mode 100644 index 00000000..06e8f78c --- /dev/null +++ b/src/freeclimb.Test/Model/AddToConferenceNotificationWebhookTests.cs @@ -0,0 +1,232 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing AddToConferenceNotificationWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class AddToConferenceNotificationWebhookTests : IDisposable + { + private AddToConferenceNotificationWebhook instance; + + public AddToConferenceNotificationWebhookTests() + { + instance = new AddToConferenceNotificationWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + status: (ConferenceStatus)TestHelpers.getTestValue(typeof(ConferenceStatus)), + recordingUrl: (string)TestHelpers.getTestValue(typeof(string)), + recordingId: (string)TestHelpers.getTestValue(typeof(string)), + recordingDurationSec: (int)TestHelpers.getTestValue(typeof(int)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of AddToConferenceNotificationWebhook + /// + [Fact] + public void AddToConferenceNotificationWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'Status' + /// + [Fact] + public void StatusTest() + { + instance.Status = ConferenceStatus.EMPTY; + Assert.Equal(ConferenceStatus.EMPTY, instance.Status); + instance.Status = ConferenceStatus.POPULATED; + Assert.Equal(ConferenceStatus.POPULATED, instance.Status); + instance.Status = ConferenceStatus.IN_PROGRESS; + Assert.Equal(ConferenceStatus.IN_PROGRESS, instance.Status); + instance.Status = ConferenceStatus.TERMINATED; + Assert.Equal(ConferenceStatus.TERMINATED, instance.Status); + } + + /// + /// Test the property 'RecordingUrl' + /// + [Fact] + public void RecordingUrlTest() + { + instance.RecordingUrl = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingUrl); + } + + /// + /// Test the property 'RecordingId' + /// + [Fact] + public void RecordingIdTest() + { + instance.RecordingId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingId); + } + + /// + /// Test the property 'RecordingDurationSec' + /// + [Fact] + public void RecordingDurationSecTest() + { + instance.RecordingDurationSec = 1; + Assert.Equal(1, (int)instance.RecordingDurationSec); + } + + [Fact] + public void TestDeserializeJsonToAddToConferenceNotificationWebhook() + { + string payload = @"{ ""requestType"": ""addToConferenceNotification"" }"; + AddToConferenceNotificationWebhook deserialized = + AddToConferenceNotificationWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("addToConferenceNotification", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/AddToConferenceTests.cs b/src/freeclimb.Test/Model/AddToConferenceTests.cs index 5d273508..e84d9137 100644 --- a/src/freeclimb.Test/Model/AddToConferenceTests.cs +++ b/src/freeclimb.Test/Model/AddToConferenceTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,30 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class AddToConferenceTests + + public class AddToConferenceTests : IDisposable { private AddToConference instance; public AddToConferenceTests() { - - instance = new AddToConference(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false, "TEST_STRING"); - + instance = new AddToConference( + allowCallControl: (bool)TestHelpers.getTestValue(typeof(bool)), + callControlSequence: (string)TestHelpers.getTestValue(typeof(string)), + callControlUrl: (string)TestHelpers.getTestValue(typeof(string)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + leaveConferenceUrl: (string)TestHelpers.getTestValue(typeof(string)), + listen: (bool)TestHelpers.getTestValue(typeof(bool)), + notificationUrl: (string)TestHelpers.getTestValue(typeof(string)), + startConfOnEnter: (bool)TestHelpers.getTestValue(typeof(bool)), + talk: (bool)TestHelpers.getTestValue(typeof(bool)), + dtmfPassThrough: (bool)TestHelpers.getTestValue(typeof(bool)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +66,6 @@ public void AddToConferenceInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'AllowCallControl' /// @@ -64,9 +73,9 @@ public void AddToConferenceInstanceTest() public void AllowCallControlTest() { instance.AllowCallControl = false; - Assert.Equal(false, instance.AllowCallControl); - + Assert.False(instance.AllowCallControl); } + /// /// Test the property 'CallControlSequence' /// @@ -75,8 +84,8 @@ public void CallControlSequenceTest() { instance.CallControlSequence = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CallControlSequence); - } + /// /// Test the property 'CallControlUrl' /// @@ -85,8 +94,8 @@ public void CallControlUrlTest() { instance.CallControlUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CallControlUrl); - } + /// /// Test the property 'ConferenceId' /// @@ -95,8 +104,8 @@ public void ConferenceIdTest() { instance.ConferenceId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ConferenceId); - } + /// /// Test the property 'LeaveConferenceUrl' /// @@ -105,8 +114,8 @@ public void LeaveConferenceUrlTest() { instance.LeaveConferenceUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.LeaveConferenceUrl); - } + /// /// Test the property 'Listen' /// @@ -114,9 +123,9 @@ public void LeaveConferenceUrlTest() public void ListenTest() { instance.Listen = false; - Assert.Equal(false, instance.Listen); - + Assert.False(instance.Listen); } + /// /// Test the property 'NotificationUrl' /// @@ -125,8 +134,8 @@ public void NotificationUrlTest() { instance.NotificationUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NotificationUrl); - } + /// /// Test the property 'StartConfOnEnter' /// @@ -134,9 +143,9 @@ public void NotificationUrlTest() public void StartConfOnEnterTest() { instance.StartConfOnEnter = false; - Assert.Equal(false, instance.StartConfOnEnter); - + Assert.False(instance.StartConfOnEnter); } + /// /// Test the property 'Talk' /// @@ -144,9 +153,9 @@ public void StartConfOnEnterTest() public void TalkTest() { instance.Talk = false; - Assert.Equal(false, instance.Talk); - + Assert.False(instance.Talk); } + /// /// Test the property 'DtmfPassThrough' /// @@ -154,227 +163,7 @@ public void TalkTest() public void DtmfPassThroughTest() { instance.DtmfPassThrough = false; - Assert.Equal(false, instance.DtmfPassThrough); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - AddToConference test1 = new AddToConference(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false, "TEST_STRING"); - test1.AllowCallControl = true; - test1.CallControlSequence = "TS"; - test1.CallControlUrl = "TS"; - test1.ConferenceId = "TS"; - test1.LeaveConferenceUrl = "TS"; - test1.Listen = true; - test1.NotificationUrl = "TS"; - test1.StartConfOnEnter = true; - test1.Talk = true; - test1.DtmfPassThrough = true; - - AddToConference test2 = new AddToConference(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false, "TEST_STRING"); - test2.AllowCallControl = true; - test2.CallControlSequence = "TS"; - test2.CallControlUrl = "TS"; - test2.ConferenceId = "TS"; - test2.LeaveConferenceUrl = "TS"; - test2.Listen = true; - test2.NotificationUrl = "TS"; - test2.StartConfOnEnter = true; - test2.Talk = true; - test2.DtmfPassThrough = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - AddToConference test1 = new AddToConference(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false, "TEST_STRING"); - test1.AllowCallControl = true; - test1.CallControlSequence = "TS"; - test1.CallControlUrl = "TS"; - test1.ConferenceId = "TS"; - test1.LeaveConferenceUrl = "TS"; - test1.Listen = true; - test1.NotificationUrl = "TS"; - test1.StartConfOnEnter = true; - test1.Talk = true; - test1.DtmfPassThrough = true; - - AddToConference test2 = new AddToConference(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false, "TEST_STRING"); - test2.AllowCallControl = false; - test2.CallControlSequence = "ts"; - test2.CallControlUrl = "ts"; - test2.ConferenceId = "ts"; - test2.LeaveConferenceUrl = "ts"; - test2.Listen = false; - test2.NotificationUrl = "ts"; - test2.StartConfOnEnter = false; - test2.Talk = false; - test2.DtmfPassThrough = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - AddToConference test1 = new AddToConference(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false, "TEST_STRING"); - test1.AllowCallControl = true; - test1.CallControlSequence = "TS"; - test1.CallControlUrl = "TS"; - test1.ConferenceId = "TS"; - test1.LeaveConferenceUrl = "TS"; - test1.Listen = true; - test1.NotificationUrl = "TS"; - test1.StartConfOnEnter = true; - test1.Talk = true; - test1.DtmfPassThrough = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - AddToConference test1 = new AddToConference(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false, "TEST_STRING"); - test1.AllowCallControl = true; - test1.CallControlSequence = "TS"; - test1.CallControlUrl = "TS"; - test1.ConferenceId = "TS"; - test1.LeaveConferenceUrl = "TS"; - test1.Listen = true; - test1.NotificationUrl = "TS"; - test1.StartConfOnEnter = true; - test1.Talk = true; - test1.DtmfPassThrough = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - AddToConference test1 = new AddToConference(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false, "TEST_STRING"); - test1.AllowCallControl = true; - test1.CallControlSequence = "TS"; - test1.CallControlUrl = "TS"; - test1.ConferenceId = "TS"; - test1.LeaveConferenceUrl = "TS"; - test1.Listen = true; - test1.NotificationUrl = "TS"; - test1.StartConfOnEnter = true; - test1.Talk = true; - test1.DtmfPassThrough = true; - - AddToConference test2 = new AddToConference(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false, "TEST_STRING"); - test2.AllowCallControl = true; - test2.CallControlSequence = "TS"; - test2.CallControlUrl = "TS"; - test2.ConferenceId = "TS"; - test2.LeaveConferenceUrl = "TS"; - test2.Listen = true; - test2.NotificationUrl = "TS"; - test2.StartConfOnEnter = true; - test2.Talk = true; - test2.DtmfPassThrough = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - AddToConference test1 = new AddToConference(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false, "TEST_STRING"); - test1.AllowCallControl = true; - test1.CallControlSequence = "TS"; - test1.CallControlUrl = "TS"; - test1.ConferenceId = "TS"; - test1.LeaveConferenceUrl = "TS"; - test1.Listen = true; - test1.NotificationUrl = "TS"; - test1.StartConfOnEnter = true; - test1.Talk = true; - test1.DtmfPassThrough = true; - - AddToConference test2 = new AddToConference(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false, "TEST_STRING"); - test2.AllowCallControl = true; - test2.CallControlSequence = "TS"; - test2.CallControlUrl = "TS"; - test2.ConferenceId = "TS"; - test2.LeaveConferenceUrl = "TS"; - test2.Listen = true; - test2.NotificationUrl = "TS"; - test2.StartConfOnEnter = true; - test2.Talk = true; - test2.DtmfPassThrough = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - AddToConference test1 = new AddToConference(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false, "TEST_STRING"); - test1.AllowCallControl = true; - test1.CallControlSequence = "TS"; - test1.CallControlUrl = "TS"; - test1.ConferenceId = "TS"; - test1.LeaveConferenceUrl = "TS"; - test1.Listen = true; - test1.NotificationUrl = "TS"; - test1.StartConfOnEnter = true; - test1.Talk = true; - test1.DtmfPassThrough = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - AddToConference test2 = new AddToConference(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false, false, "TEST_STRING"); - test2.AllowCallControl = true; - test2.CallControlSequence = "TS"; - test2.CallControlUrl = "TS"; - test2.ConferenceId = "TS"; - test2.LeaveConferenceUrl = "TS"; - test2.Listen = true; - test2.NotificationUrl = "TS"; - test2.StartConfOnEnter = true; - test2.Talk = true; - test2.DtmfPassThrough = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.False(instance.DtmfPassThrough); } } } diff --git a/src/freeclimb.Test/Model/AddToQueueNotificationWebhookTests.cs b/src/freeclimb.Test/Model/AddToQueueNotificationWebhookTests.cs new file mode 100644 index 00000000..4286d708 --- /dev/null +++ b/src/freeclimb.Test/Model/AddToQueueNotificationWebhookTests.cs @@ -0,0 +1,183 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing AddToQueueNotificationWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class AddToQueueNotificationWebhookTests : IDisposable + { + private AddToQueueNotificationWebhook instance; + + public AddToQueueNotificationWebhookTests() + { + instance = new AddToQueueNotificationWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of AddToQueueNotificationWebhook + /// + [Fact] + public void AddToQueueNotificationWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + [Fact] + public void TestDeserializeJsonToAddToQueueNotificationWebhook() + { + string payload = @"{ ""requestType"": ""addToQueueNotification"" }"; + AddToQueueNotificationWebhook deserialized = AddToQueueNotificationWebhook.Deserialize( + payload + ); + Assert.IsType(deserialized); + Assert.Equal("addToQueueNotification", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/ApplicationListAllOfTests.cs b/src/freeclimb.Test/Model/ApplicationListAllOfTests.cs deleted file mode 100644 index 3c81ff7a..00000000 --- a/src/freeclimb.Test/Model/ApplicationListAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing ApplicationListAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ApplicationListAllOfTests - { - private ApplicationListAllOf instance; - - public ApplicationListAllOfTests() - { - - instance = new ApplicationListAllOf(new List()); - - } - - /// - /// Test an instance of ApplicationListAllOf - /// - [Fact] - public void ApplicationListAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Applications' - /// - [Fact] - public void ApplicationsTest() - { - - List testList = new List(); - instance.Applications = testList; - Assert.Equal(testList, instance.Applications); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - ApplicationListAllOf test1 = new ApplicationListAllOf(new List()); - List testList = new List(); - test1.Applications = testList; - - ApplicationListAllOf test2 = new ApplicationListAllOf(new List()); - List testList2 = new List(); - test2.Applications = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - ApplicationListAllOf test1 = new ApplicationListAllOf(new List()); - List testList = new List(); - test1.Applications = testList; - - ApplicationListAllOf test2 = new ApplicationListAllOf(new List()); - List testList2 = null; - test2.Applications = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - ApplicationListAllOf test1 = new ApplicationListAllOf(new List()); - List testList = new List(); - test1.Applications = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - ApplicationListAllOf test1 = new ApplicationListAllOf(new List()); - List testList = new List(); - test1.Applications = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - ApplicationListAllOf test1 = new ApplicationListAllOf(new List()); - List testList = new List(); - test1.Applications = testList; - - ApplicationListAllOf test2 = new ApplicationListAllOf(new List()); - List testList2 = new List(); - test2.Applications = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - ApplicationListAllOf test1 = new ApplicationListAllOf(new List()); - List testList = new List(); - test1.Applications = testList; - - ApplicationListAllOf test2 = new ApplicationListAllOf(new List()); - List testList2 = new List(); - test2.Applications = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - ApplicationListAllOf test1 = new ApplicationListAllOf(new List()); - List testList = new List(); - test1.Applications = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - ApplicationListAllOf test2 = new ApplicationListAllOf(new List()); - List testList2 = new List(); - test2.Applications = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/ApplicationListTests.cs b/src/freeclimb.Test/Model/ApplicationListTests.cs index 9f8bc380..d70f3f93 100644 --- a/src/freeclimb.Test/Model/ApplicationListTests.cs +++ b/src/freeclimb.Test/Model/ApplicationListTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,29 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class ApplicationListTests + + public class ApplicationListTests : IDisposable { private ApplicationList instance; public ApplicationListTests() { - - instance = new ApplicationList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new ApplicationList( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + applications: (List) + TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +65,66 @@ public void ApplicationListInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +133,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'Applications' /// [Fact] public void ApplicationsTest() { - List testList = new List(); instance.Applications = testList; - Assert.Equal(testList, instance.Applications); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - ApplicationList test1 = new ApplicationList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Applications = testList; - - ApplicationList test2 = new ApplicationList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Applications = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - ApplicationList test1 = new ApplicationList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Applications = testList; - - ApplicationList test2 = new ApplicationList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.Applications = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - ApplicationList test1 = new ApplicationList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Applications = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - ApplicationList test1 = new ApplicationList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Applications = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - ApplicationList test1 = new ApplicationList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Applications = testList; - - ApplicationList test2 = new ApplicationList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Applications = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - ApplicationList test1 = new ApplicationList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Applications = testList; - - ApplicationList test2 = new ApplicationList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Applications = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - ApplicationList test1 = new ApplicationList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Applications = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - ApplicationList test2 = new ApplicationList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Applications = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.Applications, testList); } } } diff --git a/src/freeclimb.Test/Model/ApplicationRequestTests.cs b/src/freeclimb.Test/Model/ApplicationRequestTests.cs index a2d28ce5..1aed0524 100644 --- a/src/freeclimb.Test/Model/ApplicationRequestTests.cs +++ b/src/freeclimb.Test/Model/ApplicationRequestTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,27 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class ApplicationRequestTests + + public class ApplicationRequestTests : IDisposable { private ApplicationRequest instance; public ApplicationRequestTests() { - - instance = new ApplicationRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - + instance = new ApplicationRequest( + alias: (string)TestHelpers.getTestValue(typeof(string)), + voiceUrl: (string)TestHelpers.getTestValue(typeof(string)), + voiceFallbackUrl: (string)TestHelpers.getTestValue(typeof(string)), + callConnectUrl: (string)TestHelpers.getTestValue(typeof(string)), + statusCallbackUrl: (string)TestHelpers.getTestValue(typeof(string)), + smsUrl: (string)TestHelpers.getTestValue(typeof(string)), + smsFallbackUrl: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +63,6 @@ public void ApplicationRequestInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Alias' /// @@ -65,8 +71,8 @@ public void AliasTest() { instance.Alias = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Alias); - } + /// /// Test the property 'VoiceUrl' /// @@ -75,8 +81,8 @@ public void VoiceUrlTest() { instance.VoiceUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.VoiceUrl); - } + /// /// Test the property 'VoiceFallbackUrl' /// @@ -85,8 +91,8 @@ public void VoiceFallbackUrlTest() { instance.VoiceFallbackUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.VoiceFallbackUrl); - } + /// /// Test the property 'CallConnectUrl' /// @@ -95,8 +101,8 @@ public void CallConnectUrlTest() { instance.CallConnectUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CallConnectUrl); - } + /// /// Test the property 'StatusCallbackUrl' /// @@ -105,8 +111,8 @@ public void StatusCallbackUrlTest() { instance.StatusCallbackUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.StatusCallbackUrl); - } + /// /// Test the property 'SmsUrl' /// @@ -115,8 +121,8 @@ public void SmsUrlTest() { instance.SmsUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.SmsUrl); - } + /// /// Test the property 'SmsFallbackUrl' /// @@ -125,190 +131,6 @@ public void SmsFallbackUrlTest() { instance.SmsFallbackUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.SmsFallbackUrl); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - ApplicationRequest test1 = new ApplicationRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - ApplicationRequest test2 = new ApplicationRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.Alias = "TS"; - test2.VoiceUrl = "TS"; - test2.VoiceFallbackUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.SmsUrl = "TS"; - test2.SmsFallbackUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - ApplicationRequest test1 = new ApplicationRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - ApplicationRequest test2 = new ApplicationRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.Alias = "ts"; - test2.VoiceUrl = "ts"; - test2.VoiceFallbackUrl = "ts"; - test2.CallConnectUrl = "ts"; - test2.StatusCallbackUrl = "ts"; - test2.SmsUrl = "ts"; - test2.SmsFallbackUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - ApplicationRequest test1 = new ApplicationRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - ApplicationRequest test1 = new ApplicationRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - ApplicationRequest test1 = new ApplicationRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - ApplicationRequest test2 = new ApplicationRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.Alias = "TS"; - test2.VoiceUrl = "TS"; - test2.VoiceFallbackUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.SmsUrl = "TS"; - test2.SmsFallbackUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - ApplicationRequest test1 = new ApplicationRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - ApplicationRequest test2 = new ApplicationRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.Alias = "TS"; - test2.VoiceUrl = "TS"; - test2.VoiceFallbackUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.SmsUrl = "TS"; - test2.SmsFallbackUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - ApplicationRequest test1 = new ApplicationRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - ApplicationRequest test2 = new ApplicationRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.Alias = "TS"; - test2.VoiceUrl = "TS"; - test2.VoiceFallbackUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.SmsUrl = "TS"; - test2.SmsFallbackUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/ApplicationResultAllOfTests.cs b/src/freeclimb.Test/Model/ApplicationResultAllOfTests.cs deleted file mode 100644 index aa8b7328..00000000 --- a/src/freeclimb.Test/Model/ApplicationResultAllOfTests.cs +++ /dev/null @@ -1,358 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing ApplicationResultAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ApplicationResultAllOfTests - { - private ApplicationResultAllOf instance; - - public ApplicationResultAllOfTests() - { - - instance = new ApplicationResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - - } - - /// - /// Test an instance of ApplicationResultAllOf - /// - [Fact] - public void ApplicationResultAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'AccountId' - /// - [Fact] - public void AccountIdTest() - { - instance.AccountId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.AccountId); - - } - /// - /// Test the property 'ApplicationId' - /// - [Fact] - public void ApplicationIdTest() - { - instance.ApplicationId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ApplicationId); - - } - /// - /// Test the property 'Alias' - /// - [Fact] - public void AliasTest() - { - instance.Alias = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Alias); - - } - /// - /// Test the property 'VoiceUrl' - /// - [Fact] - public void VoiceUrlTest() - { - instance.VoiceUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.VoiceUrl); - - } - /// - /// Test the property 'VoiceFallbackUrl' - /// - [Fact] - public void VoiceFallbackUrlTest() - { - instance.VoiceFallbackUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.VoiceFallbackUrl); - - } - /// - /// Test the property 'CallConnectUrl' - /// - [Fact] - public void CallConnectUrlTest() - { - instance.CallConnectUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.CallConnectUrl); - - } - /// - /// Test the property 'StatusCallbackUrl' - /// - [Fact] - public void StatusCallbackUrlTest() - { - instance.StatusCallbackUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.StatusCallbackUrl); - - } - /// - /// Test the property 'SmsUrl' - /// - [Fact] - public void SmsUrlTest() - { - instance.SmsUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.SmsUrl); - - } - /// - /// Test the property 'SmsFallbackUrl' - /// - [Fact] - public void SmsFallbackUrlTest() - { - instance.SmsFallbackUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.SmsFallbackUrl); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - ApplicationResultAllOf test1 = new ApplicationResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - ApplicationResultAllOf test2 = new ApplicationResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.Alias = "TS"; - test2.VoiceUrl = "TS"; - test2.VoiceFallbackUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.SmsUrl = "TS"; - test2.SmsFallbackUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - ApplicationResultAllOf test1 = new ApplicationResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - ApplicationResultAllOf test2 = new ApplicationResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.AccountId = "ts"; - test2.ApplicationId = "ts"; - test2.Alias = "ts"; - test2.VoiceUrl = "ts"; - test2.VoiceFallbackUrl = "ts"; - test2.CallConnectUrl = "ts"; - test2.StatusCallbackUrl = "ts"; - test2.SmsUrl = "ts"; - test2.SmsFallbackUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - ApplicationResultAllOf test1 = new ApplicationResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - ApplicationResultAllOf test1 = new ApplicationResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - ApplicationResultAllOf test1 = new ApplicationResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - ApplicationResultAllOf test2 = new ApplicationResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.Alias = "TS"; - test2.VoiceUrl = "TS"; - test2.VoiceFallbackUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.SmsUrl = "TS"; - test2.SmsFallbackUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - ApplicationResultAllOf test1 = new ApplicationResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - ApplicationResultAllOf test2 = new ApplicationResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.Alias = "TS"; - test2.VoiceUrl = "TS"; - test2.VoiceFallbackUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.SmsUrl = "TS"; - test2.SmsFallbackUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - ApplicationResultAllOf test1 = new ApplicationResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - ApplicationResultAllOf test2 = new ApplicationResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.Alias = "TS"; - test2.VoiceUrl = "TS"; - test2.VoiceFallbackUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.SmsUrl = "TS"; - test2.SmsFallbackUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/ApplicationResultTests.cs b/src/freeclimb.Test/Model/ApplicationResultTests.cs index 06a7074c..93106f94 100644 --- a/src/freeclimb.Test/Model/ApplicationResultTests.cs +++ b/src/freeclimb.Test/Model/ApplicationResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,33 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class ApplicationResultTests + + public class ApplicationResultTests : IDisposable { private ApplicationResult instance; public ApplicationResultTests() { - - instance = new ApplicationResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - + instance = new ApplicationResult( + uri: (string)TestHelpers.getTestValue(typeof(string)), + dateCreated: (string)TestHelpers.getTestValue(typeof(string)), + dateUpdated: (string)TestHelpers.getTestValue(typeof(string)), + revision: (int)TestHelpers.getTestValue(typeof(int)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + applicationId: (string)TestHelpers.getTestValue(typeof(string)), + alias: (string)TestHelpers.getTestValue(typeof(string)), + voiceUrl: (string)TestHelpers.getTestValue(typeof(string)), + voiceFallbackUrl: (string)TestHelpers.getTestValue(typeof(string)), + callConnectUrl: (string)TestHelpers.getTestValue(typeof(string)), + statusCallbackUrl: (string)TestHelpers.getTestValue(typeof(string)), + smsUrl: (string)TestHelpers.getTestValue(typeof(string)), + smsFallbackUrl: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +69,6 @@ public void ApplicationResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Uri' /// @@ -65,8 +77,8 @@ public void UriTest() { instance.Uri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Uri); - } + /// /// Test the property 'DateCreated' /// @@ -75,8 +87,8 @@ public void DateCreatedTest() { instance.DateCreated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateCreated); - } + /// /// Test the property 'DateUpdated' /// @@ -85,18 +97,18 @@ public void DateUpdatedTest() { instance.DateUpdated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateUpdated); - } + /// /// Test the property 'Revision' /// [Fact] public void RevisionTest() { - instance.Revision = 1; - Assert.Equal(1, (int) instance.Revision); + Assert.Equal(1, (int)instance.Revision); } + /// /// Test the property 'AccountId' /// @@ -105,8 +117,8 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } + /// /// Test the property 'ApplicationId' /// @@ -115,8 +127,8 @@ public void ApplicationIdTest() { instance.ApplicationId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ApplicationId); - } + /// /// Test the property 'Alias' /// @@ -125,8 +137,8 @@ public void AliasTest() { instance.Alias = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Alias); - } + /// /// Test the property 'VoiceUrl' /// @@ -135,8 +147,8 @@ public void VoiceUrlTest() { instance.VoiceUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.VoiceUrl); - } + /// /// Test the property 'VoiceFallbackUrl' /// @@ -145,8 +157,8 @@ public void VoiceFallbackUrlTest() { instance.VoiceFallbackUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.VoiceFallbackUrl); - } + /// /// Test the property 'CallConnectUrl' /// @@ -155,8 +167,8 @@ public void CallConnectUrlTest() { instance.CallConnectUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CallConnectUrl); - } + /// /// Test the property 'StatusCallbackUrl' /// @@ -165,8 +177,8 @@ public void StatusCallbackUrlTest() { instance.StatusCallbackUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.StatusCallbackUrl); - } + /// /// Test the property 'SmsUrl' /// @@ -175,8 +187,8 @@ public void SmsUrlTest() { instance.SmsUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.SmsUrl); - } + /// /// Test the property 'SmsFallbackUrl' /// @@ -185,262 +197,6 @@ public void SmsFallbackUrlTest() { instance.SmsFallbackUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.SmsFallbackUrl); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - ApplicationResult test1 = new ApplicationResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - ApplicationResult test2 = new ApplicationResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.Alias = "TS"; - test2.VoiceUrl = "TS"; - test2.VoiceFallbackUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.SmsUrl = "TS"; - test2.SmsFallbackUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - ApplicationResult test1 = new ApplicationResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - ApplicationResult test2 = new ApplicationResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.Uri = "ts"; - test2.DateCreated = "ts"; - test2.DateUpdated = "ts"; - test2.Revision = 2; - test2.AccountId = "ts"; - test2.ApplicationId = "ts"; - test2.Alias = "ts"; - test2.VoiceUrl = "ts"; - test2.VoiceFallbackUrl = "ts"; - test2.CallConnectUrl = "ts"; - test2.StatusCallbackUrl = "ts"; - test2.SmsUrl = "ts"; - test2.SmsFallbackUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - ApplicationResult test1 = new ApplicationResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - ApplicationResult test1 = new ApplicationResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - ApplicationResult test1 = new ApplicationResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - ApplicationResult test2 = new ApplicationResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.Alias = "TS"; - test2.VoiceUrl = "TS"; - test2.VoiceFallbackUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.SmsUrl = "TS"; - test2.SmsFallbackUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - ApplicationResult test1 = new ApplicationResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - - ApplicationResult test2 = new ApplicationResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.Alias = "TS"; - test2.VoiceUrl = "TS"; - test2.VoiceFallbackUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.SmsUrl = "TS"; - test2.SmsFallbackUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - ApplicationResult test1 = new ApplicationResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.VoiceUrl = "TS"; - test1.VoiceFallbackUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.SmsUrl = "TS"; - test1.SmsFallbackUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - ApplicationResult test2 = new ApplicationResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.Alias = "TS"; - test2.VoiceUrl = "TS"; - test2.VoiceFallbackUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.SmsUrl = "TS"; - test2.SmsFallbackUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/AvailableNumberListAllOfTests.cs b/src/freeclimb.Test/Model/AvailableNumberListAllOfTests.cs deleted file mode 100644 index 2b5ea624..00000000 --- a/src/freeclimb.Test/Model/AvailableNumberListAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing AvailableNumberListAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AvailableNumberListAllOfTests - { - private AvailableNumberListAllOf instance; - - public AvailableNumberListAllOfTests() - { - - instance = new AvailableNumberListAllOf(new List()); - - } - - /// - /// Test an instance of AvailableNumberListAllOf - /// - [Fact] - public void AvailableNumberListAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'AvailablePhoneNumbers' - /// - [Fact] - public void AvailablePhoneNumbersTest() - { - - List testList = new List(); - instance.AvailablePhoneNumbers = testList; - Assert.Equal(testList, instance.AvailablePhoneNumbers); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - AvailableNumberListAllOf test1 = new AvailableNumberListAllOf(new List()); - List testList = new List(); - test1.AvailablePhoneNumbers = testList; - - AvailableNumberListAllOf test2 = new AvailableNumberListAllOf(new List()); - List testList2 = new List(); - test2.AvailablePhoneNumbers = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - AvailableNumberListAllOf test1 = new AvailableNumberListAllOf(new List()); - List testList = new List(); - test1.AvailablePhoneNumbers = testList; - - AvailableNumberListAllOf test2 = new AvailableNumberListAllOf(new List()); - List testList2 = null; - test2.AvailablePhoneNumbers = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - AvailableNumberListAllOf test1 = new AvailableNumberListAllOf(new List()); - List testList = new List(); - test1.AvailablePhoneNumbers = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - AvailableNumberListAllOf test1 = new AvailableNumberListAllOf(new List()); - List testList = new List(); - test1.AvailablePhoneNumbers = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - AvailableNumberListAllOf test1 = new AvailableNumberListAllOf(new List()); - List testList = new List(); - test1.AvailablePhoneNumbers = testList; - - AvailableNumberListAllOf test2 = new AvailableNumberListAllOf(new List()); - List testList2 = new List(); - test2.AvailablePhoneNumbers = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - AvailableNumberListAllOf test1 = new AvailableNumberListAllOf(new List()); - List testList = new List(); - test1.AvailablePhoneNumbers = testList; - - AvailableNumberListAllOf test2 = new AvailableNumberListAllOf(new List()); - List testList2 = new List(); - test2.AvailablePhoneNumbers = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - AvailableNumberListAllOf test1 = new AvailableNumberListAllOf(new List()); - List testList = new List(); - test1.AvailablePhoneNumbers = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - AvailableNumberListAllOf test2 = new AvailableNumberListAllOf(new List()); - List testList2 = new List(); - test2.AvailablePhoneNumbers = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/AvailableNumberListTests.cs b/src/freeclimb.Test/Model/AvailableNumberListTests.cs index 26778bdf..13d8c43b 100644 --- a/src/freeclimb.Test/Model/AvailableNumberListTests.cs +++ b/src/freeclimb.Test/Model/AvailableNumberListTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,29 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class AvailableNumberListTests + + public class AvailableNumberListTests : IDisposable { private AvailableNumberList instance; public AvailableNumberListTests() { - - instance = new AvailableNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new AvailableNumberList( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + availablePhoneNumbers: (List) + TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +65,66 @@ public void AvailableNumberListInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +133,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'AvailablePhoneNumbers' /// [Fact] public void AvailablePhoneNumbersTest() { - List testList = new List(); instance.AvailablePhoneNumbers = testList; - Assert.Equal(testList, instance.AvailablePhoneNumbers); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - AvailableNumberList test1 = new AvailableNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.AvailablePhoneNumbers = testList; - - AvailableNumberList test2 = new AvailableNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.AvailablePhoneNumbers = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - AvailableNumberList test1 = new AvailableNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.AvailablePhoneNumbers = testList; - - AvailableNumberList test2 = new AvailableNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.AvailablePhoneNumbers = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - AvailableNumberList test1 = new AvailableNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.AvailablePhoneNumbers = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - AvailableNumberList test1 = new AvailableNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.AvailablePhoneNumbers = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - AvailableNumberList test1 = new AvailableNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.AvailablePhoneNumbers = testList; - - AvailableNumberList test2 = new AvailableNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.AvailablePhoneNumbers = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - AvailableNumberList test1 = new AvailableNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.AvailablePhoneNumbers = testList; - - AvailableNumberList test2 = new AvailableNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.AvailablePhoneNumbers = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - AvailableNumberList test1 = new AvailableNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.AvailablePhoneNumbers = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - AvailableNumberList test2 = new AvailableNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.AvailablePhoneNumbers = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.AvailablePhoneNumbers, testList); } } } diff --git a/src/freeclimb.Test/Model/AvailableNumberTests.cs b/src/freeclimb.Test/Model/AvailableNumberTests.cs index ef91ec76..59b55884 100644 --- a/src/freeclimb.Test/Model/AvailableNumberTests.cs +++ b/src/freeclimb.Test/Model/AvailableNumberTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,27 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class AvailableNumberTests + + public class AvailableNumberTests : IDisposable { private AvailableNumber instance; public AvailableNumberTests() { - - instance = new AvailableNumber(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", false, false, "TEST_STRING", "TEST_STRING"); - + instance = new AvailableNumber( + capabilities: (Capabilities)TestHelpers.getTestValue(typeof(Capabilities)), + campaignId: (string)TestHelpers.getTestValue(typeof(string)), + phoneNumber: (string)TestHelpers.getTestValue(typeof(string)), + voiceEnabled: (bool?)TestHelpers.getTestValue(typeof(bool?)), + smsEnabled: (bool?)TestHelpers.getTestValue(typeof(bool?)), + region: (string)TestHelpers.getTestValue(typeof(string)), + country: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,18 +63,17 @@ public void AvailableNumberInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Capabilities' /// [Fact] public void CapabilitiesTest() { - Capabilities testObject = new Capabilities(false, false, false, false, false); + Capabilities testObject = (Capabilities)TestHelpers.getTestValue(typeof(Capabilities)); instance.Capabilities = testObject; Assert.Equal(testObject, instance.Capabilities); - } + /// /// Test the property 'CampaignId' /// @@ -76,8 +82,8 @@ public void CampaignIdTest() { instance.CampaignId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CampaignId); - } + /// /// Test the property 'PhoneNumber' /// @@ -86,8 +92,8 @@ public void PhoneNumberTest() { instance.PhoneNumber = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.PhoneNumber); - } + /// /// Test the property 'VoiceEnabled' /// @@ -95,9 +101,9 @@ public void PhoneNumberTest() public void VoiceEnabledTest() { instance.VoiceEnabled = false; - Assert.Equal(false, instance.VoiceEnabled); - + Assert.False(instance.VoiceEnabled); } + /// /// Test the property 'SmsEnabled' /// @@ -105,9 +111,9 @@ public void VoiceEnabledTest() public void SmsEnabledTest() { instance.SmsEnabled = false; - Assert.Equal(false, instance.SmsEnabled); - + Assert.False(instance.SmsEnabled); } + /// /// Test the property 'Region' /// @@ -116,8 +122,8 @@ public void RegionTest() { instance.Region = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Region); - } + /// /// Test the property 'Country' /// @@ -126,202 +132,6 @@ public void CountryTest() { instance.Country = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Country); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - AvailableNumber test1 = new AvailableNumber(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", false, false, "TEST_STRING", "TEST_STRING"); - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumber = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Region = "TS"; - test1.Country = "TS"; - - AvailableNumber test2 = new AvailableNumber(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", false, false, "TEST_STRING", "TEST_STRING"); - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "TS"; - test2.PhoneNumber = "TS"; - test2.VoiceEnabled = true; - test2.SmsEnabled = true; - test2.Region = "TS"; - test2.Country = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - AvailableNumber test1 = new AvailableNumber(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", false, false, "TEST_STRING", "TEST_STRING"); - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumber = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Region = "TS"; - test1.Country = "TS"; - - AvailableNumber test2 = new AvailableNumber(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", false, false, "TEST_STRING", "TEST_STRING"); - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "ts"; - test2.PhoneNumber = "ts"; - test2.VoiceEnabled = false; - test2.SmsEnabled = false; - test2.Region = "ts"; - test2.Country = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - AvailableNumber test1 = new AvailableNumber(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", false, false, "TEST_STRING", "TEST_STRING"); - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumber = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Region = "TS"; - test1.Country = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - AvailableNumber test1 = new AvailableNumber(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", false, false, "TEST_STRING", "TEST_STRING"); - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumber = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Region = "TS"; - test1.Country = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - AvailableNumber test1 = new AvailableNumber(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", false, false, "TEST_STRING", "TEST_STRING"); - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumber = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Region = "TS"; - test1.Country = "TS"; - - AvailableNumber test2 = new AvailableNumber(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", false, false, "TEST_STRING", "TEST_STRING"); - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "TS"; - test2.PhoneNumber = "TS"; - test2.VoiceEnabled = true; - test2.SmsEnabled = true; - test2.Region = "TS"; - test2.Country = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - AvailableNumber test1 = new AvailableNumber(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", false, false, "TEST_STRING", "TEST_STRING"); - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumber = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Region = "TS"; - test1.Country = "TS"; - - AvailableNumber test2 = new AvailableNumber(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", false, false, "TEST_STRING", "TEST_STRING"); - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "TS"; - test2.PhoneNumber = "TS"; - test2.VoiceEnabled = true; - test2.SmsEnabled = true; - test2.Region = "TS"; - test2.Country = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - AvailableNumber test1 = new AvailableNumber(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", false, false, "TEST_STRING", "TEST_STRING"); - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumber = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Region = "TS"; - test1.Country = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - AvailableNumber test2 = new AvailableNumber(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", false, false, "TEST_STRING", "TEST_STRING"); - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "TS"; - test2.PhoneNumber = "TS"; - test2.VoiceEnabled = true; - test2.SmsEnabled = true; - test2.Region = "TS"; - test2.Country = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/BuyIncomingNumberRequestTests.cs b/src/freeclimb.Test/Model/BuyIncomingNumberRequestTests.cs index 43832e9f..83249fb1 100644 --- a/src/freeclimb.Test/Model/BuyIncomingNumberRequestTests.cs +++ b/src/freeclimb.Test/Model/BuyIncomingNumberRequestTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,23 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class BuyIncomingNumberRequestTests + + public class BuyIncomingNumberRequestTests : IDisposable { private BuyIncomingNumberRequest instance; public BuyIncomingNumberRequestTests() { - - instance = new BuyIncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - + instance = new BuyIncomingNumberRequest( + phoneNumber: (string)TestHelpers.getTestValue(typeof(string)), + alias: (string)TestHelpers.getTestValue(typeof(string)), + applicationId: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +59,6 @@ public void BuyIncomingNumberRequestInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'PhoneNumber' /// @@ -65,8 +67,8 @@ public void PhoneNumberTest() { instance.PhoneNumber = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.PhoneNumber); - } + /// /// Test the property 'Alias' /// @@ -75,8 +77,8 @@ public void AliasTest() { instance.Alias = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Alias); - } + /// /// Test the property 'ApplicationId' /// @@ -85,142 +87,6 @@ public void ApplicationIdTest() { instance.ApplicationId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ApplicationId); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - BuyIncomingNumberRequest test1 = new BuyIncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.ApplicationId = "TS"; - - BuyIncomingNumberRequest test2 = new BuyIncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.PhoneNumber = "TS"; - test2.Alias = "TS"; - test2.ApplicationId = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - BuyIncomingNumberRequest test1 = new BuyIncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.ApplicationId = "TS"; - - BuyIncomingNumberRequest test2 = new BuyIncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.PhoneNumber = "ts"; - test2.Alias = "ts"; - test2.ApplicationId = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - BuyIncomingNumberRequest test1 = new BuyIncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.ApplicationId = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - BuyIncomingNumberRequest test1 = new BuyIncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.ApplicationId = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - BuyIncomingNumberRequest test1 = new BuyIncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.ApplicationId = "TS"; - - BuyIncomingNumberRequest test2 = new BuyIncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.PhoneNumber = "TS"; - test2.Alias = "TS"; - test2.ApplicationId = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - BuyIncomingNumberRequest test1 = new BuyIncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.ApplicationId = "TS"; - - BuyIncomingNumberRequest test2 = new BuyIncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.PhoneNumber = "TS"; - test2.Alias = "TS"; - test2.ApplicationId = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - BuyIncomingNumberRequest test1 = new BuyIncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.ApplicationId = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - BuyIncomingNumberRequest test2 = new BuyIncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.PhoneNumber = "TS"; - test2.Alias = "TS"; - test2.ApplicationId = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/CallControlWebhookTests.cs b/src/freeclimb.Test/Model/CallControlWebhookTests.cs new file mode 100644 index 00000000..281d6de4 --- /dev/null +++ b/src/freeclimb.Test/Model/CallControlWebhookTests.cs @@ -0,0 +1,119 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing CallControlWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class CallControlWebhookTests : IDisposable + { + private CallControlWebhook instance; + + public CallControlWebhookTests() + { + instance = new CallControlWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + digits: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CallControlWebhook + /// + [Fact] + public void CallControlWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'Digits' + /// + [Fact] + public void DigitsTest() + { + instance.Digits = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.Digits); + } + + [Fact] + public void TestDeserializeJsonToCallControlWebhook() + { + string payload = @"{ ""requestType"": ""callControl"" }"; + CallControlWebhook deserialized = CallControlWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("callControl", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/CallListAllOfTests.cs b/src/freeclimb.Test/Model/CallListAllOfTests.cs deleted file mode 100644 index 60acffc1..00000000 --- a/src/freeclimb.Test/Model/CallListAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing CallListAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CallListAllOfTests - { - private CallListAllOf instance; - - public CallListAllOfTests() - { - - instance = new CallListAllOf(new List()); - - } - - /// - /// Test an instance of CallListAllOf - /// - [Fact] - public void CallListAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Calls' - /// - [Fact] - public void CallsTest() - { - - List testList = new List(); - instance.Calls = testList; - Assert.Equal(testList, instance.Calls); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - CallListAllOf test1 = new CallListAllOf(new List()); - List testList = new List(); - test1.Calls = testList; - - CallListAllOf test2 = new CallListAllOf(new List()); - List testList2 = new List(); - test2.Calls = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - CallListAllOf test1 = new CallListAllOf(new List()); - List testList = new List(); - test1.Calls = testList; - - CallListAllOf test2 = new CallListAllOf(new List()); - List testList2 = null; - test2.Calls = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - CallListAllOf test1 = new CallListAllOf(new List()); - List testList = new List(); - test1.Calls = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - CallListAllOf test1 = new CallListAllOf(new List()); - List testList = new List(); - test1.Calls = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - CallListAllOf test1 = new CallListAllOf(new List()); - List testList = new List(); - test1.Calls = testList; - - CallListAllOf test2 = new CallListAllOf(new List()); - List testList2 = new List(); - test2.Calls = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - CallListAllOf test1 = new CallListAllOf(new List()); - List testList = new List(); - test1.Calls = testList; - - CallListAllOf test2 = new CallListAllOf(new List()); - List testList2 = new List(); - test2.Calls = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - CallListAllOf test1 = new CallListAllOf(new List()); - List testList = new List(); - test1.Calls = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - CallListAllOf test2 = new CallListAllOf(new List()); - List testList2 = new List(); - test2.Calls = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/CallListTests.cs b/src/freeclimb.Test/Model/CallListTests.cs index 59e8051e..c8efc24f 100644 --- a/src/freeclimb.Test/Model/CallListTests.cs +++ b/src/freeclimb.Test/Model/CallListTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,28 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class CallListTests + + public class CallListTests : IDisposable { private CallList instance; public CallListTests() { - - instance = new CallList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new CallList( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + calls: (List)TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +64,66 @@ public void CallListInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +132,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'Calls' /// [Fact] public void CallsTest() { - List testList = new List(); instance.Calls = testList; - Assert.Equal(testList, instance.Calls); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - CallList test1 = new CallList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Calls = testList; - - CallList test2 = new CallList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Calls = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - CallList test1 = new CallList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Calls = testList; - - CallList test2 = new CallList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.Calls = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - CallList test1 = new CallList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Calls = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - CallList test1 = new CallList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Calls = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - CallList test1 = new CallList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Calls = testList; - - CallList test2 = new CallList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Calls = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - CallList test1 = new CallList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Calls = testList; - - CallList test2 = new CallList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Calls = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - CallList test1 = new CallList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Calls = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - CallList test2 = new CallList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Calls = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.Calls, testList); } } } diff --git a/src/freeclimb.Test/Model/CallResultAllOfTests.cs b/src/freeclimb.Test/Model/CallResultAllOfTests.cs deleted file mode 100644 index 667dd345..00000000 --- a/src/freeclimb.Test/Model/CallResultAllOfTests.cs +++ /dev/null @@ -1,545 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing CallResultAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CallResultAllOfTests - { - private CallResultAllOf instance; - - public CallResultAllOfTests() - { - - instance = new CallResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - - } - - /// - /// Test an instance of CallResultAllOf - /// - [Fact] - public void CallResultAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'CallId' - /// - [Fact] - public void CallIdTest() - { - instance.CallId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.CallId); - - } - /// - /// Test the property 'ParentCallId' - /// - [Fact] - public void ParentCallIdTest() - { - instance.ParentCallId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ParentCallId); - - } - /// - /// Test the property 'AccountId' - /// - [Fact] - public void AccountIdTest() - { - instance.AccountId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.AccountId); - - } - /// - /// Test the property 'From' - /// - [Fact] - public void FromTest() - { - instance.From = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.From); - - } - /// - /// Test the property 'To' - /// - [Fact] - public void ToTest() - { - instance.To = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.To); - - } - /// - /// Test the property 'PhoneNumberId' - /// - [Fact] - public void PhoneNumberIdTest() - { - instance.PhoneNumberId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.PhoneNumberId); - - } - /// - /// Test the property 'CallStatus' - /// - [Fact] - public void CallStatusTest() - { - instance.CallStatus = CallStatus.QUEUED; - Assert.Equal(instance.CallStatus,CallStatus.QUEUED); - instance.CallStatus = CallStatus.RINGING; - Assert.Equal(instance.CallStatus,CallStatus.RINGING); - instance.CallStatus = CallStatus.IN_PROGRESS; - Assert.Equal(instance.CallStatus,CallStatus.IN_PROGRESS); - instance.CallStatus = CallStatus.CANCELED; - Assert.Equal(instance.CallStatus,CallStatus.CANCELED); - instance.CallStatus = CallStatus.COMPLETED; - Assert.Equal(instance.CallStatus,CallStatus.COMPLETED); - instance.CallStatus = CallStatus.FAILED; - Assert.Equal(instance.CallStatus,CallStatus.FAILED); - instance.CallStatus = CallStatus.BUSY; - Assert.Equal(instance.CallStatus,CallStatus.BUSY); - instance.CallStatus = CallStatus.NO_ANSWER; - Assert.Equal(instance.CallStatus,CallStatus.NO_ANSWER); - - } - /// - /// Test the property 'StartTime' - /// - [Fact] - public void StartTimeTest() - { - instance.StartTime = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.StartTime); - - } - /// - /// Test the property 'ConnectTime' - /// - [Fact] - public void ConnectTimeTest() - { - instance.ConnectTime = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ConnectTime); - - } - /// - /// Test the property 'EndTime' - /// - [Fact] - public void EndTimeTest() - { - instance.EndTime = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.EndTime); - - } - /// - /// Test the property 'Duration' - /// - [Fact] - public void DurationTest() - { - - instance.Duration = 1; - Assert.Equal(1, (int) instance.Duration); - } - /// - /// Test the property 'ConnectDuration' - /// - [Fact] - public void ConnectDurationTest() - { - - instance.ConnectDuration = 1; - Assert.Equal(1, (int) instance.ConnectDuration); - } - /// - /// Test the property 'Direction' - /// - [Fact] - public void DirectionTest() - { - instance.Direction = CallDirection.INBOUND; - Assert.Equal(instance.Direction,CallDirection.INBOUND); - instance.Direction = CallDirection.OUTBOUND_API; - Assert.Equal(instance.Direction,CallDirection.OUTBOUND_API); - instance.Direction = CallDirection.OUTBOUND_DIAL; - Assert.Equal(instance.Direction,CallDirection.OUTBOUND_DIAL); - - } - /// - /// Test the property 'AnsweredBy' - /// - [Fact] - public void AnsweredByTest() - { - instance.AnsweredBy = AnsweredBy.HUMAN; - Assert.Equal(instance.AnsweredBy,AnsweredBy.HUMAN); - instance.AnsweredBy = AnsweredBy.MACHINE; - Assert.Equal(instance.AnsweredBy,AnsweredBy.MACHINE); - - } - /// - /// Test the property 'SubresourceUris' - /// - [Fact] - public void SubresourceUrisTest() - { - object testObject = new object(); - instance.SubresourceUris = testObject; - Assert.Equal(testObject, instance.SubresourceUris); - - } - /// - /// Test the property 'ApplicationId' - /// - [Fact] - public void ApplicationIdTest() - { - instance.ApplicationId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ApplicationId); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - CallResultAllOf test1 = new CallResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test1.CallId = "TS"; - test1.ParentCallId = "TS"; - test1.AccountId = "TS"; - test1.From = "TS"; - test1.To = "TS"; - test1.PhoneNumberId = "TS"; - test1.CallStatus = CallStatus.QUEUED; - test1.StartTime = "TS"; - test1.ConnectTime = "TS"; - test1.EndTime = "TS"; - test1.Duration = 1; - test1.ConnectDuration = 1; - test1.Direction = CallDirection.INBOUND; - test1.AnsweredBy = AnsweredBy.HUMAN; - object testObject = new object(); - test1.SubresourceUris = testObject; - test1.ApplicationId = "TS"; - - CallResultAllOf test2 = new CallResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test2.CallId = "TS"; - test2.ParentCallId = "TS"; - test2.AccountId = "TS"; - test2.From = "TS"; - test2.To = "TS"; - test2.PhoneNumberId = "TS"; - test2.CallStatus = CallStatus.QUEUED; - test2.StartTime = "TS"; - test2.ConnectTime = "TS"; - test2.EndTime = "TS"; - test2.Duration = 1; - test2.ConnectDuration = 1; - test2.Direction = CallDirection.INBOUND; - test2.AnsweredBy = AnsweredBy.HUMAN; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - test2.ApplicationId = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - CallResultAllOf test1 = new CallResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test1.CallId = "TS"; - test1.ParentCallId = "TS"; - test1.AccountId = "TS"; - test1.From = "TS"; - test1.To = "TS"; - test1.PhoneNumberId = "TS"; - test1.CallStatus = CallStatus.QUEUED; - test1.StartTime = "TS"; - test1.ConnectTime = "TS"; - test1.EndTime = "TS"; - test1.Duration = 1; - test1.ConnectDuration = 1; - test1.Direction = CallDirection.INBOUND; - test1.AnsweredBy = AnsweredBy.HUMAN; - object testObject = new object(); - test1.SubresourceUris = testObject; - test1.ApplicationId = "TS"; - - CallResultAllOf test2 = new CallResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test2.CallId = "ts"; - test2.ParentCallId = "ts"; - test2.AccountId = "ts"; - test2.From = "ts"; - test2.To = "ts"; - test2.PhoneNumberId = "ts"; - test2.CallStatus = CallStatus.RINGING; - test2.StartTime = "ts"; - test2.ConnectTime = "ts"; - test2.EndTime = "ts"; - test2.Duration = 2; - test2.ConnectDuration = 2; - test2.Direction = CallDirection.OUTBOUND_API; - test2.AnsweredBy = AnsweredBy.MACHINE; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - test2.ApplicationId = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - CallResultAllOf test1 = new CallResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test1.CallId = "TS"; - test1.ParentCallId = "TS"; - test1.AccountId = "TS"; - test1.From = "TS"; - test1.To = "TS"; - test1.PhoneNumberId = "TS"; - test1.CallStatus = CallStatus.QUEUED; - test1.StartTime = "TS"; - test1.ConnectTime = "TS"; - test1.EndTime = "TS"; - test1.Duration = 1; - test1.ConnectDuration = 1; - test1.Direction = CallDirection.INBOUND; - test1.AnsweredBy = AnsweredBy.HUMAN; - object testObject = new object(); - test1.SubresourceUris = testObject; - test1.ApplicationId = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - CallResultAllOf test1 = new CallResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test1.CallId = "TS"; - test1.ParentCallId = "TS"; - test1.AccountId = "TS"; - test1.From = "TS"; - test1.To = "TS"; - test1.PhoneNumberId = "TS"; - test1.CallStatus = CallStatus.QUEUED; - test1.StartTime = "TS"; - test1.ConnectTime = "TS"; - test1.EndTime = "TS"; - test1.Duration = 1; - test1.ConnectDuration = 1; - test1.Direction = CallDirection.INBOUND; - test1.AnsweredBy = AnsweredBy.HUMAN; - object testObject = new object(); - test1.SubresourceUris = testObject; - test1.ApplicationId = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - CallResultAllOf test1 = new CallResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test1.CallId = "TS"; - test1.ParentCallId = "TS"; - test1.AccountId = "TS"; - test1.From = "TS"; - test1.To = "TS"; - test1.PhoneNumberId = "TS"; - test1.CallStatus = CallStatus.QUEUED; - test1.StartTime = "TS"; - test1.ConnectTime = "TS"; - test1.EndTime = "TS"; - test1.Duration = 1; - test1.ConnectDuration = 1; - test1.Direction = CallDirection.INBOUND; - test1.AnsweredBy = AnsweredBy.HUMAN; - object testObject = new object(); - test1.SubresourceUris = testObject; - test1.ApplicationId = "TS"; - - CallResultAllOf test2 = new CallResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test2.CallId = "TS"; - test2.ParentCallId = "TS"; - test2.AccountId = "TS"; - test2.From = "TS"; - test2.To = "TS"; - test2.PhoneNumberId = "TS"; - test2.CallStatus = CallStatus.QUEUED; - test2.StartTime = "TS"; - test2.ConnectTime = "TS"; - test2.EndTime = "TS"; - test2.Duration = 1; - test2.ConnectDuration = 1; - test2.Direction = CallDirection.INBOUND; - test2.AnsweredBy = AnsweredBy.HUMAN; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - test2.ApplicationId = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - CallResultAllOf test1 = new CallResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test1.CallId = "TS"; - test1.ParentCallId = "TS"; - test1.AccountId = "TS"; - test1.From = "TS"; - test1.To = "TS"; - test1.PhoneNumberId = "TS"; - test1.CallStatus = CallStatus.QUEUED; - test1.StartTime = "TS"; - test1.ConnectTime = "TS"; - test1.EndTime = "TS"; - test1.Duration = 1; - test1.ConnectDuration = 1; - test1.Direction = CallDirection.INBOUND; - test1.AnsweredBy = AnsweredBy.HUMAN; - object testObject = new object(); - test1.SubresourceUris = testObject; - test1.ApplicationId = "TS"; - - CallResultAllOf test2 = new CallResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test2.CallId = "TS"; - test2.ParentCallId = "TS"; - test2.AccountId = "TS"; - test2.From = "TS"; - test2.To = "TS"; - test2.PhoneNumberId = "TS"; - test2.CallStatus = CallStatus.QUEUED; - test2.StartTime = "TS"; - test2.ConnectTime = "TS"; - test2.EndTime = "TS"; - test2.Duration = 1; - test2.ConnectDuration = 1; - test2.Direction = CallDirection.INBOUND; - test2.AnsweredBy = AnsweredBy.HUMAN; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - test2.ApplicationId = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - CallResultAllOf test1 = new CallResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test1.CallId = "TS"; - test1.ParentCallId = "TS"; - test1.AccountId = "TS"; - test1.From = "TS"; - test1.To = "TS"; - test1.PhoneNumberId = "TS"; - test1.CallStatus = CallStatus.QUEUED; - test1.StartTime = "TS"; - test1.ConnectTime = "TS"; - test1.EndTime = "TS"; - test1.Duration = 1; - test1.ConnectDuration = 1; - test1.Direction = CallDirection.INBOUND; - test1.AnsweredBy = AnsweredBy.HUMAN; - object testObject = new object(); - test1.SubresourceUris = testObject; - test1.ApplicationId = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - CallResultAllOf test2 = new CallResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test2.CallId = "TS"; - test2.ParentCallId = "TS"; - test2.AccountId = "TS"; - test2.From = "TS"; - test2.To = "TS"; - test2.PhoneNumberId = "TS"; - test2.CallStatus = CallStatus.QUEUED; - test2.StartTime = "TS"; - test2.ConnectTime = "TS"; - test2.EndTime = "TS"; - test2.Duration = 1; - test2.ConnectDuration = 1; - test2.Direction = CallDirection.INBOUND; - test2.AnsweredBy = AnsweredBy.HUMAN; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - test2.ApplicationId = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/CallResultTests.cs b/src/freeclimb.Test/Model/CallResultTests.cs index abff1a9e..20469cd6 100644 --- a/src/freeclimb.Test/Model/CallResultTests.cs +++ b/src/freeclimb.Test/Model/CallResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,40 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class CallResultTests + + public class CallResultTests : IDisposable { private CallResult instance; public CallResultTests() { - - instance = new CallResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - + instance = new CallResult( + uri: (string)TestHelpers.getTestValue(typeof(string)), + dateCreated: (string)TestHelpers.getTestValue(typeof(string)), + dateUpdated: (string)TestHelpers.getTestValue(typeof(string)), + revision: (int)TestHelpers.getTestValue(typeof(int)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + parentCallId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + phoneNumberId: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + startTime: (string)TestHelpers.getTestValue(typeof(string)), + connectTime: (string)TestHelpers.getTestValue(typeof(string)), + endTime: (string)TestHelpers.getTestValue(typeof(string)), + duration: (int?)TestHelpers.getTestValue(typeof(int?)), + connectDuration: (int?)TestHelpers.getTestValue(typeof(int?)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + answeredBy: (AnsweredBy)TestHelpers.getTestValue(typeof(AnsweredBy)), + subresourceUris: (Object)TestHelpers.getTestValue(typeof(Object)), + applicationId: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +76,6 @@ public void CallResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Uri' /// @@ -65,8 +84,8 @@ public void UriTest() { instance.Uri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Uri); - } + /// /// Test the property 'DateCreated' /// @@ -75,8 +94,8 @@ public void DateCreatedTest() { instance.DateCreated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateCreated); - } + /// /// Test the property 'DateUpdated' /// @@ -85,18 +104,18 @@ public void DateUpdatedTest() { instance.DateUpdated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateUpdated); - } + /// /// Test the property 'Revision' /// [Fact] public void RevisionTest() { - instance.Revision = 1; - Assert.Equal(1, (int) instance.Revision); + Assert.Equal(1, (int)instance.Revision); } + /// /// Test the property 'CallId' /// @@ -105,8 +124,8 @@ public void CallIdTest() { instance.CallId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CallId); - } + /// /// Test the property 'ParentCallId' /// @@ -115,8 +134,8 @@ public void ParentCallIdTest() { instance.ParentCallId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ParentCallId); - } + /// /// Test the property 'AccountId' /// @@ -125,8 +144,8 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } + /// /// Test the property 'From' /// @@ -135,8 +154,8 @@ public void FromTest() { instance.From = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.From); - } + /// /// Test the property 'To' /// @@ -145,8 +164,8 @@ public void ToTest() { instance.To = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.To); - } + /// /// Test the property 'PhoneNumberId' /// @@ -155,8 +174,8 @@ public void PhoneNumberIdTest() { instance.PhoneNumberId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.PhoneNumberId); - } + /// /// Test the property 'CallStatus' /// @@ -164,23 +183,23 @@ public void PhoneNumberIdTest() public void CallStatusTest() { instance.CallStatus = CallStatus.QUEUED; - Assert.Equal(instance.CallStatus,CallStatus.QUEUED); + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); instance.CallStatus = CallStatus.RINGING; - Assert.Equal(instance.CallStatus,CallStatus.RINGING); + Assert.Equal(CallStatus.RINGING, instance.CallStatus); instance.CallStatus = CallStatus.IN_PROGRESS; - Assert.Equal(instance.CallStatus,CallStatus.IN_PROGRESS); + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); instance.CallStatus = CallStatus.CANCELED; - Assert.Equal(instance.CallStatus,CallStatus.CANCELED); + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); instance.CallStatus = CallStatus.COMPLETED; - Assert.Equal(instance.CallStatus,CallStatus.COMPLETED); + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); instance.CallStatus = CallStatus.FAILED; - Assert.Equal(instance.CallStatus,CallStatus.FAILED); + Assert.Equal(CallStatus.FAILED, instance.CallStatus); instance.CallStatus = CallStatus.BUSY; - Assert.Equal(instance.CallStatus,CallStatus.BUSY); + Assert.Equal(CallStatus.BUSY, instance.CallStatus); instance.CallStatus = CallStatus.NO_ANSWER; - Assert.Equal(instance.CallStatus,CallStatus.NO_ANSWER); - + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); } + /// /// Test the property 'StartTime' /// @@ -189,8 +208,8 @@ public void StartTimeTest() { instance.StartTime = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.StartTime); - } + /// /// Test the property 'ConnectTime' /// @@ -199,8 +218,8 @@ public void ConnectTimeTest() { instance.ConnectTime = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ConnectTime); - } + /// /// Test the property 'EndTime' /// @@ -209,28 +228,28 @@ public void EndTimeTest() { instance.EndTime = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.EndTime); - } + /// /// Test the property 'Duration' /// [Fact] public void DurationTest() { - instance.Duration = 1; - Assert.Equal(1, (int) instance.Duration); + Assert.Equal(1, (int)instance.Duration); } + /// /// Test the property 'ConnectDuration' /// [Fact] public void ConnectDurationTest() { - instance.ConnectDuration = 1; - Assert.Equal(1, (int) instance.ConnectDuration); + Assert.Equal(1, (int)instance.ConnectDuration); } + /// /// Test the property 'Direction' /// @@ -238,13 +257,13 @@ public void ConnectDurationTest() public void DirectionTest() { instance.Direction = CallDirection.INBOUND; - Assert.Equal(instance.Direction,CallDirection.INBOUND); + Assert.Equal(CallDirection.INBOUND, instance.Direction); instance.Direction = CallDirection.OUTBOUND_API; - Assert.Equal(instance.Direction,CallDirection.OUTBOUND_API); + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); instance.Direction = CallDirection.OUTBOUND_DIAL; - Assert.Equal(instance.Direction,CallDirection.OUTBOUND_DIAL); - + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); } + /// /// Test the property 'AnsweredBy' /// @@ -252,11 +271,11 @@ public void DirectionTest() public void AnsweredByTest() { instance.AnsweredBy = AnsweredBy.HUMAN; - Assert.Equal(instance.AnsweredBy,AnsweredBy.HUMAN); + Assert.Equal(AnsweredBy.HUMAN, instance.AnsweredBy); instance.AnsweredBy = AnsweredBy.MACHINE; - Assert.Equal(instance.AnsweredBy,AnsweredBy.MACHINE); - + Assert.Equal(AnsweredBy.MACHINE, instance.AnsweredBy); } + /// /// Test the property 'SubresourceUris' /// @@ -266,8 +285,8 @@ public void SubresourceUrisTest() object testObject = new object(); instance.SubresourceUris = testObject; Assert.Equal(testObject, instance.SubresourceUris); - } + /// /// Test the property 'ApplicationId' /// @@ -276,358 +295,6 @@ public void ApplicationIdTest() { instance.ApplicationId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ApplicationId); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - CallResult test1 = new CallResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.CallId = "TS"; - test1.ParentCallId = "TS"; - test1.AccountId = "TS"; - test1.From = "TS"; - test1.To = "TS"; - test1.PhoneNumberId = "TS"; - test1.CallStatus = CallStatus.QUEUED; - test1.StartTime = "TS"; - test1.ConnectTime = "TS"; - test1.EndTime = "TS"; - test1.Duration = 1; - test1.ConnectDuration = 1; - test1.Direction = CallDirection.INBOUND; - test1.AnsweredBy = AnsweredBy.HUMAN; - object testObject = new object(); - test1.SubresourceUris = testObject; - test1.ApplicationId = "TS"; - - CallResult test2 = new CallResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.CallId = "TS"; - test2.ParentCallId = "TS"; - test2.AccountId = "TS"; - test2.From = "TS"; - test2.To = "TS"; - test2.PhoneNumberId = "TS"; - test2.CallStatus = CallStatus.QUEUED; - test2.StartTime = "TS"; - test2.ConnectTime = "TS"; - test2.EndTime = "TS"; - test2.Duration = 1; - test2.ConnectDuration = 1; - test2.Direction = CallDirection.INBOUND; - test2.AnsweredBy = AnsweredBy.HUMAN; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - test2.ApplicationId = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - CallResult test1 = new CallResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.CallId = "TS"; - test1.ParentCallId = "TS"; - test1.AccountId = "TS"; - test1.From = "TS"; - test1.To = "TS"; - test1.PhoneNumberId = "TS"; - test1.CallStatus = CallStatus.QUEUED; - test1.StartTime = "TS"; - test1.ConnectTime = "TS"; - test1.EndTime = "TS"; - test1.Duration = 1; - test1.ConnectDuration = 1; - test1.Direction = CallDirection.INBOUND; - test1.AnsweredBy = AnsweredBy.HUMAN; - object testObject = new object(); - test1.SubresourceUris = testObject; - test1.ApplicationId = "TS"; - - CallResult test2 = new CallResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test2.Uri = "ts"; - test2.DateCreated = "ts"; - test2.DateUpdated = "ts"; - test2.Revision = 2; - test2.CallId = "ts"; - test2.ParentCallId = "ts"; - test2.AccountId = "ts"; - test2.From = "ts"; - test2.To = "ts"; - test2.PhoneNumberId = "ts"; - test2.CallStatus = CallStatus.RINGING; - test2.StartTime = "ts"; - test2.ConnectTime = "ts"; - test2.EndTime = "ts"; - test2.Duration = 2; - test2.ConnectDuration = 2; - test2.Direction = CallDirection.OUTBOUND_API; - test2.AnsweredBy = AnsweredBy.MACHINE; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - test2.ApplicationId = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - CallResult test1 = new CallResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.CallId = "TS"; - test1.ParentCallId = "TS"; - test1.AccountId = "TS"; - test1.From = "TS"; - test1.To = "TS"; - test1.PhoneNumberId = "TS"; - test1.CallStatus = CallStatus.QUEUED; - test1.StartTime = "TS"; - test1.ConnectTime = "TS"; - test1.EndTime = "TS"; - test1.Duration = 1; - test1.ConnectDuration = 1; - test1.Direction = CallDirection.INBOUND; - test1.AnsweredBy = AnsweredBy.HUMAN; - object testObject = new object(); - test1.SubresourceUris = testObject; - test1.ApplicationId = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - CallResult test1 = new CallResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.CallId = "TS"; - test1.ParentCallId = "TS"; - test1.AccountId = "TS"; - test1.From = "TS"; - test1.To = "TS"; - test1.PhoneNumberId = "TS"; - test1.CallStatus = CallStatus.QUEUED; - test1.StartTime = "TS"; - test1.ConnectTime = "TS"; - test1.EndTime = "TS"; - test1.Duration = 1; - test1.ConnectDuration = 1; - test1.Direction = CallDirection.INBOUND; - test1.AnsweredBy = AnsweredBy.HUMAN; - object testObject = new object(); - test1.SubresourceUris = testObject; - test1.ApplicationId = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - CallResult test1 = new CallResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.CallId = "TS"; - test1.ParentCallId = "TS"; - test1.AccountId = "TS"; - test1.From = "TS"; - test1.To = "TS"; - test1.PhoneNumberId = "TS"; - test1.CallStatus = CallStatus.QUEUED; - test1.StartTime = "TS"; - test1.ConnectTime = "TS"; - test1.EndTime = "TS"; - test1.Duration = 1; - test1.ConnectDuration = 1; - test1.Direction = CallDirection.INBOUND; - test1.AnsweredBy = AnsweredBy.HUMAN; - object testObject = new object(); - test1.SubresourceUris = testObject; - test1.ApplicationId = "TS"; - - CallResult test2 = new CallResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.CallId = "TS"; - test2.ParentCallId = "TS"; - test2.AccountId = "TS"; - test2.From = "TS"; - test2.To = "TS"; - test2.PhoneNumberId = "TS"; - test2.CallStatus = CallStatus.QUEUED; - test2.StartTime = "TS"; - test2.ConnectTime = "TS"; - test2.EndTime = "TS"; - test2.Duration = 1; - test2.ConnectDuration = 1; - test2.Direction = CallDirection.INBOUND; - test2.AnsweredBy = AnsweredBy.HUMAN; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - test2.ApplicationId = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - CallResult test1 = new CallResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.CallId = "TS"; - test1.ParentCallId = "TS"; - test1.AccountId = "TS"; - test1.From = "TS"; - test1.To = "TS"; - test1.PhoneNumberId = "TS"; - test1.CallStatus = CallStatus.QUEUED; - test1.StartTime = "TS"; - test1.ConnectTime = "TS"; - test1.EndTime = "TS"; - test1.Duration = 1; - test1.ConnectDuration = 1; - test1.Direction = CallDirection.INBOUND; - test1.AnsweredBy = AnsweredBy.HUMAN; - object testObject = new object(); - test1.SubresourceUris = testObject; - test1.ApplicationId = "TS"; - - CallResult test2 = new CallResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.CallId = "TS"; - test2.ParentCallId = "TS"; - test2.AccountId = "TS"; - test2.From = "TS"; - test2.To = "TS"; - test2.PhoneNumberId = "TS"; - test2.CallStatus = CallStatus.QUEUED; - test2.StartTime = "TS"; - test2.ConnectTime = "TS"; - test2.EndTime = "TS"; - test2.Duration = 1; - test2.ConnectDuration = 1; - test2.Direction = CallDirection.INBOUND; - test2.AnsweredBy = AnsweredBy.HUMAN; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - test2.ApplicationId = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - CallResult test1 = new CallResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.CallId = "TS"; - test1.ParentCallId = "TS"; - test1.AccountId = "TS"; - test1.From = "TS"; - test1.To = "TS"; - test1.PhoneNumberId = "TS"; - test1.CallStatus = CallStatus.QUEUED; - test1.StartTime = "TS"; - test1.ConnectTime = "TS"; - test1.EndTime = "TS"; - test1.Duration = 1; - test1.ConnectDuration = 1; - test1.Direction = CallDirection.INBOUND; - test1.AnsweredBy = AnsweredBy.HUMAN; - object testObject = new object(); - test1.SubresourceUris = testObject; - test1.ApplicationId = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - CallResult test2 = new CallResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", CallStatus.QUEUED, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, CallDirection.INBOUND, AnsweredBy.HUMAN, new object(), "TEST_STRING"); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.CallId = "TS"; - test2.ParentCallId = "TS"; - test2.AccountId = "TS"; - test2.From = "TS"; - test2.To = "TS"; - test2.PhoneNumberId = "TS"; - test2.CallStatus = CallStatus.QUEUED; - test2.StartTime = "TS"; - test2.ConnectTime = "TS"; - test2.EndTime = "TS"; - test2.Duration = 1; - test2.ConnectDuration = 1; - test2.Direction = CallDirection.INBOUND; - test2.AnsweredBy = AnsweredBy.HUMAN; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - test2.ApplicationId = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/CallStatusWebhookTests.cs b/src/freeclimb.Test/Model/CallStatusWebhookTests.cs new file mode 100644 index 00000000..54c57727 --- /dev/null +++ b/src/freeclimb.Test/Model/CallStatusWebhookTests.cs @@ -0,0 +1,236 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing CallStatusWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class CallStatusWebhookTests : IDisposable + { + private CallStatusWebhook instance; + + public CallStatusWebhookTests() + { + instance = new CallStatusWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + callEndedReason: (CallEndedReason)TestHelpers.getTestValue(typeof(CallEndedReason)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CallStatusWebhook + /// + [Fact] + public void CallStatusWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'CallEndedReason' + /// + [Fact] + public void CallEndedReasonTest() + { + instance.CallEndedReason = CallEndedReason.BUSY; + Assert.Equal(CallEndedReason.BUSY, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.FAILED; + Assert.Equal(CallEndedReason.FAILED, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.NO_ANSWER; + Assert.Equal(CallEndedReason.NO_ANSWER, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.CALL_CANCELED; + Assert.Equal(CallEndedReason.CALL_CANCELED, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.FAR_END_HANGUP; + Assert.Equal(CallEndedReason.FAR_END_HANGUP, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.APP_HANGUP; + Assert.Equal(CallEndedReason.APP_HANGUP, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.APP_REJECT; + Assert.Equal(CallEndedReason.APP_REJECT, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.APP_NO_PERCL; + Assert.Equal(CallEndedReason.APP_NO_PERCL, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.APP_INVALID_PERCL; + Assert.Equal(CallEndedReason.APP_INVALID_PERCL, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.CONFERENCE_TERMINATED; + Assert.Equal(CallEndedReason.CONFERENCE_TERMINATED, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.CONFERENCE_EMPTIED; + Assert.Equal(CallEndedReason.CONFERENCE_EMPTIED, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.REMOVED_FROM_CONFERENCE; + Assert.Equal(CallEndedReason.REMOVED_FROM_CONFERENCE, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.MACHINE_DETECTED; + Assert.Equal(CallEndedReason.MACHINE_DETECTED, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.WEBHOOK_FAILED; + Assert.Equal(CallEndedReason.WEBHOOK_FAILED, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.WEBHOOK_INVALID_RESPONSE; + Assert.Equal(CallEndedReason.WEBHOOK_INVALID_RESPONSE, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.VOICE_DISABLED; + Assert.Equal(CallEndedReason.VOICE_DISABLED, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.CONFIG_ERROR_NO_APPLICATION; + Assert.Equal(CallEndedReason.CONFIG_ERROR_NO_APPLICATION, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.CONFIG_ERROR_NO_VOICE_URL; + Assert.Equal(CallEndedReason.CONFIG_ERROR_NO_VOICE_URL, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.MAX_REDIRECTS_ERROR; + Assert.Equal(CallEndedReason.MAX_REDIRECTS_ERROR, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.PERCL_PROCESSING_ERROR; + Assert.Equal(CallEndedReason.PERCL_PROCESSING_ERROR, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.INTERNAL_ERROR; + Assert.Equal(CallEndedReason.INTERNAL_ERROR, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.GRPC_HANGUP; + Assert.Equal(CallEndedReason.GRPC_HANGUP, instance.CallEndedReason); + instance.CallEndedReason = CallEndedReason.MAX_DURATION; + Assert.Equal(CallEndedReason.MAX_DURATION, instance.CallEndedReason); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + [Fact] + public void TestDeserializeJsonToCallStatusWebhook() + { + string payload = @"{ ""requestType"": ""callStatus"" }"; + CallStatusWebhook deserialized = CallStatusWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("callStatus", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/CapabilitiesTests.cs b/src/freeclimb.Test/Model/CapabilitiesTests.cs index 8ed06b79..516ae73b 100644 --- a/src/freeclimb.Test/Model/CapabilitiesTests.cs +++ b/src/freeclimb.Test/Model/CapabilitiesTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,25 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class CapabilitiesTests + + public class CapabilitiesTests : IDisposable { private Capabilities instance; public CapabilitiesTests() { - - instance = new Capabilities(false, false, false, false, false); - + instance = new Capabilities( + voice: (bool?)TestHelpers.getTestValue(typeof(bool?)), + sms: (bool?)TestHelpers.getTestValue(typeof(bool?)), + tollFree: (bool?)TestHelpers.getTestValue(typeof(bool?)), + tenDLC: (bool?)TestHelpers.getTestValue(typeof(bool?)), + shortCode: (bool?)TestHelpers.getTestValue(typeof(bool?)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +61,6 @@ public void CapabilitiesInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Voice' /// @@ -64,9 +68,9 @@ public void CapabilitiesInstanceTest() public void VoiceTest() { instance.Voice = false; - Assert.Equal(false, instance.Voice); - + Assert.False(instance.Voice); } + /// /// Test the property 'Sms' /// @@ -74,9 +78,9 @@ public void VoiceTest() public void SmsTest() { instance.Sms = false; - Assert.Equal(false, instance.Sms); - + Assert.False(instance.Sms); } + /// /// Test the property 'TollFree' /// @@ -84,9 +88,9 @@ public void SmsTest() public void TollFreeTest() { instance.TollFree = false; - Assert.Equal(false, instance.TollFree); - + Assert.False(instance.TollFree); } + /// /// Test the property 'TenDLC' /// @@ -94,9 +98,9 @@ public void TollFreeTest() public void TenDLCTest() { instance.TenDLC = false; - Assert.Equal(false, instance.TenDLC); - + Assert.False(instance.TenDLC); } + /// /// Test the property 'ShortCode' /// @@ -104,167 +108,7 @@ public void TenDLCTest() public void ShortCodeTest() { instance.ShortCode = false; - Assert.Equal(false, instance.ShortCode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - Capabilities test1 = new Capabilities(false, false, false, false, false); - test1.Voice = true; - test1.Sms = true; - test1.TollFree = true; - test1.TenDLC = true; - test1.ShortCode = true; - - Capabilities test2 = new Capabilities(false, false, false, false, false); - test2.Voice = true; - test2.Sms = true; - test2.TollFree = true; - test2.TenDLC = true; - test2.ShortCode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - Capabilities test1 = new Capabilities(false, false, false, false, false); - test1.Voice = true; - test1.Sms = true; - test1.TollFree = true; - test1.TenDLC = true; - test1.ShortCode = true; - - Capabilities test2 = new Capabilities(false, false, false, false, false); - test2.Voice = false; - test2.Sms = false; - test2.TollFree = false; - test2.TenDLC = false; - test2.ShortCode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - Capabilities test1 = new Capabilities(false, false, false, false, false); - test1.Voice = true; - test1.Sms = true; - test1.TollFree = true; - test1.TenDLC = true; - test1.ShortCode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - Capabilities test1 = new Capabilities(false, false, false, false, false); - test1.Voice = true; - test1.Sms = true; - test1.TollFree = true; - test1.TenDLC = true; - test1.ShortCode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - Capabilities test1 = new Capabilities(false, false, false, false, false); - test1.Voice = true; - test1.Sms = true; - test1.TollFree = true; - test1.TenDLC = true; - test1.ShortCode = true; - - Capabilities test2 = new Capabilities(false, false, false, false, false); - test2.Voice = true; - test2.Sms = true; - test2.TollFree = true; - test2.TenDLC = true; - test2.ShortCode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - Capabilities test1 = new Capabilities(false, false, false, false, false); - test1.Voice = true; - test1.Sms = true; - test1.TollFree = true; - test1.TenDLC = true; - test1.ShortCode = true; - - Capabilities test2 = new Capabilities(false, false, false, false, false); - test2.Voice = true; - test2.Sms = true; - test2.TollFree = true; - test2.TenDLC = true; - test2.ShortCode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - Capabilities test1 = new Capabilities(false, false, false, false, false); - test1.Voice = true; - test1.Sms = true; - test1.TollFree = true; - test1.TenDLC = true; - test1.ShortCode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - Capabilities test2 = new Capabilities(false, false, false, false, false); - test2.Voice = true; - test2.Sms = true; - test2.TollFree = true; - test2.TenDLC = true; - test2.ShortCode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.False(instance.ShortCode); } } } diff --git a/src/freeclimb.Test/Model/CompletionRequestTests.cs b/src/freeclimb.Test/Model/CompletionRequestTests.cs index d9c8286e..32b0fe32 100644 --- a/src/freeclimb.Test/Model/CompletionRequestTests.cs +++ b/src/freeclimb.Test/Model/CompletionRequestTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,21 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class CompletionRequestTests + + public class CompletionRequestTests : IDisposable { private CompletionRequest instance; public CompletionRequestTests() { - - instance = new CompletionRequest("TEST_STRING"); - + instance = new CompletionRequest( + query: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +57,6 @@ public void CompletionRequestInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Query' /// @@ -65,118 +65,6 @@ public void QueryTest() { instance.Query = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Query); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - CompletionRequest test1 = new CompletionRequest("TEST_STRING"); - test1.Query = "TS"; - - CompletionRequest test2 = new CompletionRequest("TEST_STRING"); - test2.Query = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - CompletionRequest test1 = new CompletionRequest("TEST_STRING"); - test1.Query = "TS"; - - CompletionRequest test2 = new CompletionRequest("TEST_STRING"); - test2.Query = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - CompletionRequest test1 = new CompletionRequest("TEST_STRING"); - test1.Query = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - CompletionRequest test1 = new CompletionRequest("TEST_STRING"); - test1.Query = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - CompletionRequest test1 = new CompletionRequest("TEST_STRING"); - test1.Query = "TS"; - - CompletionRequest test2 = new CompletionRequest("TEST_STRING"); - test2.Query = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - CompletionRequest test1 = new CompletionRequest("TEST_STRING"); - test1.Query = "TS"; - - CompletionRequest test2 = new CompletionRequest("TEST_STRING"); - test2.Query = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - CompletionRequest test1 = new CompletionRequest("TEST_STRING"); - test1.Query = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - CompletionRequest test2 = new CompletionRequest("TEST_STRING"); - test2.Query = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/CompletionResultTests.cs b/src/freeclimb.Test/Model/CompletionResultTests.cs index 52e87560..25b0d353 100644 --- a/src/freeclimb.Test/Model/CompletionResultTests.cs +++ b/src/freeclimb.Test/Model/CompletionResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,23 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class CompletionResultTests + + public class CompletionResultTests : IDisposable { private CompletionResult instance; public CompletionResultTests() { - - instance = new CompletionResult("TEST_STRING", CompletionResult.StatusEnum.SUCCESS); - + instance = new CompletionResult( + response: (string)TestHelpers.getTestValue(typeof(string)), + status: (CompletionResultStatus) + TestHelpers.getTestValue(typeof(CompletionResultStatus)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +59,6 @@ public void CompletionResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Response' /// @@ -65,132 +67,18 @@ public void ResponseTest() { instance.Response = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Response); - } + /// /// Test the property 'Status' /// [Fact] public void StatusTest() { - - instance.Status = CompletionResult.StatusEnum.SUCCESS; - Assert.Equal(instance.Status,CompletionResult.StatusEnum.SUCCESS); - - instance.Status = CompletionResult.StatusEnum.NO_CONTEXT; - Assert.Equal(instance.Status,CompletionResult.StatusEnum.NO_CONTEXT); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - CompletionResult test1 = new CompletionResult("TEST_STRING", CompletionResult.StatusEnum.SUCCESS); - test1.Response = "TS"; - - CompletionResult test2 = new CompletionResult("TEST_STRING", CompletionResult.StatusEnum.SUCCESS); - test2.Response = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - CompletionResult test1 = new CompletionResult("TEST_STRING", CompletionResult.StatusEnum.SUCCESS); - test1.Response = "TS"; - - CompletionResult test2 = new CompletionResult("TEST_STRING", CompletionResult.StatusEnum.SUCCESS); - test2.Response = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - CompletionResult test1 = new CompletionResult("TEST_STRING", CompletionResult.StatusEnum.SUCCESS); - test1.Response = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - CompletionResult test1 = new CompletionResult("TEST_STRING", CompletionResult.StatusEnum.SUCCESS); - test1.Response = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - CompletionResult test1 = new CompletionResult("TEST_STRING", CompletionResult.StatusEnum.SUCCESS); - test1.Response = "TS"; - - CompletionResult test2 = new CompletionResult("TEST_STRING", CompletionResult.StatusEnum.SUCCESS); - test2.Response = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - CompletionResult test1 = new CompletionResult("TEST_STRING", CompletionResult.StatusEnum.SUCCESS); - test1.Response = "TS"; - - CompletionResult test2 = new CompletionResult("TEST_STRING", CompletionResult.StatusEnum.SUCCESS); - test2.Response = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - CompletionResult test1 = new CompletionResult("TEST_STRING", CompletionResult.StatusEnum.SUCCESS); - test1.Response = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - CompletionResult test2 = new CompletionResult("TEST_STRING", CompletionResult.StatusEnum.SUCCESS); - test2.Response = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + instance.Status = CompletionResultStatus.SUCCESS; + Assert.Equal(CompletionResultStatus.SUCCESS, instance.Status); + instance.Status = CompletionResultStatus.NO_CONTEXT; + Assert.Equal(CompletionResultStatus.NO_CONTEXT, instance.Status); } } } diff --git a/src/freeclimb.Test/Model/ConferenceListAllOfTests.cs b/src/freeclimb.Test/Model/ConferenceListAllOfTests.cs deleted file mode 100644 index f23ed55d..00000000 --- a/src/freeclimb.Test/Model/ConferenceListAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing ConferenceListAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ConferenceListAllOfTests - { - private ConferenceListAllOf instance; - - public ConferenceListAllOfTests() - { - - instance = new ConferenceListAllOf(new List()); - - } - - /// - /// Test an instance of ConferenceListAllOf - /// - [Fact] - public void ConferenceListAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Conferences' - /// - [Fact] - public void ConferencesTest() - { - - List testList = new List(); - instance.Conferences = testList; - Assert.Equal(testList, instance.Conferences); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - ConferenceListAllOf test1 = new ConferenceListAllOf(new List()); - List testList = new List(); - test1.Conferences = testList; - - ConferenceListAllOf test2 = new ConferenceListAllOf(new List()); - List testList2 = new List(); - test2.Conferences = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - ConferenceListAllOf test1 = new ConferenceListAllOf(new List()); - List testList = new List(); - test1.Conferences = testList; - - ConferenceListAllOf test2 = new ConferenceListAllOf(new List()); - List testList2 = null; - test2.Conferences = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - ConferenceListAllOf test1 = new ConferenceListAllOf(new List()); - List testList = new List(); - test1.Conferences = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - ConferenceListAllOf test1 = new ConferenceListAllOf(new List()); - List testList = new List(); - test1.Conferences = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - ConferenceListAllOf test1 = new ConferenceListAllOf(new List()); - List testList = new List(); - test1.Conferences = testList; - - ConferenceListAllOf test2 = new ConferenceListAllOf(new List()); - List testList2 = new List(); - test2.Conferences = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - ConferenceListAllOf test1 = new ConferenceListAllOf(new List()); - List testList = new List(); - test1.Conferences = testList; - - ConferenceListAllOf test2 = new ConferenceListAllOf(new List()); - List testList2 = new List(); - test2.Conferences = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - ConferenceListAllOf test1 = new ConferenceListAllOf(new List()); - List testList = new List(); - test1.Conferences = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - ConferenceListAllOf test2 = new ConferenceListAllOf(new List()); - List testList2 = new List(); - test2.Conferences = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/ConferenceListTests.cs b/src/freeclimb.Test/Model/ConferenceListTests.cs index 52f1c6de..91befa87 100644 --- a/src/freeclimb.Test/Model/ConferenceListTests.cs +++ b/src/freeclimb.Test/Model/ConferenceListTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,29 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class ConferenceListTests + + public class ConferenceListTests : IDisposable { private ConferenceList instance; public ConferenceListTests() { - - instance = new ConferenceList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new ConferenceList( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + conferences: (List) + TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +65,66 @@ public void ConferenceListInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +133,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'Conferences' /// [Fact] public void ConferencesTest() { - List testList = new List(); instance.Conferences = testList; - Assert.Equal(testList, instance.Conferences); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - ConferenceList test1 = new ConferenceList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Conferences = testList; - - ConferenceList test2 = new ConferenceList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Conferences = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - ConferenceList test1 = new ConferenceList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Conferences = testList; - - ConferenceList test2 = new ConferenceList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.Conferences = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - ConferenceList test1 = new ConferenceList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Conferences = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - ConferenceList test1 = new ConferenceList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Conferences = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - ConferenceList test1 = new ConferenceList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Conferences = testList; - - ConferenceList test2 = new ConferenceList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Conferences = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - ConferenceList test1 = new ConferenceList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Conferences = testList; - - ConferenceList test2 = new ConferenceList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Conferences = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - ConferenceList test1 = new ConferenceList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Conferences = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - ConferenceList test2 = new ConferenceList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Conferences = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.Conferences, testList); } } } diff --git a/src/freeclimb.Test/Model/ConferenceParticipantListAllOfTests.cs b/src/freeclimb.Test/Model/ConferenceParticipantListAllOfTests.cs deleted file mode 100644 index d325cd8d..00000000 --- a/src/freeclimb.Test/Model/ConferenceParticipantListAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing ConferenceParticipantListAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ConferenceParticipantListAllOfTests - { - private ConferenceParticipantListAllOf instance; - - public ConferenceParticipantListAllOfTests() - { - - instance = new ConferenceParticipantListAllOf(new List()); - - } - - /// - /// Test an instance of ConferenceParticipantListAllOf - /// - [Fact] - public void ConferenceParticipantListAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Participants' - /// - [Fact] - public void ParticipantsTest() - { - - List testList = new List(); - instance.Participants = testList; - Assert.Equal(testList, instance.Participants); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - ConferenceParticipantListAllOf test1 = new ConferenceParticipantListAllOf(new List()); - List testList = new List(); - test1.Participants = testList; - - ConferenceParticipantListAllOf test2 = new ConferenceParticipantListAllOf(new List()); - List testList2 = new List(); - test2.Participants = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - ConferenceParticipantListAllOf test1 = new ConferenceParticipantListAllOf(new List()); - List testList = new List(); - test1.Participants = testList; - - ConferenceParticipantListAllOf test2 = new ConferenceParticipantListAllOf(new List()); - List testList2 = null; - test2.Participants = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - ConferenceParticipantListAllOf test1 = new ConferenceParticipantListAllOf(new List()); - List testList = new List(); - test1.Participants = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - ConferenceParticipantListAllOf test1 = new ConferenceParticipantListAllOf(new List()); - List testList = new List(); - test1.Participants = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - ConferenceParticipantListAllOf test1 = new ConferenceParticipantListAllOf(new List()); - List testList = new List(); - test1.Participants = testList; - - ConferenceParticipantListAllOf test2 = new ConferenceParticipantListAllOf(new List()); - List testList2 = new List(); - test2.Participants = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - ConferenceParticipantListAllOf test1 = new ConferenceParticipantListAllOf(new List()); - List testList = new List(); - test1.Participants = testList; - - ConferenceParticipantListAllOf test2 = new ConferenceParticipantListAllOf(new List()); - List testList2 = new List(); - test2.Participants = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - ConferenceParticipantListAllOf test1 = new ConferenceParticipantListAllOf(new List()); - List testList = new List(); - test1.Participants = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - ConferenceParticipantListAllOf test2 = new ConferenceParticipantListAllOf(new List()); - List testList2 = new List(); - test2.Participants = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/ConferenceParticipantListTests.cs b/src/freeclimb.Test/Model/ConferenceParticipantListTests.cs index a17ce09a..1a9f85d7 100644 --- a/src/freeclimb.Test/Model/ConferenceParticipantListTests.cs +++ b/src/freeclimb.Test/Model/ConferenceParticipantListTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,29 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class ConferenceParticipantListTests + + public class ConferenceParticipantListTests : IDisposable { private ConferenceParticipantList instance; public ConferenceParticipantListTests() { - - instance = new ConferenceParticipantList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new ConferenceParticipantList( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + participants: (List) + TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +65,66 @@ public void ConferenceParticipantListInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +133,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'Participants' /// [Fact] public void ParticipantsTest() { - List testList = new List(); instance.Participants = testList; - Assert.Equal(testList, instance.Participants); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - ConferenceParticipantList test1 = new ConferenceParticipantList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Participants = testList; - - ConferenceParticipantList test2 = new ConferenceParticipantList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Participants = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - ConferenceParticipantList test1 = new ConferenceParticipantList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Participants = testList; - - ConferenceParticipantList test2 = new ConferenceParticipantList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.Participants = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - ConferenceParticipantList test1 = new ConferenceParticipantList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Participants = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - ConferenceParticipantList test1 = new ConferenceParticipantList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Participants = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - ConferenceParticipantList test1 = new ConferenceParticipantList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Participants = testList; - - ConferenceParticipantList test2 = new ConferenceParticipantList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Participants = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - ConferenceParticipantList test1 = new ConferenceParticipantList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Participants = testList; - - ConferenceParticipantList test2 = new ConferenceParticipantList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Participants = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - ConferenceParticipantList test1 = new ConferenceParticipantList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Participants = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - ConferenceParticipantList test2 = new ConferenceParticipantList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Participants = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.Participants, testList); } } } diff --git a/src/freeclimb.Test/Model/ConferenceParticipantResultAllOfTests.cs b/src/freeclimb.Test/Model/ConferenceParticipantResultAllOfTests.cs deleted file mode 100644 index 44eeaf86..00000000 --- a/src/freeclimb.Test/Model/ConferenceParticipantResultAllOfTests.cs +++ /dev/null @@ -1,314 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing ConferenceParticipantResultAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ConferenceParticipantResultAllOfTests - { - private ConferenceParticipantResultAllOf instance; - - public ConferenceParticipantResultAllOfTests() - { - - instance = new ConferenceParticipantResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - - } - - /// - /// Test an instance of ConferenceParticipantResultAllOf - /// - [Fact] - public void ConferenceParticipantResultAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'AccountId' - /// - [Fact] - public void AccountIdTest() - { - instance.AccountId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.AccountId); - - } - /// - /// Test the property 'ConferenceId' - /// - [Fact] - public void ConferenceIdTest() - { - instance.ConferenceId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ConferenceId); - - } - /// - /// Test the property 'CallId' - /// - [Fact] - public void CallIdTest() - { - instance.CallId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.CallId); - - } - /// - /// Test the property 'Talk' - /// - [Fact] - public void TalkTest() - { - instance.Talk = false; - Assert.Equal(false, instance.Talk); - - } - /// - /// Test the property 'Listen' - /// - [Fact] - public void ListenTest() - { - instance.Listen = false; - Assert.Equal(false, instance.Listen); - - } - /// - /// Test the property 'DtmfPassThrough' - /// - [Fact] - public void DtmfPassThroughTest() - { - instance.DtmfPassThrough = false; - Assert.Equal(false, instance.DtmfPassThrough); - - } - /// - /// Test the property 'StartConfOnEnter' - /// - [Fact] - public void StartConfOnEnterTest() - { - instance.StartConfOnEnter = false; - Assert.Equal(false, instance.StartConfOnEnter); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - ConferenceParticipantResultAllOf test1 = new ConferenceParticipantResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test1.AccountId = "TS"; - test1.ConferenceId = "TS"; - test1.CallId = "TS"; - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - test1.StartConfOnEnter = true; - - ConferenceParticipantResultAllOf test2 = new ConferenceParticipantResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test2.AccountId = "TS"; - test2.ConferenceId = "TS"; - test2.CallId = "TS"; - test2.Talk = true; - test2.Listen = true; - test2.DtmfPassThrough = true; - test2.StartConfOnEnter = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - ConferenceParticipantResultAllOf test1 = new ConferenceParticipantResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test1.AccountId = "TS"; - test1.ConferenceId = "TS"; - test1.CallId = "TS"; - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - test1.StartConfOnEnter = true; - - ConferenceParticipantResultAllOf test2 = new ConferenceParticipantResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test2.AccountId = "ts"; - test2.ConferenceId = "ts"; - test2.CallId = "ts"; - test2.Talk = false; - test2.Listen = false; - test2.DtmfPassThrough = false; - test2.StartConfOnEnter = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - ConferenceParticipantResultAllOf test1 = new ConferenceParticipantResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test1.AccountId = "TS"; - test1.ConferenceId = "TS"; - test1.CallId = "TS"; - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - test1.StartConfOnEnter = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - ConferenceParticipantResultAllOf test1 = new ConferenceParticipantResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test1.AccountId = "TS"; - test1.ConferenceId = "TS"; - test1.CallId = "TS"; - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - test1.StartConfOnEnter = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - ConferenceParticipantResultAllOf test1 = new ConferenceParticipantResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test1.AccountId = "TS"; - test1.ConferenceId = "TS"; - test1.CallId = "TS"; - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - test1.StartConfOnEnter = true; - - ConferenceParticipantResultAllOf test2 = new ConferenceParticipantResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test2.AccountId = "TS"; - test2.ConferenceId = "TS"; - test2.CallId = "TS"; - test2.Talk = true; - test2.Listen = true; - test2.DtmfPassThrough = true; - test2.StartConfOnEnter = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - ConferenceParticipantResultAllOf test1 = new ConferenceParticipantResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test1.AccountId = "TS"; - test1.ConferenceId = "TS"; - test1.CallId = "TS"; - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - test1.StartConfOnEnter = true; - - ConferenceParticipantResultAllOf test2 = new ConferenceParticipantResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test2.AccountId = "TS"; - test2.ConferenceId = "TS"; - test2.CallId = "TS"; - test2.Talk = true; - test2.Listen = true; - test2.DtmfPassThrough = true; - test2.StartConfOnEnter = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - ConferenceParticipantResultAllOf test1 = new ConferenceParticipantResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test1.AccountId = "TS"; - test1.ConferenceId = "TS"; - test1.CallId = "TS"; - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - test1.StartConfOnEnter = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - ConferenceParticipantResultAllOf test2 = new ConferenceParticipantResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test2.AccountId = "TS"; - test2.ConferenceId = "TS"; - test2.CallId = "TS"; - test2.Talk = true; - test2.Listen = true; - test2.DtmfPassThrough = true; - test2.StartConfOnEnter = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/ConferenceParticipantResultTests.cs b/src/freeclimb.Test/Model/ConferenceParticipantResultTests.cs index eee3949c..7fe4c9dd 100644 --- a/src/freeclimb.Test/Model/ConferenceParticipantResultTests.cs +++ b/src/freeclimb.Test/Model/ConferenceParticipantResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,31 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class ConferenceParticipantResultTests + + public class ConferenceParticipantResultTests : IDisposable { private ConferenceParticipantResult instance; public ConferenceParticipantResultTests() { - - instance = new ConferenceParticipantResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - + instance = new ConferenceParticipantResult( + uri: (string)TestHelpers.getTestValue(typeof(string)), + dateCreated: (string)TestHelpers.getTestValue(typeof(string)), + dateUpdated: (string)TestHelpers.getTestValue(typeof(string)), + revision: (int)TestHelpers.getTestValue(typeof(int)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + talk: (bool?)TestHelpers.getTestValue(typeof(bool?)), + listen: (bool?)TestHelpers.getTestValue(typeof(bool?)), + dtmfPassThrough: (bool?)TestHelpers.getTestValue(typeof(bool?)), + startConfOnEnter: (bool?)TestHelpers.getTestValue(typeof(bool?)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +67,6 @@ public void ConferenceParticipantResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Uri' /// @@ -65,8 +75,8 @@ public void UriTest() { instance.Uri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Uri); - } + /// /// Test the property 'DateCreated' /// @@ -75,8 +85,8 @@ public void DateCreatedTest() { instance.DateCreated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateCreated); - } + /// /// Test the property 'DateUpdated' /// @@ -85,18 +95,18 @@ public void DateUpdatedTest() { instance.DateUpdated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateUpdated); - } + /// /// Test the property 'Revision' /// [Fact] public void RevisionTest() { - instance.Revision = 1; - Assert.Equal(1, (int) instance.Revision); + Assert.Equal(1, (int)instance.Revision); } + /// /// Test the property 'AccountId' /// @@ -105,8 +115,8 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } + /// /// Test the property 'ConferenceId' /// @@ -115,8 +125,8 @@ public void ConferenceIdTest() { instance.ConferenceId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ConferenceId); - } + /// /// Test the property 'CallId' /// @@ -125,8 +135,8 @@ public void CallIdTest() { instance.CallId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CallId); - } + /// /// Test the property 'Talk' /// @@ -134,9 +144,9 @@ public void CallIdTest() public void TalkTest() { instance.Talk = false; - Assert.Equal(false, instance.Talk); - + Assert.False(instance.Talk); } + /// /// Test the property 'Listen' /// @@ -144,9 +154,9 @@ public void TalkTest() public void ListenTest() { instance.Listen = false; - Assert.Equal(false, instance.Listen); - + Assert.False(instance.Listen); } + /// /// Test the property 'DtmfPassThrough' /// @@ -154,9 +164,9 @@ public void ListenTest() public void DtmfPassThroughTest() { instance.DtmfPassThrough = false; - Assert.Equal(false, instance.DtmfPassThrough); - + Assert.False(instance.DtmfPassThrough); } + /// /// Test the property 'StartConfOnEnter' /// @@ -164,239 +174,7 @@ public void DtmfPassThroughTest() public void StartConfOnEnterTest() { instance.StartConfOnEnter = false; - Assert.Equal(false, instance.StartConfOnEnter); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - ConferenceParticipantResult test1 = new ConferenceParticipantResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ConferenceId = "TS"; - test1.CallId = "TS"; - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - test1.StartConfOnEnter = true; - - ConferenceParticipantResult test2 = new ConferenceParticipantResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.ConferenceId = "TS"; - test2.CallId = "TS"; - test2.Talk = true; - test2.Listen = true; - test2.DtmfPassThrough = true; - test2.StartConfOnEnter = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - ConferenceParticipantResult test1 = new ConferenceParticipantResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ConferenceId = "TS"; - test1.CallId = "TS"; - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - test1.StartConfOnEnter = true; - - ConferenceParticipantResult test2 = new ConferenceParticipantResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test2.Uri = "ts"; - test2.DateCreated = "ts"; - test2.DateUpdated = "ts"; - test2.Revision = 2; - test2.AccountId = "ts"; - test2.ConferenceId = "ts"; - test2.CallId = "ts"; - test2.Talk = false; - test2.Listen = false; - test2.DtmfPassThrough = false; - test2.StartConfOnEnter = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - ConferenceParticipantResult test1 = new ConferenceParticipantResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ConferenceId = "TS"; - test1.CallId = "TS"; - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - test1.StartConfOnEnter = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - ConferenceParticipantResult test1 = new ConferenceParticipantResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ConferenceId = "TS"; - test1.CallId = "TS"; - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - test1.StartConfOnEnter = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - ConferenceParticipantResult test1 = new ConferenceParticipantResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ConferenceId = "TS"; - test1.CallId = "TS"; - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - test1.StartConfOnEnter = true; - - ConferenceParticipantResult test2 = new ConferenceParticipantResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.ConferenceId = "TS"; - test2.CallId = "TS"; - test2.Talk = true; - test2.Listen = true; - test2.DtmfPassThrough = true; - test2.StartConfOnEnter = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - ConferenceParticipantResult test1 = new ConferenceParticipantResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ConferenceId = "TS"; - test1.CallId = "TS"; - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - test1.StartConfOnEnter = true; - - ConferenceParticipantResult test2 = new ConferenceParticipantResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.ConferenceId = "TS"; - test2.CallId = "TS"; - test2.Talk = true; - test2.Listen = true; - test2.DtmfPassThrough = true; - test2.StartConfOnEnter = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - ConferenceParticipantResult test1 = new ConferenceParticipantResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.ConferenceId = "TS"; - test1.CallId = "TS"; - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - test1.StartConfOnEnter = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - ConferenceParticipantResult test2 = new ConferenceParticipantResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.ConferenceId = "TS"; - test2.CallId = "TS"; - test2.Talk = true; - test2.Listen = true; - test2.DtmfPassThrough = true; - test2.StartConfOnEnter = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.False(instance.StartConfOnEnter); } } } diff --git a/src/freeclimb.Test/Model/ConferenceRecordingStatusWebhookTests.cs b/src/freeclimb.Test/Model/ConferenceRecordingStatusWebhookTests.cs new file mode 100644 index 00000000..047ed07b --- /dev/null +++ b/src/freeclimb.Test/Model/ConferenceRecordingStatusWebhookTests.cs @@ -0,0 +1,232 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing ConferenceRecordingStatusWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class ConferenceRecordingStatusWebhookTests : IDisposable + { + private ConferenceRecordingStatusWebhook instance; + + public ConferenceRecordingStatusWebhookTests() + { + instance = new ConferenceRecordingStatusWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + status: (ConferenceStatus)TestHelpers.getTestValue(typeof(ConferenceStatus)), + recordingUrl: (string)TestHelpers.getTestValue(typeof(string)), + recordingId: (string)TestHelpers.getTestValue(typeof(string)), + recordingDurationSec: (int)TestHelpers.getTestValue(typeof(int)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ConferenceRecordingStatusWebhook + /// + [Fact] + public void ConferenceRecordingStatusWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'Status' + /// + [Fact] + public void StatusTest() + { + instance.Status = ConferenceStatus.EMPTY; + Assert.Equal(ConferenceStatus.EMPTY, instance.Status); + instance.Status = ConferenceStatus.POPULATED; + Assert.Equal(ConferenceStatus.POPULATED, instance.Status); + instance.Status = ConferenceStatus.IN_PROGRESS; + Assert.Equal(ConferenceStatus.IN_PROGRESS, instance.Status); + instance.Status = ConferenceStatus.TERMINATED; + Assert.Equal(ConferenceStatus.TERMINATED, instance.Status); + } + + /// + /// Test the property 'RecordingUrl' + /// + [Fact] + public void RecordingUrlTest() + { + instance.RecordingUrl = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingUrl); + } + + /// + /// Test the property 'RecordingId' + /// + [Fact] + public void RecordingIdTest() + { + instance.RecordingId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingId); + } + + /// + /// Test the property 'RecordingDurationSec' + /// + [Fact] + public void RecordingDurationSecTest() + { + instance.RecordingDurationSec = 1; + Assert.Equal(1, (int)instance.RecordingDurationSec); + } + + [Fact] + public void TestDeserializeJsonToConferenceRecordingStatusWebhook() + { + string payload = @"{ ""requestType"": ""conferenceRecordingStatus"" }"; + ConferenceRecordingStatusWebhook deserialized = + ConferenceRecordingStatusWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("conferenceRecordingStatus", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/ConferenceResultAllOfTests.cs b/src/freeclimb.Test/Model/ConferenceResultAllOfTests.cs deleted file mode 100644 index 2a71e659..00000000 --- a/src/freeclimb.Test/Model/ConferenceResultAllOfTests.cs +++ /dev/null @@ -1,405 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing ConferenceResultAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ConferenceResultAllOfTests - { - private ConferenceResultAllOf instance; - - public ConferenceResultAllOfTests() - { - - instance = new ConferenceResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - - } - - /// - /// Test an instance of ConferenceResultAllOf - /// - [Fact] - public void ConferenceResultAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'ConferenceId' - /// - [Fact] - public void ConferenceIdTest() - { - instance.ConferenceId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ConferenceId); - - } - /// - /// Test the property 'AccountId' - /// - [Fact] - public void AccountIdTest() - { - instance.AccountId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.AccountId); - - } - /// - /// Test the property 'Alias' - /// - [Fact] - public void AliasTest() - { - instance.Alias = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Alias); - - } - /// - /// Test the property 'PlayBeep' - /// - [Fact] - public void PlayBeepTest() - { - instance.PlayBeep = PlayBeep.ALWAYS; - Assert.Equal(instance.PlayBeep,PlayBeep.ALWAYS); - instance.PlayBeep = PlayBeep.NEVER; - Assert.Equal(instance.PlayBeep,PlayBeep.NEVER); - instance.PlayBeep = PlayBeep.ENTRY_ONLY; - Assert.Equal(instance.PlayBeep,PlayBeep.ENTRY_ONLY); - instance.PlayBeep = PlayBeep.EXIT_ONLY; - Assert.Equal(instance.PlayBeep,PlayBeep.EXIT_ONLY); - - } - /// - /// Test the property 'Record' - /// - [Fact] - public void RecordTest() - { - instance.Record = false; - Assert.Equal(false, instance.Record); - - } - /// - /// Test the property 'Status' - /// - [Fact] - public void StatusTest() - { - instance.Status = ConferenceStatus.EMPTY; - Assert.Equal(instance.Status,ConferenceStatus.EMPTY); - instance.Status = ConferenceStatus.POPULATED; - Assert.Equal(instance.Status,ConferenceStatus.POPULATED); - instance.Status = ConferenceStatus.IN_PROGRESS; - Assert.Equal(instance.Status,ConferenceStatus.IN_PROGRESS); - instance.Status = ConferenceStatus.TERMINATED; - Assert.Equal(instance.Status,ConferenceStatus.TERMINATED); - - } - /// - /// Test the property 'WaitUrl' - /// - [Fact] - public void WaitUrlTest() - { - instance.WaitUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.WaitUrl); - - } - /// - /// Test the property 'ActionUrl' - /// - [Fact] - public void ActionUrlTest() - { - instance.ActionUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ActionUrl); - - } - /// - /// Test the property 'StatusCallbackUrl' - /// - [Fact] - public void StatusCallbackUrlTest() - { - instance.StatusCallbackUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.StatusCallbackUrl); - - } - /// - /// Test the property 'SubresourceUris' - /// - [Fact] - public void SubresourceUrisTest() - { - object testObject = new object(); - instance.SubresourceUris = testObject; - Assert.Equal(testObject, instance.SubresourceUris); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - ConferenceResultAllOf test1 = new ConferenceResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.ConferenceId = "TS"; - test1.AccountId = "TS"; - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.Status = ConferenceStatus.EMPTY; - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - object testObject = new object(); - test1.SubresourceUris = testObject; - - ConferenceResultAllOf test2 = new ConferenceResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.ConferenceId = "TS"; - test2.AccountId = "TS"; - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.Status = ConferenceStatus.EMPTY; - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - ConferenceResultAllOf test1 = new ConferenceResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.ConferenceId = "TS"; - test1.AccountId = "TS"; - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.Status = ConferenceStatus.EMPTY; - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - object testObject = new object(); - test1.SubresourceUris = testObject; - - ConferenceResultAllOf test2 = new ConferenceResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.ConferenceId = "ts"; - test2.AccountId = "ts"; - test2.Alias = "ts"; - test2.PlayBeep = PlayBeep.NEVER; - test2.Record = false; - test2.Status = ConferenceStatus.POPULATED; - test2.WaitUrl = "ts"; - test2.ActionUrl = "ts"; - test2.StatusCallbackUrl = "ts"; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - ConferenceResultAllOf test1 = new ConferenceResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.ConferenceId = "TS"; - test1.AccountId = "TS"; - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.Status = ConferenceStatus.EMPTY; - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - object testObject = new object(); - test1.SubresourceUris = testObject; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - ConferenceResultAllOf test1 = new ConferenceResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.ConferenceId = "TS"; - test1.AccountId = "TS"; - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.Status = ConferenceStatus.EMPTY; - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - object testObject = new object(); - test1.SubresourceUris = testObject; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - ConferenceResultAllOf test1 = new ConferenceResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.ConferenceId = "TS"; - test1.AccountId = "TS"; - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.Status = ConferenceStatus.EMPTY; - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - object testObject = new object(); - test1.SubresourceUris = testObject; - - ConferenceResultAllOf test2 = new ConferenceResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.ConferenceId = "TS"; - test2.AccountId = "TS"; - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.Status = ConferenceStatus.EMPTY; - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - ConferenceResultAllOf test1 = new ConferenceResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.ConferenceId = "TS"; - test1.AccountId = "TS"; - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.Status = ConferenceStatus.EMPTY; - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - object testObject = new object(); - test1.SubresourceUris = testObject; - - ConferenceResultAllOf test2 = new ConferenceResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.ConferenceId = "TS"; - test2.AccountId = "TS"; - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.Status = ConferenceStatus.EMPTY; - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - ConferenceResultAllOf test1 = new ConferenceResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.ConferenceId = "TS"; - test1.AccountId = "TS"; - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.Status = ConferenceStatus.EMPTY; - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - object testObject = new object(); - test1.SubresourceUris = testObject; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - ConferenceResultAllOf test2 = new ConferenceResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.ConferenceId = "TS"; - test2.AccountId = "TS"; - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.Status = ConferenceStatus.EMPTY; - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/ConferenceResultTests.cs b/src/freeclimb.Test/Model/ConferenceResultTests.cs index 6b523c80..c14cd9c5 100644 --- a/src/freeclimb.Test/Model/ConferenceResultTests.cs +++ b/src/freeclimb.Test/Model/ConferenceResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,34 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class ConferenceResultTests + + public class ConferenceResultTests : IDisposable { private ConferenceResult instance; public ConferenceResultTests() { - - instance = new ConferenceResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - + instance = new ConferenceResult( + uri: (string)TestHelpers.getTestValue(typeof(string)), + dateCreated: (string)TestHelpers.getTestValue(typeof(string)), + dateUpdated: (string)TestHelpers.getTestValue(typeof(string)), + revision: (int)TestHelpers.getTestValue(typeof(int)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + alias: (string)TestHelpers.getTestValue(typeof(string)), + playBeep: (PlayBeep)TestHelpers.getTestValue(typeof(PlayBeep)), + record: (bool?)TestHelpers.getTestValue(typeof(bool?)), + status: (ConferenceStatus)TestHelpers.getTestValue(typeof(ConferenceStatus)), + waitUrl: (string)TestHelpers.getTestValue(typeof(string)), + actionUrl: (string)TestHelpers.getTestValue(typeof(string)), + statusCallbackUrl: (string)TestHelpers.getTestValue(typeof(string)), + subresourceUris: (Object)TestHelpers.getTestValue(typeof(Object)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +70,6 @@ public void ConferenceResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Uri' /// @@ -65,8 +78,8 @@ public void UriTest() { instance.Uri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Uri); - } + /// /// Test the property 'DateCreated' /// @@ -75,8 +88,8 @@ public void DateCreatedTest() { instance.DateCreated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateCreated); - } + /// /// Test the property 'DateUpdated' /// @@ -85,18 +98,18 @@ public void DateUpdatedTest() { instance.DateUpdated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateUpdated); - } + /// /// Test the property 'Revision' /// [Fact] public void RevisionTest() { - instance.Revision = 1; - Assert.Equal(1, (int) instance.Revision); + Assert.Equal(1, (int)instance.Revision); } + /// /// Test the property 'ConferenceId' /// @@ -105,8 +118,8 @@ public void ConferenceIdTest() { instance.ConferenceId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ConferenceId); - } + /// /// Test the property 'AccountId' /// @@ -115,8 +128,8 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } + /// /// Test the property 'Alias' /// @@ -125,8 +138,8 @@ public void AliasTest() { instance.Alias = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Alias); - } + /// /// Test the property 'PlayBeep' /// @@ -134,15 +147,15 @@ public void AliasTest() public void PlayBeepTest() { instance.PlayBeep = PlayBeep.ALWAYS; - Assert.Equal(instance.PlayBeep,PlayBeep.ALWAYS); + Assert.Equal(PlayBeep.ALWAYS, instance.PlayBeep); instance.PlayBeep = PlayBeep.NEVER; - Assert.Equal(instance.PlayBeep,PlayBeep.NEVER); + Assert.Equal(PlayBeep.NEVER, instance.PlayBeep); instance.PlayBeep = PlayBeep.ENTRY_ONLY; - Assert.Equal(instance.PlayBeep,PlayBeep.ENTRY_ONLY); + Assert.Equal(PlayBeep.ENTRY_ONLY, instance.PlayBeep); instance.PlayBeep = PlayBeep.EXIT_ONLY; - Assert.Equal(instance.PlayBeep,PlayBeep.EXIT_ONLY); - + Assert.Equal(PlayBeep.EXIT_ONLY, instance.PlayBeep); } + /// /// Test the property 'Record' /// @@ -150,9 +163,9 @@ public void PlayBeepTest() public void RecordTest() { instance.Record = false; - Assert.Equal(false, instance.Record); - + Assert.False(instance.Record); } + /// /// Test the property 'Status' /// @@ -160,15 +173,15 @@ public void RecordTest() public void StatusTest() { instance.Status = ConferenceStatus.EMPTY; - Assert.Equal(instance.Status,ConferenceStatus.EMPTY); + Assert.Equal(ConferenceStatus.EMPTY, instance.Status); instance.Status = ConferenceStatus.POPULATED; - Assert.Equal(instance.Status,ConferenceStatus.POPULATED); + Assert.Equal(ConferenceStatus.POPULATED, instance.Status); instance.Status = ConferenceStatus.IN_PROGRESS; - Assert.Equal(instance.Status,ConferenceStatus.IN_PROGRESS); + Assert.Equal(ConferenceStatus.IN_PROGRESS, instance.Status); instance.Status = ConferenceStatus.TERMINATED; - Assert.Equal(instance.Status,ConferenceStatus.TERMINATED); - + Assert.Equal(ConferenceStatus.TERMINATED, instance.Status); } + /// /// Test the property 'WaitUrl' /// @@ -177,8 +190,8 @@ public void WaitUrlTest() { instance.WaitUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.WaitUrl); - } + /// /// Test the property 'ActionUrl' /// @@ -187,8 +200,8 @@ public void ActionUrlTest() { instance.ActionUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ActionUrl); - } + /// /// Test the property 'StatusCallbackUrl' /// @@ -197,8 +210,8 @@ public void StatusCallbackUrlTest() { instance.StatusCallbackUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.StatusCallbackUrl); - } + /// /// Test the property 'SubresourceUris' /// @@ -208,286 +221,6 @@ public void SubresourceUrisTest() object testObject = new object(); instance.SubresourceUris = testObject; Assert.Equal(testObject, instance.SubresourceUris); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - ConferenceResult test1 = new ConferenceResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.ConferenceId = "TS"; - test1.AccountId = "TS"; - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.Status = ConferenceStatus.EMPTY; - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - object testObject = new object(); - test1.SubresourceUris = testObject; - - ConferenceResult test2 = new ConferenceResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.ConferenceId = "TS"; - test2.AccountId = "TS"; - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.Status = ConferenceStatus.EMPTY; - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - ConferenceResult test1 = new ConferenceResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.ConferenceId = "TS"; - test1.AccountId = "TS"; - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.Status = ConferenceStatus.EMPTY; - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - object testObject = new object(); - test1.SubresourceUris = testObject; - - ConferenceResult test2 = new ConferenceResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.Uri = "ts"; - test2.DateCreated = "ts"; - test2.DateUpdated = "ts"; - test2.Revision = 2; - test2.ConferenceId = "ts"; - test2.AccountId = "ts"; - test2.Alias = "ts"; - test2.PlayBeep = PlayBeep.NEVER; - test2.Record = false; - test2.Status = ConferenceStatus.POPULATED; - test2.WaitUrl = "ts"; - test2.ActionUrl = "ts"; - test2.StatusCallbackUrl = "ts"; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - ConferenceResult test1 = new ConferenceResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.ConferenceId = "TS"; - test1.AccountId = "TS"; - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.Status = ConferenceStatus.EMPTY; - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - object testObject = new object(); - test1.SubresourceUris = testObject; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - ConferenceResult test1 = new ConferenceResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.ConferenceId = "TS"; - test1.AccountId = "TS"; - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.Status = ConferenceStatus.EMPTY; - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - object testObject = new object(); - test1.SubresourceUris = testObject; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - ConferenceResult test1 = new ConferenceResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.ConferenceId = "TS"; - test1.AccountId = "TS"; - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.Status = ConferenceStatus.EMPTY; - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - object testObject = new object(); - test1.SubresourceUris = testObject; - - ConferenceResult test2 = new ConferenceResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.ConferenceId = "TS"; - test2.AccountId = "TS"; - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.Status = ConferenceStatus.EMPTY; - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - ConferenceResult test1 = new ConferenceResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.ConferenceId = "TS"; - test1.AccountId = "TS"; - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.Status = ConferenceStatus.EMPTY; - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - object testObject = new object(); - test1.SubresourceUris = testObject; - - ConferenceResult test2 = new ConferenceResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.ConferenceId = "TS"; - test2.AccountId = "TS"; - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.Status = ConferenceStatus.EMPTY; - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - ConferenceResult test1 = new ConferenceResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.ConferenceId = "TS"; - test1.AccountId = "TS"; - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.Status = ConferenceStatus.EMPTY; - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - object testObject = new object(); - test1.SubresourceUris = testObject; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - ConferenceResult test2 = new ConferenceResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", PlayBeep.ALWAYS, false, ConferenceStatus.EMPTY, "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.ConferenceId = "TS"; - test2.AccountId = "TS"; - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.Status = ConferenceStatus.EMPTY; - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/ConferenceStatusWebhookTests.cs b/src/freeclimb.Test/Model/ConferenceStatusWebhookTests.cs new file mode 100644 index 00000000..c1e21e06 --- /dev/null +++ b/src/freeclimb.Test/Model/ConferenceStatusWebhookTests.cs @@ -0,0 +1,231 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing ConferenceStatusWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class ConferenceStatusWebhookTests : IDisposable + { + private ConferenceStatusWebhook instance; + + public ConferenceStatusWebhookTests() + { + instance = new ConferenceStatusWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + status: (ConferenceStatus)TestHelpers.getTestValue(typeof(ConferenceStatus)), + recordingUrl: (string)TestHelpers.getTestValue(typeof(string)), + recordingId: (string)TestHelpers.getTestValue(typeof(string)), + recordingDurationSec: (int?)TestHelpers.getTestValue(typeof(int?)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ConferenceStatusWebhook + /// + [Fact] + public void ConferenceStatusWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'Status' + /// + [Fact] + public void StatusTest() + { + instance.Status = ConferenceStatus.EMPTY; + Assert.Equal(ConferenceStatus.EMPTY, instance.Status); + instance.Status = ConferenceStatus.POPULATED; + Assert.Equal(ConferenceStatus.POPULATED, instance.Status); + instance.Status = ConferenceStatus.IN_PROGRESS; + Assert.Equal(ConferenceStatus.IN_PROGRESS, instance.Status); + instance.Status = ConferenceStatus.TERMINATED; + Assert.Equal(ConferenceStatus.TERMINATED, instance.Status); + } + + /// + /// Test the property 'RecordingUrl' + /// + [Fact] + public void RecordingUrlTest() + { + instance.RecordingUrl = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingUrl); + } + + /// + /// Test the property 'RecordingId' + /// + [Fact] + public void RecordingIdTest() + { + instance.RecordingId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingId); + } + + /// + /// Test the property 'RecordingDurationSec' + /// + [Fact] + public void RecordingDurationSecTest() + { + instance.RecordingDurationSec = 1; + Assert.Equal(1, (int)instance.RecordingDurationSec); + } + + [Fact] + public void TestDeserializeJsonToConferenceStatusWebhook() + { + string payload = @"{ ""requestType"": ""conferenceStatus"" }"; + ConferenceStatusWebhook deserialized = ConferenceStatusWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("conferenceStatus", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/CreateConferenceAllOfTests.cs b/src/freeclimb.Test/Model/CreateConferenceAllOfTests.cs deleted file mode 100644 index 9299da04..00000000 --- a/src/freeclimb.Test/Model/CreateConferenceAllOfTests.cs +++ /dev/null @@ -1,298 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing CreateConferenceAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CreateConferenceAllOfTests - { - private CreateConferenceAllOf instance; - - public CreateConferenceAllOfTests() - { - - instance = new CreateConferenceAllOf("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - - } - - /// - /// Test an instance of CreateConferenceAllOf - /// - [Fact] - public void CreateConferenceAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'ActionUrl' - /// - [Fact] - public void ActionUrlTest() - { - - instance.ActionUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ActionUrl); - } - /// - /// Test the property 'Alias' - /// - [Fact] - public void AliasTest() - { - instance.Alias = false; - Assert.Equal(false, instance.Alias); - - } - /// - /// Test the property 'PlayBeep' - /// - [Fact] - public void PlayBeepTest() - { - instance.PlayBeep = PlayBeep.ALWAYS; - Assert.Equal(instance.PlayBeep,PlayBeep.ALWAYS); - instance.PlayBeep = PlayBeep.NEVER; - Assert.Equal(instance.PlayBeep,PlayBeep.NEVER); - instance.PlayBeep = PlayBeep.ENTRY_ONLY; - Assert.Equal(instance.PlayBeep,PlayBeep.ENTRY_ONLY); - instance.PlayBeep = PlayBeep.EXIT_ONLY; - Assert.Equal(instance.PlayBeep,PlayBeep.EXIT_ONLY); - - } - /// - /// Test the property 'Record' - /// - [Fact] - public void RecordTest() - { - instance.Record = false; - Assert.Equal(false, instance.Record); - - } - /// - /// Test the property 'StatusCallbackUrl' - /// - [Fact] - public void StatusCallbackUrlTest() - { - instance.StatusCallbackUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.StatusCallbackUrl); - - } - /// - /// Test the property 'WaitUrl' - /// - [Fact] - public void WaitUrlTest() - { - instance.WaitUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.WaitUrl); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - CreateConferenceAllOf test1 = new CreateConferenceAllOf("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.Alias = true; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.StatusCallbackUrl = "TS"; - test1.WaitUrl = "TS"; - - CreateConferenceAllOf test2 = new CreateConferenceAllOf("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.Alias = true; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.StatusCallbackUrl = "TS"; - test2.WaitUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - CreateConferenceAllOf test1 = new CreateConferenceAllOf("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.Alias = true; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.StatusCallbackUrl = "TS"; - test1.WaitUrl = "TS"; - - CreateConferenceAllOf test2 = new CreateConferenceAllOf("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "ts"; - test2.Alias = false; - test2.PlayBeep = PlayBeep.NEVER; - test2.Record = false; - test2.StatusCallbackUrl = "ts"; - test2.WaitUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - CreateConferenceAllOf test1 = new CreateConferenceAllOf("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.Alias = true; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.StatusCallbackUrl = "TS"; - test1.WaitUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - CreateConferenceAllOf test1 = new CreateConferenceAllOf("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.Alias = true; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.StatusCallbackUrl = "TS"; - test1.WaitUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - CreateConferenceAllOf test1 = new CreateConferenceAllOf("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.Alias = true; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.StatusCallbackUrl = "TS"; - test1.WaitUrl = "TS"; - - CreateConferenceAllOf test2 = new CreateConferenceAllOf("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.Alias = true; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.StatusCallbackUrl = "TS"; - test2.WaitUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - CreateConferenceAllOf test1 = new CreateConferenceAllOf("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.Alias = true; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.StatusCallbackUrl = "TS"; - test1.WaitUrl = "TS"; - - CreateConferenceAllOf test2 = new CreateConferenceAllOf("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.Alias = true; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.StatusCallbackUrl = "TS"; - test2.WaitUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - CreateConferenceAllOf test1 = new CreateConferenceAllOf("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.Alias = true; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.StatusCallbackUrl = "TS"; - test1.WaitUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - CreateConferenceAllOf test2 = new CreateConferenceAllOf("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.Alias = true; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.StatusCallbackUrl = "TS"; - test2.WaitUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/CreateConferenceRequestTests.cs b/src/freeclimb.Test/Model/CreateConferenceRequestTests.cs index ae4d1c43..1aead69c 100644 --- a/src/freeclimb.Test/Model/CreateConferenceRequestTests.cs +++ b/src/freeclimb.Test/Model/CreateConferenceRequestTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,25 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class CreateConferenceRequestTests + + public class CreateConferenceRequestTests : IDisposable { private CreateConferenceRequest instance; public CreateConferenceRequestTests() { - - instance = new CreateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - + instance = new CreateConferenceRequest( + alias: (string)TestHelpers.getTestValue(typeof(string)), + playBeep: (PlayBeep)TestHelpers.getTestValue(typeof(PlayBeep)), + record: (bool)TestHelpers.getTestValue(typeof(bool)), + waitUrl: (string)TestHelpers.getTestValue(typeof(string)), + statusCallbackUrl: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +61,6 @@ public void CreateConferenceRequestInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Alias' /// @@ -65,8 +69,8 @@ public void AliasTest() { instance.Alias = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Alias); - } + /// /// Test the property 'PlayBeep' /// @@ -74,15 +78,15 @@ public void AliasTest() public void PlayBeepTest() { instance.PlayBeep = PlayBeep.ALWAYS; - Assert.Equal(instance.PlayBeep,PlayBeep.ALWAYS); + Assert.Equal(PlayBeep.ALWAYS, instance.PlayBeep); instance.PlayBeep = PlayBeep.NEVER; - Assert.Equal(instance.PlayBeep,PlayBeep.NEVER); + Assert.Equal(PlayBeep.NEVER, instance.PlayBeep); instance.PlayBeep = PlayBeep.ENTRY_ONLY; - Assert.Equal(instance.PlayBeep,PlayBeep.ENTRY_ONLY); + Assert.Equal(PlayBeep.ENTRY_ONLY, instance.PlayBeep); instance.PlayBeep = PlayBeep.EXIT_ONLY; - Assert.Equal(instance.PlayBeep,PlayBeep.EXIT_ONLY); - + Assert.Equal(PlayBeep.EXIT_ONLY, instance.PlayBeep); } + /// /// Test the property 'Record' /// @@ -90,9 +94,9 @@ public void PlayBeepTest() public void RecordTest() { instance.Record = false; - Assert.Equal(false, instance.Record); - + Assert.False(instance.Record); } + /// /// Test the property 'WaitUrl' /// @@ -101,8 +105,8 @@ public void WaitUrlTest() { instance.WaitUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.WaitUrl); - } + /// /// Test the property 'StatusCallbackUrl' /// @@ -111,166 +115,6 @@ public void StatusCallbackUrlTest() { instance.StatusCallbackUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.StatusCallbackUrl); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - CreateConferenceRequest test1 = new CreateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.WaitUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - - CreateConferenceRequest test2 = new CreateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.WaitUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - CreateConferenceRequest test1 = new CreateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.WaitUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - - CreateConferenceRequest test2 = new CreateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test2.Alias = "ts"; - test2.PlayBeep = PlayBeep.NEVER; - test2.Record = false; - test2.WaitUrl = "ts"; - test2.StatusCallbackUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - CreateConferenceRequest test1 = new CreateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.WaitUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - CreateConferenceRequest test1 = new CreateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.WaitUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - CreateConferenceRequest test1 = new CreateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.WaitUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - - CreateConferenceRequest test2 = new CreateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.WaitUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - CreateConferenceRequest test1 = new CreateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.WaitUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - - CreateConferenceRequest test2 = new CreateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.WaitUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - CreateConferenceRequest test1 = new CreateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.WaitUrl = "TS"; - test1.StatusCallbackUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - CreateConferenceRequest test2 = new CreateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING"); - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.WaitUrl = "TS"; - test2.StatusCallbackUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/CreateConferenceTests.cs b/src/freeclimb.Test/Model/CreateConferenceTests.cs index 04187738..c2d2803f 100644 --- a/src/freeclimb.Test/Model/CreateConferenceTests.cs +++ b/src/freeclimb.Test/Model/CreateConferenceTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,26 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class CreateConferenceTests + + public class CreateConferenceTests : IDisposable { private CreateConference instance; public CreateConferenceTests() { - - instance = new CreateConference("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING", "TEST_STRING"); - + instance = new CreateConference( + actionUrl: (string)TestHelpers.getTestValue(typeof(string)), + alias: (bool)TestHelpers.getTestValue(typeof(bool)), + playBeep: (PlayBeep)TestHelpers.getTestValue(typeof(PlayBeep)), + record: (bool)TestHelpers.getTestValue(typeof(bool)), + statusCallbackUrl: (string)TestHelpers.getTestValue(typeof(string)), + waitUrl: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,17 +62,16 @@ public void CreateConferenceInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'ActionUrl' /// [Fact] public void ActionUrlTest() { - instance.ActionUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ActionUrl); } + /// /// Test the property 'Alias' /// @@ -74,9 +79,9 @@ public void ActionUrlTest() public void AliasTest() { instance.Alias = false; - Assert.Equal(false, instance.Alias); - + Assert.False(instance.Alias); } + /// /// Test the property 'PlayBeep' /// @@ -84,15 +89,15 @@ public void AliasTest() public void PlayBeepTest() { instance.PlayBeep = PlayBeep.ALWAYS; - Assert.Equal(instance.PlayBeep,PlayBeep.ALWAYS); + Assert.Equal(PlayBeep.ALWAYS, instance.PlayBeep); instance.PlayBeep = PlayBeep.NEVER; - Assert.Equal(instance.PlayBeep,PlayBeep.NEVER); + Assert.Equal(PlayBeep.NEVER, instance.PlayBeep); instance.PlayBeep = PlayBeep.ENTRY_ONLY; - Assert.Equal(instance.PlayBeep,PlayBeep.ENTRY_ONLY); + Assert.Equal(PlayBeep.ENTRY_ONLY, instance.PlayBeep); instance.PlayBeep = PlayBeep.EXIT_ONLY; - Assert.Equal(instance.PlayBeep,PlayBeep.EXIT_ONLY); - + Assert.Equal(PlayBeep.EXIT_ONLY, instance.PlayBeep); } + /// /// Test the property 'Record' /// @@ -100,9 +105,9 @@ public void PlayBeepTest() public void RecordTest() { instance.Record = false; - Assert.Equal(false, instance.Record); - + Assert.False(instance.Record); } + /// /// Test the property 'StatusCallbackUrl' /// @@ -111,8 +116,8 @@ public void StatusCallbackUrlTest() { instance.StatusCallbackUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.StatusCallbackUrl); - } + /// /// Test the property 'WaitUrl' /// @@ -121,178 +126,6 @@ public void WaitUrlTest() { instance.WaitUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.WaitUrl); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - CreateConference test1 = new CreateConference("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.Alias = true; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.StatusCallbackUrl = "TS"; - test1.WaitUrl = "TS"; - - CreateConference test2 = new CreateConference("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.Alias = true; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.StatusCallbackUrl = "TS"; - test2.WaitUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - CreateConference test1 = new CreateConference("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.Alias = true; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.StatusCallbackUrl = "TS"; - test1.WaitUrl = "TS"; - - CreateConference test2 = new CreateConference("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "ts"; - test2.Alias = false; - test2.PlayBeep = PlayBeep.NEVER; - test2.Record = false; - test2.StatusCallbackUrl = "ts"; - test2.WaitUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - CreateConference test1 = new CreateConference("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.Alias = true; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.StatusCallbackUrl = "TS"; - test1.WaitUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - CreateConference test1 = new CreateConference("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.Alias = true; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.StatusCallbackUrl = "TS"; - test1.WaitUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - CreateConference test1 = new CreateConference("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.Alias = true; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.StatusCallbackUrl = "TS"; - test1.WaitUrl = "TS"; - - CreateConference test2 = new CreateConference("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.Alias = true; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.StatusCallbackUrl = "TS"; - test2.WaitUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - CreateConference test1 = new CreateConference("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.Alias = true; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.StatusCallbackUrl = "TS"; - test1.WaitUrl = "TS"; - - CreateConference test2 = new CreateConference("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.Alias = true; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.StatusCallbackUrl = "TS"; - test2.WaitUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - CreateConference test1 = new CreateConference("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.Alias = true; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Record = true; - test1.StatusCallbackUrl = "TS"; - test1.WaitUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - CreateConference test2 = new CreateConference("TEST_STRING", false, PlayBeep.ALWAYS, false, "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.Alias = true; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Record = true; - test2.StatusCallbackUrl = "TS"; - test2.WaitUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/CreateConferenceWebhookTests.cs b/src/freeclimb.Test/Model/CreateConferenceWebhookTests.cs new file mode 100644 index 00000000..aa93c96b --- /dev/null +++ b/src/freeclimb.Test/Model/CreateConferenceWebhookTests.cs @@ -0,0 +1,231 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing CreateConferenceWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class CreateConferenceWebhookTests : IDisposable + { + private CreateConferenceWebhook instance; + + public CreateConferenceWebhookTests() + { + instance = new CreateConferenceWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + status: (ConferenceStatus)TestHelpers.getTestValue(typeof(ConferenceStatus)), + recordingUrl: (string)TestHelpers.getTestValue(typeof(string)), + recordingId: (string)TestHelpers.getTestValue(typeof(string)), + recordingDurationSec: (int?)TestHelpers.getTestValue(typeof(int?)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateConferenceWebhook + /// + [Fact] + public void CreateConferenceWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'Status' + /// + [Fact] + public void StatusTest() + { + instance.Status = ConferenceStatus.EMPTY; + Assert.Equal(ConferenceStatus.EMPTY, instance.Status); + instance.Status = ConferenceStatus.POPULATED; + Assert.Equal(ConferenceStatus.POPULATED, instance.Status); + instance.Status = ConferenceStatus.IN_PROGRESS; + Assert.Equal(ConferenceStatus.IN_PROGRESS, instance.Status); + instance.Status = ConferenceStatus.TERMINATED; + Assert.Equal(ConferenceStatus.TERMINATED, instance.Status); + } + + /// + /// Test the property 'RecordingUrl' + /// + [Fact] + public void RecordingUrlTest() + { + instance.RecordingUrl = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingUrl); + } + + /// + /// Test the property 'RecordingId' + /// + [Fact] + public void RecordingIdTest() + { + instance.RecordingId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingId); + } + + /// + /// Test the property 'RecordingDurationSec' + /// + [Fact] + public void RecordingDurationSecTest() + { + instance.RecordingDurationSec = 1; + Assert.Equal(1, (int)instance.RecordingDurationSec); + } + + [Fact] + public void TestDeserializeJsonToCreateConferenceWebhook() + { + string payload = @"{ ""requestType"": ""createConference"" }"; + CreateConferenceWebhook deserialized = CreateConferenceWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("createConference", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/CreateWebRTCTokenTests.cs b/src/freeclimb.Test/Model/CreateWebRTCTokenTests.cs index 81d81889..9b46fbf1 100644 --- a/src/freeclimb.Test/Model/CreateWebRTCTokenTests.cs +++ b/src/freeclimb.Test/Model/CreateWebRTCTokenTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,23 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class CreateWebRTCTokenTests + + public class CreateWebRTCTokenTests : IDisposable { private CreateWebRTCToken instance; public CreateWebRTCTokenTests() { - - instance = new CreateWebRTCToken("TEST_STRING", "TEST_STRING", 1); - + instance = new CreateWebRTCToken( + to: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + uses: (int)TestHelpers.getTestValue(typeof(int)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +59,6 @@ public void CreateWebRTCTokenInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'To' /// @@ -65,8 +67,8 @@ public void ToTest() { instance.To = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.To); - } + /// /// Test the property 'From' /// @@ -75,152 +77,16 @@ public void FromTest() { instance.From = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.From); - } + /// /// Test the property 'Uses' /// [Fact] public void UsesTest() { - instance.Uses = 1; - Assert.Equal(1, (int) instance.Uses); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - CreateWebRTCToken test1 = new CreateWebRTCToken("TEST_STRING", "TEST_STRING", 1); - test1.To = "TS"; - test1.From = "TS"; - test1.Uses = 1; - - CreateWebRTCToken test2 = new CreateWebRTCToken("TEST_STRING", "TEST_STRING", 1); - test2.To = "TS"; - test2.From = "TS"; - test2.Uses = 1; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - CreateWebRTCToken test1 = new CreateWebRTCToken("TEST_STRING", "TEST_STRING", 1); - test1.To = "TS"; - test1.From = "TS"; - test1.Uses = 1; - - CreateWebRTCToken test2 = new CreateWebRTCToken("TEST_STRING", "TEST_STRING", 1); - test2.To = "ts"; - test2.From = "ts"; - test2.Uses = 2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - CreateWebRTCToken test1 = new CreateWebRTCToken("TEST_STRING", "TEST_STRING", 1); - test1.To = "TS"; - test1.From = "TS"; - test1.Uses = 1; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - CreateWebRTCToken test1 = new CreateWebRTCToken("TEST_STRING", "TEST_STRING", 1); - test1.To = "TS"; - test1.From = "TS"; - test1.Uses = 1; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - CreateWebRTCToken test1 = new CreateWebRTCToken("TEST_STRING", "TEST_STRING", 1); - test1.To = "TS"; - test1.From = "TS"; - test1.Uses = 1; - - CreateWebRTCToken test2 = new CreateWebRTCToken("TEST_STRING", "TEST_STRING", 1); - test2.To = "TS"; - test2.From = "TS"; - test2.Uses = 1; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - CreateWebRTCToken test1 = new CreateWebRTCToken("TEST_STRING", "TEST_STRING", 1); - test1.To = "TS"; - test1.From = "TS"; - test1.Uses = 1; - - CreateWebRTCToken test2 = new CreateWebRTCToken("TEST_STRING", "TEST_STRING", 1); - test2.To = "TS"; - test2.From = "TS"; - test2.Uses = 1; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - CreateWebRTCToken test1 = new CreateWebRTCToken("TEST_STRING", "TEST_STRING", 1); - test1.To = "TS"; - test1.From = "TS"; - test1.Uses = 1; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - CreateWebRTCToken test2 = new CreateWebRTCToken("TEST_STRING", "TEST_STRING", 1); - test2.To = "TS"; - test2.From = "TS"; - test2.Uses = 1; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(1, (int)instance.Uses); } } } diff --git a/src/freeclimb.Test/Model/DequeueTests.cs b/src/freeclimb.Test/Model/DequeueTests.cs index 925b52f4..d37d1be8 100644 --- a/src/freeclimb.Test/Model/DequeueTests.cs +++ b/src/freeclimb.Test/Model/DequeueTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,19 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class DequeueTests + + public class DequeueTests : IDisposable { private Dequeue instance; public DequeueTests() { - - instance = new Dequeue("TEST_STRING"); - + instance = new Dequeue(); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +54,5 @@ public void DequeueInstanceTest() { Assert.IsType(instance); } - - } } diff --git a/src/freeclimb.Test/Model/DequeueWebhookTests.cs b/src/freeclimb.Test/Model/DequeueWebhookTests.cs new file mode 100644 index 00000000..aacc7a79 --- /dev/null +++ b/src/freeclimb.Test/Model/DequeueWebhookTests.cs @@ -0,0 +1,203 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing DequeueWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class DequeueWebhookTests : IDisposable + { + private DequeueWebhook instance; + + public DequeueWebhookTests() + { + instance = new DequeueWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + queueResult: (string)TestHelpers.getTestValue(typeof(string)), + queueTime: (int?)TestHelpers.getTestValue(typeof(int?)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of DequeueWebhook + /// + [Fact] + public void DequeueWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'QueueResult' + /// + [Fact] + public void QueueResultTest() + { + instance.QueueResult = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueResult); + } + + /// + /// Test the property 'QueueTime' + /// + [Fact] + public void QueueTimeTest() + { + instance.QueueTime = 1; + Assert.Equal(1, (int)instance.QueueTime); + } + + [Fact] + public void TestDeserializeJsonToDequeueWebhook() + { + string payload = @"{ ""requestType"": ""dequeue"" }"; + DequeueWebhook deserialized = DequeueWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("dequeue", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/EnqueueAllOfTests.cs b/src/freeclimb.Test/Model/EnqueueAllOfTests.cs deleted file mode 100644 index b285c716..00000000 --- a/src/freeclimb.Test/Model/EnqueueAllOfTests.cs +++ /dev/null @@ -1,248 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing EnqueueAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class EnqueueAllOfTests - { - private EnqueueAllOf instance; - - public EnqueueAllOfTests() - { - - instance = new EnqueueAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - - } - - /// - /// Test an instance of EnqueueAllOf - /// - [Fact] - public void EnqueueAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'ActionUrl' - /// - [Fact] - public void ActionUrlTest() - { - - instance.ActionUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ActionUrl); - } - /// - /// Test the property 'NotificationUrl' - /// - [Fact] - public void NotificationUrlTest() - { - - instance.NotificationUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.NotificationUrl); - } - /// - /// Test the property 'QueueId' - /// - [Fact] - public void QueueIdTest() - { - instance.QueueId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.QueueId); - - } - /// - /// Test the property 'WaitUrl' - /// - [Fact] - public void WaitUrlTest() - { - instance.WaitUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.WaitUrl); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - EnqueueAllOf test1 = new EnqueueAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - test1.QueueId = "TS"; - test1.WaitUrl = "TS"; - - EnqueueAllOf test2 = new EnqueueAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - test2.QueueId = "TS"; - test2.WaitUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - EnqueueAllOf test1 = new EnqueueAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - test1.QueueId = "TS"; - test1.WaitUrl = "TS"; - - EnqueueAllOf test2 = new EnqueueAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "ts"; - test2.NotificationUrl = "ts"; - test2.QueueId = "ts"; - test2.WaitUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - EnqueueAllOf test1 = new EnqueueAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - test1.QueueId = "TS"; - test1.WaitUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - EnqueueAllOf test1 = new EnqueueAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - test1.QueueId = "TS"; - test1.WaitUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - EnqueueAllOf test1 = new EnqueueAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - test1.QueueId = "TS"; - test1.WaitUrl = "TS"; - - EnqueueAllOf test2 = new EnqueueAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - test2.QueueId = "TS"; - test2.WaitUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - EnqueueAllOf test1 = new EnqueueAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - test1.QueueId = "TS"; - test1.WaitUrl = "TS"; - - EnqueueAllOf test2 = new EnqueueAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - test2.QueueId = "TS"; - test2.WaitUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - EnqueueAllOf test1 = new EnqueueAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - test1.QueueId = "TS"; - test1.WaitUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - EnqueueAllOf test2 = new EnqueueAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - test2.QueueId = "TS"; - test2.WaitUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/EnqueueTests.cs b/src/freeclimb.Test/Model/EnqueueTests.cs index 6fa97b68..6a73c28a 100644 --- a/src/freeclimb.Test/Model/EnqueueTests.cs +++ b/src/freeclimb.Test/Model/EnqueueTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,24 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class EnqueueTests + + public class EnqueueTests : IDisposable { private Enqueue instance; public EnqueueTests() { - - instance = new Enqueue("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - + instance = new Enqueue( + actionUrl: (string)TestHelpers.getTestValue(typeof(string)), + notificationUrl: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + waitUrl: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,27 +60,26 @@ public void EnqueueInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'ActionUrl' /// [Fact] public void ActionUrlTest() { - instance.ActionUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ActionUrl); } + /// /// Test the property 'NotificationUrl' /// [Fact] public void NotificationUrlTest() { - instance.NotificationUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NotificationUrl); } + /// /// Test the property 'QueueId' /// @@ -85,8 +88,8 @@ public void QueueIdTest() { instance.QueueId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.QueueId); - } + /// /// Test the property 'WaitUrl' /// @@ -95,154 +98,6 @@ public void WaitUrlTest() { instance.WaitUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.WaitUrl); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - Enqueue test1 = new Enqueue("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - test1.QueueId = "TS"; - test1.WaitUrl = "TS"; - - Enqueue test2 = new Enqueue("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - test2.QueueId = "TS"; - test2.WaitUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - Enqueue test1 = new Enqueue("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - test1.QueueId = "TS"; - test1.WaitUrl = "TS"; - - Enqueue test2 = new Enqueue("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "ts"; - test2.NotificationUrl = "ts"; - test2.QueueId = "ts"; - test2.WaitUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - Enqueue test1 = new Enqueue("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - test1.QueueId = "TS"; - test1.WaitUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - Enqueue test1 = new Enqueue("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - test1.QueueId = "TS"; - test1.WaitUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - Enqueue test1 = new Enqueue("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - test1.QueueId = "TS"; - test1.WaitUrl = "TS"; - - Enqueue test2 = new Enqueue("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - test2.QueueId = "TS"; - test2.WaitUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - Enqueue test1 = new Enqueue("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - test1.QueueId = "TS"; - test1.WaitUrl = "TS"; - - Enqueue test2 = new Enqueue("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - test2.QueueId = "TS"; - test2.WaitUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - Enqueue test1 = new Enqueue("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - test1.QueueId = "TS"; - test1.WaitUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - Enqueue test2 = new Enqueue("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - test2.QueueId = "TS"; - test2.WaitUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/FilterLogsRequestTests.cs b/src/freeclimb.Test/Model/FilterLogsRequestTests.cs index 5c0d8953..b5abcee9 100644 --- a/src/freeclimb.Test/Model/FilterLogsRequestTests.cs +++ b/src/freeclimb.Test/Model/FilterLogsRequestTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,19 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class FilterLogsRequestTests + + public class FilterLogsRequestTests : IDisposable { private FilterLogsRequest instance; public FilterLogsRequestTests() { - - instance = new FilterLogsRequest("TEST_STRING"); - + instance = new FilterLogsRequest(pql: (string)TestHelpers.getTestValue(typeof(string))); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +55,6 @@ public void FilterLogsRequestInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Pql' /// @@ -65,118 +63,6 @@ public void PqlTest() { instance.Pql = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Pql); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - FilterLogsRequest test1 = new FilterLogsRequest("TEST_STRING"); - test1.Pql = "TS"; - - FilterLogsRequest test2 = new FilterLogsRequest("TEST_STRING"); - test2.Pql = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - FilterLogsRequest test1 = new FilterLogsRequest("TEST_STRING"); - test1.Pql = "TS"; - - FilterLogsRequest test2 = new FilterLogsRequest("TEST_STRING"); - test2.Pql = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - FilterLogsRequest test1 = new FilterLogsRequest("TEST_STRING"); - test1.Pql = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - FilterLogsRequest test1 = new FilterLogsRequest("TEST_STRING"); - test1.Pql = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - FilterLogsRequest test1 = new FilterLogsRequest("TEST_STRING"); - test1.Pql = "TS"; - - FilterLogsRequest test2 = new FilterLogsRequest("TEST_STRING"); - test2.Pql = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - FilterLogsRequest test1 = new FilterLogsRequest("TEST_STRING"); - test1.Pql = "TS"; - - FilterLogsRequest test2 = new FilterLogsRequest("TEST_STRING"); - test2.Pql = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - FilterLogsRequest test1 = new FilterLogsRequest("TEST_STRING"); - test1.Pql = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - FilterLogsRequest test2 = new FilterLogsRequest("TEST_STRING"); - test2.Pql = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/GetDigitsAllOfTests.cs b/src/freeclimb.Test/Model/GetDigitsAllOfTests.cs deleted file mode 100644 index 31a523b5..00000000 --- a/src/freeclimb.Test/Model/GetDigitsAllOfTests.cs +++ /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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing GetDigitsAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class GetDigitsAllOfTests - { - private GetDigitsAllOf instance; - - public GetDigitsAllOfTests() - { - - instance = new GetDigitsAllOf("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false); - - } - - /// - /// Test an instance of GetDigitsAllOf - /// - [Fact] - public void GetDigitsAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'ActionUrl' - /// - [Fact] - public void ActionUrlTest() - { - - instance.ActionUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ActionUrl); - } - /// - /// Test the property 'DigitTimeoutMs' - /// - [Fact] - public void DigitTimeoutMsTest() - { - - instance.DigitTimeoutMs = 1; - Assert.Equal(1, (int) instance.DigitTimeoutMs); - } - /// - /// Test the property 'FinishOnKey' - /// - [Fact] - public void FinishOnKeyTest() - { - instance.FinishOnKey = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.FinishOnKey); - - } - /// - /// Test the property 'FlushBuffer' - /// - [Fact] - public void FlushBufferTest() - { - instance.FlushBuffer = false; - Assert.Equal(false, instance.FlushBuffer); - - } - /// - /// Test the property 'InitialTimeoutMs' - /// - [Fact] - public void InitialTimeoutMsTest() - { - - instance.InitialTimeoutMs = 1; - Assert.Equal(1, (int) instance.InitialTimeoutMs); - } - /// - /// Test the property 'MaxDigits' - /// - [Fact] - public void MaxDigitsTest() - { - - instance.MaxDigits = 1; - Assert.Equal(1, (int) instance.MaxDigits); - } - /// - /// Test the property 'MinDigits' - /// - [Fact] - public void MinDigitsTest() - { - - instance.MinDigits = 1; - Assert.Equal(1, (int) instance.MinDigits); - } - /// - /// Test the property 'Prompts' - /// - [Fact] - public void PromptsTest() - { - - List testList = new List(); - instance.Prompts = testList; - Assert.Equal(testList, instance.Prompts); - } - /// - /// Test the property 'PrivacyMode' - /// - [Fact] - public void PrivacyModeTest() - { - instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - GetDigitsAllOf test1 = new GetDigitsAllOf("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false); - test1.ActionUrl = "TS"; - test1.DigitTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.FlushBuffer = true; - test1.InitialTimeoutMs = 1; - test1.MaxDigits = 1; - test1.MinDigits = 1; - List testList = new List(); - test1.Prompts = testList; - test1.PrivacyMode = true; - - GetDigitsAllOf test2 = new GetDigitsAllOf("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false); - test2.ActionUrl = "TS"; - test2.DigitTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.FlushBuffer = true; - test2.InitialTimeoutMs = 1; - test2.MaxDigits = 1; - test2.MinDigits = 1; - List testList2 = new List(); - test2.Prompts = testList2; - test2.PrivacyMode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - GetDigitsAllOf test1 = new GetDigitsAllOf("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false); - test1.ActionUrl = "TS"; - test1.DigitTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.FlushBuffer = true; - test1.InitialTimeoutMs = 1; - test1.MaxDigits = 1; - test1.MinDigits = 1; - List testList = new List(); - test1.Prompts = testList; - test1.PrivacyMode = true; - - GetDigitsAllOf test2 = new GetDigitsAllOf("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false); - test2.ActionUrl = "ts"; - test2.DigitTimeoutMs = 2; - test2.FinishOnKey = "ts"; - test2.FlushBuffer = false; - test2.InitialTimeoutMs = 2; - test2.MaxDigits = 2; - test2.MinDigits = 2; - List testList2 = null; - test2.Prompts = testList2; - test2.PrivacyMode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - GetDigitsAllOf test1 = new GetDigitsAllOf("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false); - test1.ActionUrl = "TS"; - test1.DigitTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.FlushBuffer = true; - test1.InitialTimeoutMs = 1; - test1.MaxDigits = 1; - test1.MinDigits = 1; - List testList = new List(); - test1.Prompts = testList; - test1.PrivacyMode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - GetDigitsAllOf test1 = new GetDigitsAllOf("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false); - test1.ActionUrl = "TS"; - test1.DigitTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.FlushBuffer = true; - test1.InitialTimeoutMs = 1; - test1.MaxDigits = 1; - test1.MinDigits = 1; - List testList = new List(); - test1.Prompts = testList; - test1.PrivacyMode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - GetDigitsAllOf test1 = new GetDigitsAllOf("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false); - test1.ActionUrl = "TS"; - test1.DigitTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.FlushBuffer = true; - test1.InitialTimeoutMs = 1; - test1.MaxDigits = 1; - test1.MinDigits = 1; - List testList = new List(); - test1.Prompts = testList; - test1.PrivacyMode = true; - - GetDigitsAllOf test2 = new GetDigitsAllOf("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false); - test2.ActionUrl = "TS"; - test2.DigitTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.FlushBuffer = true; - test2.InitialTimeoutMs = 1; - test2.MaxDigits = 1; - test2.MinDigits = 1; - List testList2 = new List(); - test2.Prompts = testList2; - test2.PrivacyMode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - GetDigitsAllOf test1 = new GetDigitsAllOf("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false); - test1.ActionUrl = "TS"; - test1.DigitTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.FlushBuffer = true; - test1.InitialTimeoutMs = 1; - test1.MaxDigits = 1; - test1.MinDigits = 1; - List testList = new List(); - test1.Prompts = testList; - test1.PrivacyMode = true; - - GetDigitsAllOf test2 = new GetDigitsAllOf("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false); - test2.ActionUrl = "TS"; - test2.DigitTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.FlushBuffer = true; - test2.InitialTimeoutMs = 1; - test2.MaxDigits = 1; - test2.MinDigits = 1; - List testList2 = new List(); - test2.Prompts = testList2; - test2.PrivacyMode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - GetDigitsAllOf test1 = new GetDigitsAllOf("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false); - test1.ActionUrl = "TS"; - test1.DigitTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.FlushBuffer = true; - test1.InitialTimeoutMs = 1; - test1.MaxDigits = 1; - test1.MinDigits = 1; - List testList = new List(); - test1.Prompts = testList; - test1.PrivacyMode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - GetDigitsAllOf test2 = new GetDigitsAllOf("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false); - test2.ActionUrl = "TS"; - test2.DigitTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.FlushBuffer = true; - test2.InitialTimeoutMs = 1; - test2.MaxDigits = 1; - test2.MinDigits = 1; - List testList2 = new List(); - test2.Prompts = testList2; - test2.PrivacyMode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/GetDigitsTests.cs b/src/freeclimb.Test/Model/GetDigitsTests.cs index 0c21af07..9214760b 100644 --- a/src/freeclimb.Test/Model/GetDigitsTests.cs +++ b/src/freeclimb.Test/Model/GetDigitsTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,29 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class GetDigitsTests + + public class GetDigitsTests : IDisposable { private GetDigits instance; public GetDigitsTests() { - - instance = new GetDigits("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false, "TEST_STRING"); - + instance = new GetDigits( + actionUrl: (string)TestHelpers.getTestValue(typeof(string)), + digitTimeoutMs: (int)TestHelpers.getTestValue(typeof(int)), + finishOnKey: (string)TestHelpers.getTestValue(typeof(string)), + flushBuffer: (bool)TestHelpers.getTestValue(typeof(bool)), + initialTimeoutMs: (int)TestHelpers.getTestValue(typeof(int)), + maxDigits: (int)TestHelpers.getTestValue(typeof(int)), + minDigits: (int)TestHelpers.getTestValue(typeof(int)), + prompts: (List)TestHelpers.getTestValue(typeof(List)), + privacyMode: (bool)TestHelpers.getTestValue(typeof(bool)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,27 +65,26 @@ public void GetDigitsInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'ActionUrl' /// [Fact] public void ActionUrlTest() { - instance.ActionUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ActionUrl); } + /// /// Test the property 'DigitTimeoutMs' /// [Fact] public void DigitTimeoutMsTest() { - instance.DigitTimeoutMs = 1; - Assert.Equal(1, (int) instance.DigitTimeoutMs); + Assert.Equal(1, (int)instance.DigitTimeoutMs); } + /// /// Test the property 'FinishOnKey' /// @@ -85,8 +93,8 @@ public void FinishOnKeyTest() { instance.FinishOnKey = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.FinishOnKey); - } + /// /// Test the property 'FlushBuffer' /// @@ -94,50 +102,50 @@ public void FinishOnKeyTest() public void FlushBufferTest() { instance.FlushBuffer = false; - Assert.Equal(false, instance.FlushBuffer); - + Assert.False(instance.FlushBuffer); } + /// /// Test the property 'InitialTimeoutMs' /// [Fact] public void InitialTimeoutMsTest() { - instance.InitialTimeoutMs = 1; - Assert.Equal(1, (int) instance.InitialTimeoutMs); + Assert.Equal(1, (int)instance.InitialTimeoutMs); } + /// /// Test the property 'MaxDigits' /// [Fact] public void MaxDigitsTest() { - instance.MaxDigits = 1; - Assert.Equal(1, (int) instance.MaxDigits); + Assert.Equal(1, (int)instance.MaxDigits); } + /// /// Test the property 'MinDigits' /// [Fact] public void MinDigitsTest() { - instance.MinDigits = 1; - Assert.Equal(1, (int) instance.MinDigits); + Assert.Equal(1, (int)instance.MinDigits); } + /// /// Test the property 'Prompts' /// [Fact] public void PromptsTest() { - List testList = new List(); instance.Prompts = testList; - Assert.Equal(testList, instance.Prompts); + Assert.Equal(instance.Prompts, testList); } + /// /// Test the property 'PrivacyMode' /// @@ -145,227 +153,7 @@ public void PromptsTest() public void PrivacyModeTest() { instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - GetDigits test1 = new GetDigits("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.DigitTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.FlushBuffer = true; - test1.InitialTimeoutMs = 1; - test1.MaxDigits = 1; - test1.MinDigits = 1; - List testList = new List(); - test1.Prompts = testList; - test1.PrivacyMode = true; - - GetDigits test2 = new GetDigits("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.DigitTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.FlushBuffer = true; - test2.InitialTimeoutMs = 1; - test2.MaxDigits = 1; - test2.MinDigits = 1; - List testList2 = new List(); - test2.Prompts = testList2; - test2.PrivacyMode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - GetDigits test1 = new GetDigits("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.DigitTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.FlushBuffer = true; - test1.InitialTimeoutMs = 1; - test1.MaxDigits = 1; - test1.MinDigits = 1; - List testList = new List(); - test1.Prompts = testList; - test1.PrivacyMode = true; - - GetDigits test2 = new GetDigits("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false, "TEST_STRING"); - test2.ActionUrl = "ts"; - test2.DigitTimeoutMs = 2; - test2.FinishOnKey = "ts"; - test2.FlushBuffer = false; - test2.InitialTimeoutMs = 2; - test2.MaxDigits = 2; - test2.MinDigits = 2; - List testList2 = null; - test2.Prompts = testList2; - test2.PrivacyMode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - GetDigits test1 = new GetDigits("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.DigitTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.FlushBuffer = true; - test1.InitialTimeoutMs = 1; - test1.MaxDigits = 1; - test1.MinDigits = 1; - List testList = new List(); - test1.Prompts = testList; - test1.PrivacyMode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - GetDigits test1 = new GetDigits("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.DigitTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.FlushBuffer = true; - test1.InitialTimeoutMs = 1; - test1.MaxDigits = 1; - test1.MinDigits = 1; - List testList = new List(); - test1.Prompts = testList; - test1.PrivacyMode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - GetDigits test1 = new GetDigits("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.DigitTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.FlushBuffer = true; - test1.InitialTimeoutMs = 1; - test1.MaxDigits = 1; - test1.MinDigits = 1; - List testList = new List(); - test1.Prompts = testList; - test1.PrivacyMode = true; - - GetDigits test2 = new GetDigits("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.DigitTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.FlushBuffer = true; - test2.InitialTimeoutMs = 1; - test2.MaxDigits = 1; - test2.MinDigits = 1; - List testList2 = new List(); - test2.Prompts = testList2; - test2.PrivacyMode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - GetDigits test1 = new GetDigits("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.DigitTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.FlushBuffer = true; - test1.InitialTimeoutMs = 1; - test1.MaxDigits = 1; - test1.MinDigits = 1; - List testList = new List(); - test1.Prompts = testList; - test1.PrivacyMode = true; - - GetDigits test2 = new GetDigits("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.DigitTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.FlushBuffer = true; - test2.InitialTimeoutMs = 1; - test2.MaxDigits = 1; - test2.MinDigits = 1; - List testList2 = new List(); - test2.Prompts = testList2; - test2.PrivacyMode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - GetDigits test1 = new GetDigits("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.DigitTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.FlushBuffer = true; - test1.InitialTimeoutMs = 1; - test1.MaxDigits = 1; - test1.MinDigits = 1; - List testList = new List(); - test1.Prompts = testList; - test1.PrivacyMode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - GetDigits test2 = new GetDigits("TEST_STRING", 1, "TEST_STRING", false, 1, 1, 1, new List(), false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.DigitTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.FlushBuffer = true; - test2.InitialTimeoutMs = 1; - test2.MaxDigits = 1; - test2.MinDigits = 1; - List testList2 = new List(); - test2.Prompts = testList2; - test2.PrivacyMode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.False(instance.PrivacyMode); } } } diff --git a/src/freeclimb.Test/Model/GetDigitsWebhookTests.cs b/src/freeclimb.Test/Model/GetDigitsWebhookTests.cs new file mode 100644 index 00000000..be7989cf --- /dev/null +++ b/src/freeclimb.Test/Model/GetDigitsWebhookTests.cs @@ -0,0 +1,220 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing GetDigitsWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class GetDigitsWebhookTests : IDisposable + { + private GetDigitsWebhook instance; + + public GetDigitsWebhookTests() + { + instance = new GetDigitsWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + digits: (string)TestHelpers.getTestValue(typeof(string)), + reason: (GetDigitsReason)TestHelpers.getTestValue(typeof(GetDigitsReason)), + parentCallId: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of GetDigitsWebhook + /// + [Fact] + public void GetDigitsWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'Digits' + /// + [Fact] + public void DigitsTest() + { + instance.Digits = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.Digits); + } + + /// + /// Test the property 'Reason' + /// + [Fact] + public void ReasonTest() + { + instance.Reason = GetDigitsReason.FINISH_KEY; + Assert.Equal(GetDigitsReason.FINISH_KEY, instance.Reason); + instance.Reason = GetDigitsReason.TIMEOUT; + Assert.Equal(GetDigitsReason.TIMEOUT, instance.Reason); + instance.Reason = GetDigitsReason.MAX_DIGITS; + Assert.Equal(GetDigitsReason.MAX_DIGITS, instance.Reason); + instance.Reason = GetDigitsReason.TONE; + Assert.Equal(GetDigitsReason.TONE, instance.Reason); + } + + /// + /// Test the property 'ParentCallId' + /// + [Fact] + public void ParentCallIdTest() + { + instance.ParentCallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ParentCallId); + } + + [Fact] + public void TestDeserializeJsonToGetDigitsWebhook() + { + string payload = @"{ ""requestType"": ""getDigits"" }"; + GetDigitsWebhook deserialized = GetDigitsWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("getDigits", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/GetSpeechAllOfTests.cs b/src/freeclimb.Test/Model/GetSpeechAllOfTests.cs deleted file mode 100644 index 89f68c4c..00000000 --- a/src/freeclimb.Test/Model/GetSpeechAllOfTests.cs +++ /dev/null @@ -1,437 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing GetSpeechAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class GetSpeechAllOfTests - { - private GetSpeechAllOf instance; - - public GetSpeechAllOfTests() - { - - instance = new GetSpeechAllOf("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false); - - } - - /// - /// Test an instance of GetSpeechAllOf - /// - [Fact] - public void GetSpeechAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'ActionUrl' - /// - [Fact] - public void ActionUrlTest() - { - - instance.ActionUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ActionUrl); - } - /// - /// Test the property 'GrammarType' - /// - [Fact] - public void GrammarTypeTest() - { - instance.GrammarType = GrammarType.URL; - Assert.Equal(instance.GrammarType,GrammarType.URL); - instance.GrammarType = GrammarType.BUILT_IN; - Assert.Equal(instance.GrammarType,GrammarType.BUILT_IN); - - } - /// - /// Test the property 'GrammarFile' - /// - [Fact] - public void GrammarFileTest() - { - instance.GrammarFile = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.GrammarFile); - - } - /// - /// Test the property 'GrammarRule' - /// - [Fact] - public void GrammarRuleTest() - { - instance.GrammarRule = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.GrammarRule); - - } - /// - /// Test the property 'PlayBeep' - /// - [Fact] - public void PlayBeepTest() - { - instance.PlayBeep = false; - Assert.Equal(false, instance.PlayBeep); - - } - /// - /// Test the property 'Prompts' - /// - [Fact] - public void PromptsTest() - { - - List testList = new List(); - instance.Prompts = testList; - Assert.Equal(testList, instance.Prompts); - } - /// - /// Test the property 'NoInputTimeoutMs' - /// - [Fact] - public void NoInputTimeoutMsTest() - { - - instance.NoInputTimeoutMs = 1; - Assert.Equal(1, (int) instance.NoInputTimeoutMs); - } - /// - /// Test the property 'RecognitionTimeoutMs' - /// - [Fact] - public void RecognitionTimeoutMsTest() - { - - instance.RecognitionTimeoutMs = 1; - Assert.Equal(1, (int) instance.RecognitionTimeoutMs); - } - /// - /// Test the property 'ConfidenceThreshold' - /// - [Fact] - public void ConfidenceThresholdTest() - { - instance.ConfidenceThreshold = new decimal(1.0); - Assert.Equal(new decimal(1.0), instance.ConfidenceThreshold); - - } - /// - /// Test the property 'SensitivityLevel' - /// - [Fact] - public void SensitivityLevelTest() - { - instance.SensitivityLevel = new decimal(1.0); - Assert.Equal(new decimal(1.0), instance.SensitivityLevel); - - } - /// - /// Test the property 'SpeechCompleteTimeoutMs' - /// - [Fact] - public void SpeechCompleteTimeoutMsTest() - { - - instance.SpeechCompleteTimeoutMs = 1; - Assert.Equal(1, (int) instance.SpeechCompleteTimeoutMs); - } - /// - /// Test the property 'SpeechIncompleteTimeoutMs' - /// - [Fact] - public void SpeechIncompleteTimeoutMsTest() - { - - instance.SpeechIncompleteTimeoutMs = 1; - Assert.Equal(1, (int) instance.SpeechIncompleteTimeoutMs); - } - /// - /// Test the property 'PrivacyMode' - /// - [Fact] - public void PrivacyModeTest() - { - instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - GetSpeechAllOf test1 = new GetSpeechAllOf("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false); - test1.ActionUrl = "TS"; - test1.GrammarType = GrammarType.URL; - test1.GrammarFile = "TS"; - test1.GrammarRule = "TS"; - test1.PlayBeep = true; - List testList = new List(); - test1.Prompts = testList; - test1.NoInputTimeoutMs = 1; - test1.RecognitionTimeoutMs = 1; - test1.SpeechCompleteTimeoutMs = 1; - test1.SpeechIncompleteTimeoutMs = 1; - test1.PrivacyMode = true; - - GetSpeechAllOf test2 = new GetSpeechAllOf("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false); - test2.ActionUrl = "TS"; - test2.GrammarType = GrammarType.URL; - test2.GrammarFile = "TS"; - test2.GrammarRule = "TS"; - test2.PlayBeep = true; - List testList2 = new List(); - test2.Prompts = testList2; - test2.NoInputTimeoutMs = 1; - test2.RecognitionTimeoutMs = 1; - test2.SpeechCompleteTimeoutMs = 1; - test2.SpeechIncompleteTimeoutMs = 1; - test2.PrivacyMode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - GetSpeechAllOf test1 = new GetSpeechAllOf("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false); - test1.ActionUrl = "TS"; - test1.GrammarType = GrammarType.URL; - test1.GrammarFile = "TS"; - test1.GrammarRule = "TS"; - test1.PlayBeep = true; - List testList = new List(); - test1.Prompts = testList; - test1.NoInputTimeoutMs = 1; - test1.RecognitionTimeoutMs = 1; - test1.SpeechCompleteTimeoutMs = 1; - test1.SpeechIncompleteTimeoutMs = 1; - test1.PrivacyMode = true; - - GetSpeechAllOf test2 = new GetSpeechAllOf("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false); - test2.ActionUrl = "ts"; - test2.GrammarType = GrammarType.BUILT_IN; - test2.GrammarFile = "ts"; - test2.GrammarRule = "ts"; - test2.PlayBeep = false; - List testList2 = null; - test2.Prompts = testList2; - test2.NoInputTimeoutMs = 2; - test2.RecognitionTimeoutMs = 2; - test2.SpeechCompleteTimeoutMs = 2; - test2.SpeechIncompleteTimeoutMs = 2; - test2.PrivacyMode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - GetSpeechAllOf test1 = new GetSpeechAllOf("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false); - test1.ActionUrl = "TS"; - test1.GrammarType = GrammarType.URL; - test1.GrammarFile = "TS"; - test1.GrammarRule = "TS"; - test1.PlayBeep = true; - List testList = new List(); - test1.Prompts = testList; - test1.NoInputTimeoutMs = 1; - test1.RecognitionTimeoutMs = 1; - test1.SpeechCompleteTimeoutMs = 1; - test1.SpeechIncompleteTimeoutMs = 1; - test1.PrivacyMode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - GetSpeechAllOf test1 = new GetSpeechAllOf("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false); - test1.ActionUrl = "TS"; - test1.GrammarType = GrammarType.URL; - test1.GrammarFile = "TS"; - test1.GrammarRule = "TS"; - test1.PlayBeep = true; - List testList = new List(); - test1.Prompts = testList; - test1.NoInputTimeoutMs = 1; - test1.RecognitionTimeoutMs = 1; - test1.SpeechCompleteTimeoutMs = 1; - test1.SpeechIncompleteTimeoutMs = 1; - test1.PrivacyMode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - GetSpeechAllOf test1 = new GetSpeechAllOf("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false); - test1.ActionUrl = "TS"; - test1.GrammarType = GrammarType.URL; - test1.GrammarFile = "TS"; - test1.GrammarRule = "TS"; - test1.PlayBeep = true; - List testList = new List(); - test1.Prompts = testList; - test1.NoInputTimeoutMs = 1; - test1.RecognitionTimeoutMs = 1; - test1.SpeechCompleteTimeoutMs = 1; - test1.SpeechIncompleteTimeoutMs = 1; - test1.PrivacyMode = true; - - GetSpeechAllOf test2 = new GetSpeechAllOf("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false); - test2.ActionUrl = "TS"; - test2.GrammarType = GrammarType.URL; - test2.GrammarFile = "TS"; - test2.GrammarRule = "TS"; - test2.PlayBeep = true; - List testList2 = new List(); - test2.Prompts = testList2; - test2.NoInputTimeoutMs = 1; - test2.RecognitionTimeoutMs = 1; - test2.SpeechCompleteTimeoutMs = 1; - test2.SpeechIncompleteTimeoutMs = 1; - test2.PrivacyMode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - GetSpeechAllOf test1 = new GetSpeechAllOf("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false); - test1.ActionUrl = "TS"; - test1.GrammarType = GrammarType.URL; - test1.GrammarFile = "TS"; - test1.GrammarRule = "TS"; - test1.PlayBeep = true; - List testList = new List(); - test1.Prompts = testList; - test1.NoInputTimeoutMs = 1; - test1.RecognitionTimeoutMs = 1; - test1.SpeechCompleteTimeoutMs = 1; - test1.SpeechIncompleteTimeoutMs = 1; - test1.PrivacyMode = true; - - GetSpeechAllOf test2 = new GetSpeechAllOf("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false); - test2.ActionUrl = "TS"; - test2.GrammarType = GrammarType.URL; - test2.GrammarFile = "TS"; - test2.GrammarRule = "TS"; - test2.PlayBeep = true; - List testList2 = new List(); - test2.Prompts = testList2; - test2.NoInputTimeoutMs = 1; - test2.RecognitionTimeoutMs = 1; - test2.SpeechCompleteTimeoutMs = 1; - test2.SpeechIncompleteTimeoutMs = 1; - test2.PrivacyMode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - GetSpeechAllOf test1 = new GetSpeechAllOf("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false); - test1.ActionUrl = "TS"; - test1.GrammarType = GrammarType.URL; - test1.GrammarFile = "TS"; - test1.GrammarRule = "TS"; - test1.PlayBeep = true; - List testList = new List(); - test1.Prompts = testList; - test1.NoInputTimeoutMs = 1; - test1.RecognitionTimeoutMs = 1; - test1.SpeechCompleteTimeoutMs = 1; - test1.SpeechIncompleteTimeoutMs = 1; - test1.PrivacyMode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - GetSpeechAllOf test2 = new GetSpeechAllOf("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false); - test2.ActionUrl = "TS"; - test2.GrammarType = GrammarType.URL; - test2.GrammarFile = "TS"; - test2.GrammarRule = "TS"; - test2.PlayBeep = true; - List testList2 = new List(); - test2.Prompts = testList2; - test2.NoInputTimeoutMs = 1; - test2.RecognitionTimeoutMs = 1; - test2.SpeechCompleteTimeoutMs = 1; - test2.SpeechIncompleteTimeoutMs = 1; - test2.PrivacyMode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/GetSpeechTests.cs b/src/freeclimb.Test/Model/GetSpeechTests.cs index 799beb0e..d164b709 100644 --- a/src/freeclimb.Test/Model/GetSpeechTests.cs +++ b/src/freeclimb.Test/Model/GetSpeechTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,33 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class GetSpeechTests + + public class GetSpeechTests : IDisposable { private GetSpeech instance; public GetSpeechTests() { - - instance = new GetSpeech("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false, "TEST_STRING"); - + instance = new GetSpeech( + actionUrl: (string)TestHelpers.getTestValue(typeof(string)), + grammarType: (GrammarType)TestHelpers.getTestValue(typeof(GrammarType)), + grammarFile: (string)TestHelpers.getTestValue(typeof(string)), + grammarRule: (string)TestHelpers.getTestValue(typeof(string)), + playBeep: (bool)TestHelpers.getTestValue(typeof(bool)), + prompts: (List)TestHelpers.getTestValue(typeof(List)), + noInputTimeoutMs: (int)TestHelpers.getTestValue(typeof(int)), + recognitionTimeoutMs: (int)TestHelpers.getTestValue(typeof(int)), + confidenceThreshold: (decimal)TestHelpers.getTestValue(typeof(decimal)), + sensitivityLevel: (decimal)TestHelpers.getTestValue(typeof(decimal)), + speechCompleteTimeoutMs: (int)TestHelpers.getTestValue(typeof(int)), + speechIncompleteTimeoutMs: (int)TestHelpers.getTestValue(typeof(int)), + privacyMode: (bool)TestHelpers.getTestValue(typeof(bool)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,17 +69,16 @@ public void GetSpeechInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'ActionUrl' /// [Fact] public void ActionUrlTest() { - instance.ActionUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ActionUrl); } + /// /// Test the property 'GrammarType' /// @@ -74,11 +86,11 @@ public void ActionUrlTest() public void GrammarTypeTest() { instance.GrammarType = GrammarType.URL; - Assert.Equal(instance.GrammarType,GrammarType.URL); + Assert.Equal(GrammarType.URL, instance.GrammarType); instance.GrammarType = GrammarType.BUILT_IN; - Assert.Equal(instance.GrammarType,GrammarType.BUILT_IN); - + Assert.Equal(GrammarType.BUILT_IN, instance.GrammarType); } + /// /// Test the property 'GrammarFile' /// @@ -87,8 +99,8 @@ public void GrammarFileTest() { instance.GrammarFile = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.GrammarFile); - } + /// /// Test the property 'GrammarRule' /// @@ -97,8 +109,8 @@ public void GrammarRuleTest() { instance.GrammarRule = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.GrammarRule); - } + /// /// Test the property 'PlayBeep' /// @@ -106,40 +118,40 @@ public void GrammarRuleTest() public void PlayBeepTest() { instance.PlayBeep = false; - Assert.Equal(false, instance.PlayBeep); - + Assert.False(instance.PlayBeep); } + /// /// Test the property 'Prompts' /// [Fact] public void PromptsTest() { - List testList = new List(); instance.Prompts = testList; - Assert.Equal(testList, instance.Prompts); + Assert.Equal(instance.Prompts, testList); } + /// /// Test the property 'NoInputTimeoutMs' /// [Fact] public void NoInputTimeoutMsTest() { - instance.NoInputTimeoutMs = 1; - Assert.Equal(1, (int) instance.NoInputTimeoutMs); + Assert.Equal(1, (int)instance.NoInputTimeoutMs); } + /// /// Test the property 'RecognitionTimeoutMs' /// [Fact] public void RecognitionTimeoutMsTest() { - instance.RecognitionTimeoutMs = 1; - Assert.Equal(1, (int) instance.RecognitionTimeoutMs); + Assert.Equal(1, (int)instance.RecognitionTimeoutMs); } + /// /// Test the property 'ConfidenceThreshold' /// @@ -148,8 +160,8 @@ public void ConfidenceThresholdTest() { instance.ConfidenceThreshold = new decimal(1.0); Assert.Equal(new decimal(1.0), instance.ConfidenceThreshold); - } + /// /// Test the property 'SensitivityLevel' /// @@ -158,28 +170,28 @@ public void SensitivityLevelTest() { instance.SensitivityLevel = new decimal(1.0); Assert.Equal(new decimal(1.0), instance.SensitivityLevel); - } + /// /// Test the property 'SpeechCompleteTimeoutMs' /// [Fact] public void SpeechCompleteTimeoutMsTest() { - instance.SpeechCompleteTimeoutMs = 1; - Assert.Equal(1, (int) instance.SpeechCompleteTimeoutMs); + Assert.Equal(1, (int)instance.SpeechCompleteTimeoutMs); } + /// /// Test the property 'SpeechIncompleteTimeoutMs' /// [Fact] public void SpeechIncompleteTimeoutMsTest() { - instance.SpeechIncompleteTimeoutMs = 1; - Assert.Equal(1, (int) instance.SpeechIncompleteTimeoutMs); + Assert.Equal(1, (int)instance.SpeechIncompleteTimeoutMs); } + /// /// Test the property 'PrivacyMode' /// @@ -187,251 +199,7 @@ public void SpeechIncompleteTimeoutMsTest() public void PrivacyModeTest() { instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - GetSpeech test1 = new GetSpeech("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.GrammarType = GrammarType.URL; - test1.GrammarFile = "TS"; - test1.GrammarRule = "TS"; - test1.PlayBeep = true; - List testList = new List(); - test1.Prompts = testList; - test1.NoInputTimeoutMs = 1; - test1.RecognitionTimeoutMs = 1; - test1.SpeechCompleteTimeoutMs = 1; - test1.SpeechIncompleteTimeoutMs = 1; - test1.PrivacyMode = true; - - GetSpeech test2 = new GetSpeech("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.GrammarType = GrammarType.URL; - test2.GrammarFile = "TS"; - test2.GrammarRule = "TS"; - test2.PlayBeep = true; - List testList2 = new List(); - test2.Prompts = testList2; - test2.NoInputTimeoutMs = 1; - test2.RecognitionTimeoutMs = 1; - test2.SpeechCompleteTimeoutMs = 1; - test2.SpeechIncompleteTimeoutMs = 1; - test2.PrivacyMode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - GetSpeech test1 = new GetSpeech("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.GrammarType = GrammarType.URL; - test1.GrammarFile = "TS"; - test1.GrammarRule = "TS"; - test1.PlayBeep = true; - List testList = new List(); - test1.Prompts = testList; - test1.NoInputTimeoutMs = 1; - test1.RecognitionTimeoutMs = 1; - test1.SpeechCompleteTimeoutMs = 1; - test1.SpeechIncompleteTimeoutMs = 1; - test1.PrivacyMode = true; - - GetSpeech test2 = new GetSpeech("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false, "TEST_STRING"); - test2.ActionUrl = "ts"; - test2.GrammarType = GrammarType.BUILT_IN; - test2.GrammarFile = "ts"; - test2.GrammarRule = "ts"; - test2.PlayBeep = false; - List testList2 = null; - test2.Prompts = testList2; - test2.NoInputTimeoutMs = 2; - test2.RecognitionTimeoutMs = 2; - test2.SpeechCompleteTimeoutMs = 2; - test2.SpeechIncompleteTimeoutMs = 2; - test2.PrivacyMode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - GetSpeech test1 = new GetSpeech("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.GrammarType = GrammarType.URL; - test1.GrammarFile = "TS"; - test1.GrammarRule = "TS"; - test1.PlayBeep = true; - List testList = new List(); - test1.Prompts = testList; - test1.NoInputTimeoutMs = 1; - test1.RecognitionTimeoutMs = 1; - test1.SpeechCompleteTimeoutMs = 1; - test1.SpeechIncompleteTimeoutMs = 1; - test1.PrivacyMode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - GetSpeech test1 = new GetSpeech("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.GrammarType = GrammarType.URL; - test1.GrammarFile = "TS"; - test1.GrammarRule = "TS"; - test1.PlayBeep = true; - List testList = new List(); - test1.Prompts = testList; - test1.NoInputTimeoutMs = 1; - test1.RecognitionTimeoutMs = 1; - test1.SpeechCompleteTimeoutMs = 1; - test1.SpeechIncompleteTimeoutMs = 1; - test1.PrivacyMode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - GetSpeech test1 = new GetSpeech("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.GrammarType = GrammarType.URL; - test1.GrammarFile = "TS"; - test1.GrammarRule = "TS"; - test1.PlayBeep = true; - List testList = new List(); - test1.Prompts = testList; - test1.NoInputTimeoutMs = 1; - test1.RecognitionTimeoutMs = 1; - test1.SpeechCompleteTimeoutMs = 1; - test1.SpeechIncompleteTimeoutMs = 1; - test1.PrivacyMode = true; - - GetSpeech test2 = new GetSpeech("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.GrammarType = GrammarType.URL; - test2.GrammarFile = "TS"; - test2.GrammarRule = "TS"; - test2.PlayBeep = true; - List testList2 = new List(); - test2.Prompts = testList2; - test2.NoInputTimeoutMs = 1; - test2.RecognitionTimeoutMs = 1; - test2.SpeechCompleteTimeoutMs = 1; - test2.SpeechIncompleteTimeoutMs = 1; - test2.PrivacyMode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - GetSpeech test1 = new GetSpeech("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.GrammarType = GrammarType.URL; - test1.GrammarFile = "TS"; - test1.GrammarRule = "TS"; - test1.PlayBeep = true; - List testList = new List(); - test1.Prompts = testList; - test1.NoInputTimeoutMs = 1; - test1.RecognitionTimeoutMs = 1; - test1.SpeechCompleteTimeoutMs = 1; - test1.SpeechIncompleteTimeoutMs = 1; - test1.PrivacyMode = true; - - GetSpeech test2 = new GetSpeech("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.GrammarType = GrammarType.URL; - test2.GrammarFile = "TS"; - test2.GrammarRule = "TS"; - test2.PlayBeep = true; - List testList2 = new List(); - test2.Prompts = testList2; - test2.NoInputTimeoutMs = 1; - test2.RecognitionTimeoutMs = 1; - test2.SpeechCompleteTimeoutMs = 1; - test2.SpeechIncompleteTimeoutMs = 1; - test2.PrivacyMode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - GetSpeech test1 = new GetSpeech("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.GrammarType = GrammarType.URL; - test1.GrammarFile = "TS"; - test1.GrammarRule = "TS"; - test1.PlayBeep = true; - List testList = new List(); - test1.Prompts = testList; - test1.NoInputTimeoutMs = 1; - test1.RecognitionTimeoutMs = 1; - test1.SpeechCompleteTimeoutMs = 1; - test1.SpeechIncompleteTimeoutMs = 1; - test1.PrivacyMode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - GetSpeech test2 = new GetSpeech("TEST_STRING", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, new decimal(1.0), new decimal(1.0), 1, 1, false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.GrammarType = GrammarType.URL; - test2.GrammarFile = "TS"; - test2.GrammarRule = "TS"; - test2.PlayBeep = true; - List testList2 = new List(); - test2.Prompts = testList2; - test2.NoInputTimeoutMs = 1; - test2.RecognitionTimeoutMs = 1; - test2.SpeechCompleteTimeoutMs = 1; - test2.SpeechIncompleteTimeoutMs = 1; - test2.PrivacyMode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.False(instance.PrivacyMode); } } } diff --git a/src/freeclimb.Test/Model/GetSpeechWebhookTests.cs b/src/freeclimb.Test/Model/GetSpeechWebhookTests.cs new file mode 100644 index 00000000..50d03388 --- /dev/null +++ b/src/freeclimb.Test/Model/GetSpeechWebhookTests.cs @@ -0,0 +1,279 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing GetSpeechWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class GetSpeechWebhookTests : IDisposable + { + private GetSpeechWebhook instance; + + public GetSpeechWebhookTests() + { + instance = new GetSpeechWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + reason: (GetSpeechReason)TestHelpers.getTestValue(typeof(GetSpeechReason)), + recognitionResult: (string)TestHelpers.getTestValue(typeof(string)), + confidence: (int)TestHelpers.getTestValue(typeof(int)), + parentCallId: (string)TestHelpers.getTestValue(typeof(string)), + completionReason: (string)TestHelpers.getTestValue(typeof(string)), + completionCause: (string)TestHelpers.getTestValue(typeof(string)), + mrcpCode: (int)TestHelpers.getTestValue(typeof(int)), + mrcpDiagnostic: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of GetSpeechWebhook + /// + [Fact] + public void GetSpeechWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'Reason' + /// + [Fact] + public void ReasonTest() + { + instance.Reason = GetSpeechReason.ERROR; + Assert.Equal(GetSpeechReason.ERROR, instance.Reason); + instance.Reason = GetSpeechReason.HANGUP; + Assert.Equal(GetSpeechReason.HANGUP, instance.Reason); + instance.Reason = GetSpeechReason.DIGIT; + Assert.Equal(GetSpeechReason.DIGIT, instance.Reason); + instance.Reason = GetSpeechReason.NO_INPUT; + Assert.Equal(GetSpeechReason.NO_INPUT, instance.Reason); + instance.Reason = GetSpeechReason.NO_MATCH; + Assert.Equal(GetSpeechReason.NO_MATCH, instance.Reason); + instance.Reason = GetSpeechReason.RECOGNITION; + Assert.Equal(GetSpeechReason.RECOGNITION, instance.Reason); + } + + /// + /// Test the property 'RecognitionResult' + /// + [Fact] + public void RecognitionResultTest() + { + instance.RecognitionResult = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecognitionResult); + } + + /// + /// Test the property 'Confidence' + /// + [Fact] + public void ConfidenceTest() + { + instance.Confidence = 1; + Assert.Equal(1, (int)instance.Confidence); + } + + /// + /// Test the property 'ParentCallId' + /// + [Fact] + public void ParentCallIdTest() + { + instance.ParentCallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ParentCallId); + } + + /// + /// Test the property 'CompletionReason' + /// + [Fact] + public void CompletionReasonTest() + { + instance.CompletionReason = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CompletionReason); + } + + /// + /// Test the property 'CompletionCause' + /// + [Fact] + public void CompletionCauseTest() + { + instance.CompletionCause = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CompletionCause); + } + + /// + /// Test the property 'MrcpCode' + /// + [Fact] + public void MrcpCodeTest() + { + instance.MrcpCode = 1; + Assert.Equal(1, (int)instance.MrcpCode); + } + + /// + /// Test the property 'MrcpDiagnostic' + /// + [Fact] + public void MrcpDiagnosticTest() + { + instance.MrcpDiagnostic = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.MrcpDiagnostic); + } + + [Fact] + public void TestDeserializeJsonToGetSpeechWebhook() + { + string payload = @"{ ""requestType"": ""getSpeech"" }"; + GetSpeechWebhook deserialized = GetSpeechWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("getSpeech", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/HangupAllOfTests.cs b/src/freeclimb.Test/Model/HangupAllOfTests.cs deleted file mode 100644 index cebeb902..00000000 --- a/src/freeclimb.Test/Model/HangupAllOfTests.cs +++ /dev/null @@ -1,182 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing HangupAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HangupAllOfTests - { - private HangupAllOf instance; - - public HangupAllOfTests() - { - - instance = new HangupAllOf("TEST_STRING"); - - } - - /// - /// Test an instance of HangupAllOf - /// - [Fact] - public void HangupAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Reason' - /// - [Fact] - public void ReasonTest() - { - instance.Reason = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Reason); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - HangupAllOf test1 = new HangupAllOf("TEST_STRING"); - test1.Reason = "TS"; - - HangupAllOf test2 = new HangupAllOf("TEST_STRING"); - test2.Reason = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - HangupAllOf test1 = new HangupAllOf("TEST_STRING"); - test1.Reason = "TS"; - - HangupAllOf test2 = new HangupAllOf("TEST_STRING"); - test2.Reason = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - HangupAllOf test1 = new HangupAllOf("TEST_STRING"); - test1.Reason = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - HangupAllOf test1 = new HangupAllOf("TEST_STRING"); - test1.Reason = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - HangupAllOf test1 = new HangupAllOf("TEST_STRING"); - test1.Reason = "TS"; - - HangupAllOf test2 = new HangupAllOf("TEST_STRING"); - test2.Reason = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - HangupAllOf test1 = new HangupAllOf("TEST_STRING"); - test1.Reason = "TS"; - - HangupAllOf test2 = new HangupAllOf("TEST_STRING"); - test2.Reason = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - HangupAllOf test1 = new HangupAllOf("TEST_STRING"); - test1.Reason = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - HangupAllOf test2 = new HangupAllOf("TEST_STRING"); - test2.Reason = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/HangupTests.cs b/src/freeclimb.Test/Model/HangupTests.cs index ccec2da3..81101669 100644 --- a/src/freeclimb.Test/Model/HangupTests.cs +++ b/src/freeclimb.Test/Model/HangupTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,19 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HangupTests + + public class HangupTests : IDisposable { private Hangup instance; public HangupTests() { - - instance = new Hangup("TEST_STRING", "TEST_STRING"); - + instance = new Hangup(reason: (string)TestHelpers.getTestValue(typeof(string))); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +55,6 @@ public void HangupInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Reason' /// @@ -65,118 +63,6 @@ public void ReasonTest() { instance.Reason = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Reason); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - Hangup test1 = new Hangup("TEST_STRING", "TEST_STRING"); - test1.Reason = "TS"; - - Hangup test2 = new Hangup("TEST_STRING", "TEST_STRING"); - test2.Reason = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - Hangup test1 = new Hangup("TEST_STRING", "TEST_STRING"); - test1.Reason = "TS"; - - Hangup test2 = new Hangup("TEST_STRING", "TEST_STRING"); - test2.Reason = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - Hangup test1 = new Hangup("TEST_STRING", "TEST_STRING"); - test1.Reason = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - Hangup test1 = new Hangup("TEST_STRING", "TEST_STRING"); - test1.Reason = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - Hangup test1 = new Hangup("TEST_STRING", "TEST_STRING"); - test1.Reason = "TS"; - - Hangup test2 = new Hangup("TEST_STRING", "TEST_STRING"); - test2.Reason = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - Hangup test1 = new Hangup("TEST_STRING", "TEST_STRING"); - test1.Reason = "TS"; - - Hangup test2 = new Hangup("TEST_STRING", "TEST_STRING"); - test2.Reason = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - Hangup test1 = new Hangup("TEST_STRING", "TEST_STRING"); - test1.Reason = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - Hangup test2 = new Hangup("TEST_STRING", "TEST_STRING"); - test2.Reason = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/InboundCallWebhookTests.cs b/src/freeclimb.Test/Model/InboundCallWebhookTests.cs new file mode 100644 index 00000000..caf27721 --- /dev/null +++ b/src/freeclimb.Test/Model/InboundCallWebhookTests.cs @@ -0,0 +1,192 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing InboundCallWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class InboundCallWebhookTests : IDisposable + { + private InboundCallWebhook instance; + + public InboundCallWebhookTests() + { + instance = new InboundCallWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + parentCallId: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboundCallWebhook + /// + [Fact] + public void InboundCallWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'ParentCallId' + /// + [Fact] + public void ParentCallIdTest() + { + instance.ParentCallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ParentCallId); + } + + [Fact] + public void TestDeserializeJsonToInboundCallWebhook() + { + string payload = @"{ ""requestType"": ""inboundCall"" }"; + InboundCallWebhook deserialized = InboundCallWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("inboundCall", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/IncomingNumberListAllOfTests.cs b/src/freeclimb.Test/Model/IncomingNumberListAllOfTests.cs deleted file mode 100644 index 1a3f941d..00000000 --- a/src/freeclimb.Test/Model/IncomingNumberListAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing IncomingNumberListAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class IncomingNumberListAllOfTests - { - private IncomingNumberListAllOf instance; - - public IncomingNumberListAllOfTests() - { - - instance = new IncomingNumberListAllOf(new List()); - - } - - /// - /// Test an instance of IncomingNumberListAllOf - /// - [Fact] - public void IncomingNumberListAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'IncomingPhoneNumbers' - /// - [Fact] - public void IncomingPhoneNumbersTest() - { - - List testList = new List(); - instance.IncomingPhoneNumbers = testList; - Assert.Equal(testList, instance.IncomingPhoneNumbers); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - IncomingNumberListAllOf test1 = new IncomingNumberListAllOf(new List()); - List testList = new List(); - test1.IncomingPhoneNumbers = testList; - - IncomingNumberListAllOf test2 = new IncomingNumberListAllOf(new List()); - List testList2 = new List(); - test2.IncomingPhoneNumbers = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - IncomingNumberListAllOf test1 = new IncomingNumberListAllOf(new List()); - List testList = new List(); - test1.IncomingPhoneNumbers = testList; - - IncomingNumberListAllOf test2 = new IncomingNumberListAllOf(new List()); - List testList2 = null; - test2.IncomingPhoneNumbers = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - IncomingNumberListAllOf test1 = new IncomingNumberListAllOf(new List()); - List testList = new List(); - test1.IncomingPhoneNumbers = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - IncomingNumberListAllOf test1 = new IncomingNumberListAllOf(new List()); - List testList = new List(); - test1.IncomingPhoneNumbers = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - IncomingNumberListAllOf test1 = new IncomingNumberListAllOf(new List()); - List testList = new List(); - test1.IncomingPhoneNumbers = testList; - - IncomingNumberListAllOf test2 = new IncomingNumberListAllOf(new List()); - List testList2 = new List(); - test2.IncomingPhoneNumbers = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - IncomingNumberListAllOf test1 = new IncomingNumberListAllOf(new List()); - List testList = new List(); - test1.IncomingPhoneNumbers = testList; - - IncomingNumberListAllOf test2 = new IncomingNumberListAllOf(new List()); - List testList2 = new List(); - test2.IncomingPhoneNumbers = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - IncomingNumberListAllOf test1 = new IncomingNumberListAllOf(new List()); - List testList = new List(); - test1.IncomingPhoneNumbers = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - IncomingNumberListAllOf test2 = new IncomingNumberListAllOf(new List()); - List testList2 = new List(); - test2.IncomingPhoneNumbers = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/IncomingNumberListTests.cs b/src/freeclimb.Test/Model/IncomingNumberListTests.cs index 49611d91..04c51215 100644 --- a/src/freeclimb.Test/Model/IncomingNumberListTests.cs +++ b/src/freeclimb.Test/Model/IncomingNumberListTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,29 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class IncomingNumberListTests + + public class IncomingNumberListTests : IDisposable { private IncomingNumberList instance; public IncomingNumberListTests() { - - instance = new IncomingNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new IncomingNumberList( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + incomingPhoneNumbers: (List) + TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +65,66 @@ public void IncomingNumberListInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +133,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'IncomingPhoneNumbers' /// [Fact] public void IncomingPhoneNumbersTest() { - List testList = new List(); instance.IncomingPhoneNumbers = testList; - Assert.Equal(testList, instance.IncomingPhoneNumbers); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - IncomingNumberList test1 = new IncomingNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.IncomingPhoneNumbers = testList; - - IncomingNumberList test2 = new IncomingNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.IncomingPhoneNumbers = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - IncomingNumberList test1 = new IncomingNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.IncomingPhoneNumbers = testList; - - IncomingNumberList test2 = new IncomingNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.IncomingPhoneNumbers = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - IncomingNumberList test1 = new IncomingNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.IncomingPhoneNumbers = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - IncomingNumberList test1 = new IncomingNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.IncomingPhoneNumbers = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - IncomingNumberList test1 = new IncomingNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.IncomingPhoneNumbers = testList; - - IncomingNumberList test2 = new IncomingNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.IncomingPhoneNumbers = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - IncomingNumberList test1 = new IncomingNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.IncomingPhoneNumbers = testList; - - IncomingNumberList test2 = new IncomingNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.IncomingPhoneNumbers = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - IncomingNumberList test1 = new IncomingNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.IncomingPhoneNumbers = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - IncomingNumberList test2 = new IncomingNumberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.IncomingPhoneNumbers = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.IncomingPhoneNumbers, testList); } } } diff --git a/src/freeclimb.Test/Model/IncomingNumberRequestTests.cs b/src/freeclimb.Test/Model/IncomingNumberRequestTests.cs index d6d34664..0f8e8063 100644 --- a/src/freeclimb.Test/Model/IncomingNumberRequestTests.cs +++ b/src/freeclimb.Test/Model/IncomingNumberRequestTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,23 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class IncomingNumberRequestTests + + public class IncomingNumberRequestTests : IDisposable { private IncomingNumberRequest instance; public IncomingNumberRequestTests() { - - instance = new IncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - + instance = new IncomingNumberRequest( + applicationId: (string)TestHelpers.getTestValue(typeof(string)), + alias: (string)TestHelpers.getTestValue(typeof(string)), + campaignId: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +59,6 @@ public void IncomingNumberRequestInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'ApplicationId' /// @@ -65,8 +67,8 @@ public void ApplicationIdTest() { instance.ApplicationId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ApplicationId); - } + /// /// Test the property 'Alias' /// @@ -75,8 +77,8 @@ public void AliasTest() { instance.Alias = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Alias); - } + /// /// Test the property 'CampaignId' /// @@ -85,142 +87,6 @@ public void CampaignIdTest() { instance.CampaignId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CampaignId); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - IncomingNumberRequest test1 = new IncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.CampaignId = "TS"; - - IncomingNumberRequest test2 = new IncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ApplicationId = "TS"; - test2.Alias = "TS"; - test2.CampaignId = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - IncomingNumberRequest test1 = new IncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.CampaignId = "TS"; - - IncomingNumberRequest test2 = new IncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ApplicationId = "ts"; - test2.Alias = "ts"; - test2.CampaignId = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - IncomingNumberRequest test1 = new IncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.CampaignId = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - IncomingNumberRequest test1 = new IncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.CampaignId = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - IncomingNumberRequest test1 = new IncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.CampaignId = "TS"; - - IncomingNumberRequest test2 = new IncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ApplicationId = "TS"; - test2.Alias = "TS"; - test2.CampaignId = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - IncomingNumberRequest test1 = new IncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.CampaignId = "TS"; - - IncomingNumberRequest test2 = new IncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ApplicationId = "TS"; - test2.Alias = "TS"; - test2.CampaignId = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - IncomingNumberRequest test1 = new IncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.ApplicationId = "TS"; - test1.Alias = "TS"; - test1.CampaignId = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - IncomingNumberRequest test2 = new IncomingNumberRequest("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.ApplicationId = "TS"; - test2.Alias = "TS"; - test2.CampaignId = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/IncomingNumberResultAllOfTests.cs b/src/freeclimb.Test/Model/IncomingNumberResultAllOfTests.cs deleted file mode 100644 index 60e66618..00000000 --- a/src/freeclimb.Test/Model/IncomingNumberResultAllOfTests.cs +++ /dev/null @@ -1,472 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing IncomingNumberResultAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class IncomingNumberResultAllOfTests - { - private IncomingNumberResultAllOf instance; - - public IncomingNumberResultAllOfTests() - { - - instance = new IncomingNumberResultAllOf(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - - } - - /// - /// Test an instance of IncomingNumberResultAllOf - /// - [Fact] - public void IncomingNumberResultAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Capabilities' - /// - [Fact] - public void CapabilitiesTest() - { - Capabilities testObject = new Capabilities(false, false, false, false, false); - instance.Capabilities = testObject; - Assert.Equal(testObject, instance.Capabilities); - - } - /// - /// Test the property 'CampaignId' - /// - [Fact] - public void CampaignIdTest() - { - instance.CampaignId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.CampaignId); - - } - /// - /// Test the property 'PhoneNumberId' - /// - [Fact] - public void PhoneNumberIdTest() - { - instance.PhoneNumberId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.PhoneNumberId); - - } - /// - /// Test the property 'AccountId' - /// - [Fact] - public void AccountIdTest() - { - instance.AccountId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.AccountId); - - } - /// - /// Test the property 'ApplicationId' - /// - [Fact] - public void ApplicationIdTest() - { - instance.ApplicationId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ApplicationId); - - } - /// - /// Test the property 'PhoneNumber' - /// - [Fact] - public void PhoneNumberTest() - { - instance.PhoneNumber = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.PhoneNumber); - - } - /// - /// Test the property 'Alias' - /// - [Fact] - public void AliasTest() - { - instance.Alias = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Alias); - - } - /// - /// Test the property 'Region' - /// - [Fact] - public void RegionTest() - { - instance.Region = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Region); - - } - /// - /// Test the property 'Country' - /// - [Fact] - public void CountryTest() - { - instance.Country = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Country); - - } - /// - /// Test the property 'VoiceEnabled' - /// - [Fact] - public void VoiceEnabledTest() - { - instance.VoiceEnabled = false; - Assert.Equal(false, instance.VoiceEnabled); - - } - /// - /// Test the property 'SmsEnabled' - /// - [Fact] - public void SmsEnabledTest() - { - instance.SmsEnabled = false; - Assert.Equal(false, instance.SmsEnabled); - - } - /// - /// Test the property 'Offnet' - /// - [Fact] - public void OffnetTest() - { - instance.Offnet = false; - Assert.Equal(false, instance.Offnet); - - } - /// - /// Test the property 'Tfn' - /// - [Fact] - public void TfnTest() - { - TFN testObject = new TFN("TEST_STRING"); - instance.Tfn = testObject; - Assert.Equal(testObject, instance.Tfn); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - IncomingNumberResultAllOf test1 = new IncomingNumberResultAllOf(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumberId = "TS"; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.Region = "TS"; - test1.Country = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Offnet = true; - TFN TfntestObject = new TFN("TEST_STRING"); - test1.Tfn = TfntestObject; - - IncomingNumberResultAllOf test2 = new IncomingNumberResultAllOf(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "TS"; - test2.PhoneNumberId = "TS"; - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.PhoneNumber = "TS"; - test2.Alias = "TS"; - test2.Region = "TS"; - test2.Country = "TS"; - test2.VoiceEnabled = true; - test2.SmsEnabled = true; - test2.Offnet = true; - TFN TfntestObject2 = new TFN("TEST_STRING"); - test2.Tfn = TfntestObject2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - IncomingNumberResultAllOf test1 = new IncomingNumberResultAllOf(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumberId = "TS"; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.Region = "TS"; - test1.Country = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Offnet = true; - TFN TfntestObject = new TFN("TEST_STRING"); - test1.Tfn = TfntestObject; - - IncomingNumberResultAllOf test2 = new IncomingNumberResultAllOf(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "ts"; - test2.PhoneNumberId = "ts"; - test2.AccountId = "ts"; - test2.ApplicationId = "ts"; - test2.PhoneNumber = "ts"; - test2.Alias = "ts"; - test2.Region = "ts"; - test2.Country = "ts"; - test2.VoiceEnabled = false; - test2.SmsEnabled = false; - test2.Offnet = false; - TFN TfntestObject2 = new TFN("TEST_STRING"); - test2.Tfn = TfntestObject2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - IncomingNumberResultAllOf test1 = new IncomingNumberResultAllOf(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumberId = "TS"; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.Region = "TS"; - test1.Country = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Offnet = true; - TFN TfntestObject = new TFN("TEST_STRING"); - test1.Tfn = TfntestObject; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - IncomingNumberResultAllOf test1 = new IncomingNumberResultAllOf(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumberId = "TS"; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.Region = "TS"; - test1.Country = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Offnet = true; - TFN TfntestObject = new TFN("TEST_STRING"); - test1.Tfn = TfntestObject; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - IncomingNumberResultAllOf test1 = new IncomingNumberResultAllOf(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumberId = "TS"; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.Region = "TS"; - test1.Country = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Offnet = true; - TFN TfntestObject = new TFN("TEST_STRING"); - test1.Tfn = TfntestObject; - - IncomingNumberResultAllOf test2 = new IncomingNumberResultAllOf(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "TS"; - test2.PhoneNumberId = "TS"; - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.PhoneNumber = "TS"; - test2.Alias = "TS"; - test2.Region = "TS"; - test2.Country = "TS"; - test2.VoiceEnabled = true; - test2.SmsEnabled = true; - test2.Offnet = true; - TFN TfntestObject2 = new TFN("TEST_STRING"); - test2.Tfn = TfntestObject2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - IncomingNumberResultAllOf test1 = new IncomingNumberResultAllOf(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumberId = "TS"; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.Region = "TS"; - test1.Country = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Offnet = true; - TFN TfntestObject = new TFN("TEST_STRING"); - test1.Tfn = TfntestObject; - - IncomingNumberResultAllOf test2 = new IncomingNumberResultAllOf(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "TS"; - test2.PhoneNumberId = "TS"; - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.PhoneNumber = "TS"; - test2.Alias = "TS"; - test2.Region = "TS"; - test2.Country = "TS"; - test2.VoiceEnabled = true; - test2.SmsEnabled = true; - test2.Offnet = true; - TFN TfntestObject2 = new TFN("TEST_STRING"); - test2.Tfn = TfntestObject2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - IncomingNumberResultAllOf test1 = new IncomingNumberResultAllOf(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumberId = "TS"; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.Region = "TS"; - test1.Country = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Offnet = true; - TFN TfntestObject = new TFN("TEST_STRING"); - test1.Tfn = TfntestObject; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - IncomingNumberResultAllOf test2 = new IncomingNumberResultAllOf(new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "TS"; - test2.PhoneNumberId = "TS"; - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.PhoneNumber = "TS"; - test2.Alias = "TS"; - test2.Region = "TS"; - test2.Country = "TS"; - test2.VoiceEnabled = true; - test2.SmsEnabled = true; - test2.Offnet = true; - TFN TfntestObject2 = new TFN("TEST_STRING"); - test2.Tfn = TfntestObject2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/IncomingNumberResultTests.cs b/src/freeclimb.Test/Model/IncomingNumberResultTests.cs index cd2678a0..3309562f 100644 --- a/src/freeclimb.Test/Model/IncomingNumberResultTests.cs +++ b/src/freeclimb.Test/Model/IncomingNumberResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,37 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class IncomingNumberResultTests + + public class IncomingNumberResultTests : IDisposable { private IncomingNumberResult instance; public IncomingNumberResultTests() { - - instance = new IncomingNumberResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - + instance = new IncomingNumberResult( + uri: (string)TestHelpers.getTestValue(typeof(string)), + dateCreated: (string)TestHelpers.getTestValue(typeof(string)), + dateUpdated: (string)TestHelpers.getTestValue(typeof(string)), + revision: (int)TestHelpers.getTestValue(typeof(int)), + capabilities: (Capabilities)TestHelpers.getTestValue(typeof(Capabilities)), + campaignId: (string)TestHelpers.getTestValue(typeof(string)), + phoneNumberId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + applicationId: (string)TestHelpers.getTestValue(typeof(string)), + phoneNumber: (string)TestHelpers.getTestValue(typeof(string)), + alias: (string)TestHelpers.getTestValue(typeof(string)), + region: (string)TestHelpers.getTestValue(typeof(string)), + country: (string)TestHelpers.getTestValue(typeof(string)), + voiceEnabled: (bool?)TestHelpers.getTestValue(typeof(bool?)), + smsEnabled: (bool?)TestHelpers.getTestValue(typeof(bool?)), + offnet: (bool?)TestHelpers.getTestValue(typeof(bool?)), + tfn: (TFN)TestHelpers.getTestValue(typeof(TFN)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +73,6 @@ public void IncomingNumberResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Uri' /// @@ -65,8 +81,8 @@ public void UriTest() { instance.Uri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Uri); - } + /// /// Test the property 'DateCreated' /// @@ -75,8 +91,8 @@ public void DateCreatedTest() { instance.DateCreated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateCreated); - } + /// /// Test the property 'DateUpdated' /// @@ -85,29 +101,29 @@ public void DateUpdatedTest() { instance.DateUpdated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateUpdated); - } + /// /// Test the property 'Revision' /// [Fact] public void RevisionTest() { - instance.Revision = 1; - Assert.Equal(1, (int) instance.Revision); + Assert.Equal(1, (int)instance.Revision); } + /// /// Test the property 'Capabilities' /// [Fact] public void CapabilitiesTest() { - Capabilities testObject = new Capabilities(false, false, false, false, false); + Capabilities testObject = (Capabilities)TestHelpers.getTestValue(typeof(Capabilities)); instance.Capabilities = testObject; Assert.Equal(testObject, instance.Capabilities); - } + /// /// Test the property 'CampaignId' /// @@ -116,8 +132,8 @@ public void CampaignIdTest() { instance.CampaignId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CampaignId); - } + /// /// Test the property 'PhoneNumberId' /// @@ -126,8 +142,8 @@ public void PhoneNumberIdTest() { instance.PhoneNumberId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.PhoneNumberId); - } + /// /// Test the property 'AccountId' /// @@ -136,8 +152,8 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } + /// /// Test the property 'ApplicationId' /// @@ -146,8 +162,8 @@ public void ApplicationIdTest() { instance.ApplicationId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ApplicationId); - } + /// /// Test the property 'PhoneNumber' /// @@ -156,8 +172,8 @@ public void PhoneNumberTest() { instance.PhoneNumber = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.PhoneNumber); - } + /// /// Test the property 'Alias' /// @@ -166,8 +182,8 @@ public void AliasTest() { instance.Alias = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Alias); - } + /// /// Test the property 'Region' /// @@ -176,8 +192,8 @@ public void RegionTest() { instance.Region = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Region); - } + /// /// Test the property 'Country' /// @@ -186,8 +202,8 @@ public void CountryTest() { instance.Country = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Country); - } + /// /// Test the property 'VoiceEnabled' /// @@ -195,9 +211,9 @@ public void CountryTest() public void VoiceEnabledTest() { instance.VoiceEnabled = false; - Assert.Equal(false, instance.VoiceEnabled); - + Assert.False(instance.VoiceEnabled); } + /// /// Test the property 'SmsEnabled' /// @@ -205,9 +221,9 @@ public void VoiceEnabledTest() public void SmsEnabledTest() { instance.SmsEnabled = false; - Assert.Equal(false, instance.SmsEnabled); - + Assert.False(instance.SmsEnabled); } + /// /// Test the property 'Offnet' /// @@ -215,346 +231,18 @@ public void SmsEnabledTest() public void OffnetTest() { instance.Offnet = false; - Assert.Equal(false, instance.Offnet); - + Assert.False(instance.Offnet); } + /// /// Test the property 'Tfn' /// [Fact] public void TfnTest() { - TFN testObject = new TFN("TEST_STRING"); + TFN testObject = (TFN)TestHelpers.getTestValue(typeof(TFN)); instance.Tfn = testObject; Assert.Equal(testObject, instance.Tfn); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - IncomingNumberResult test1 = new IncomingNumberResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumberId = "TS"; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.Region = "TS"; - test1.Country = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Offnet = true; - TFN TfntestObject = new TFN("TEST_STRING"); - test1.Tfn = TfntestObject; - - IncomingNumberResult test2 = new IncomingNumberResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "TS"; - test2.PhoneNumberId = "TS"; - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.PhoneNumber = "TS"; - test2.Alias = "TS"; - test2.Region = "TS"; - test2.Country = "TS"; - test2.VoiceEnabled = true; - test2.SmsEnabled = true; - test2.Offnet = true; - TFN TfntestObject2 = new TFN("TEST_STRING"); - test2.Tfn = TfntestObject2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - IncomingNumberResult test1 = new IncomingNumberResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumberId = "TS"; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.Region = "TS"; - test1.Country = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Offnet = true; - TFN TfntestObject = new TFN("TEST_STRING"); - test1.Tfn = TfntestObject; - - IncomingNumberResult test2 = new IncomingNumberResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - test2.Uri = "ts"; - test2.DateCreated = "ts"; - test2.DateUpdated = "ts"; - test2.Revision = 2; - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "ts"; - test2.PhoneNumberId = "ts"; - test2.AccountId = "ts"; - test2.ApplicationId = "ts"; - test2.PhoneNumber = "ts"; - test2.Alias = "ts"; - test2.Region = "ts"; - test2.Country = "ts"; - test2.VoiceEnabled = false; - test2.SmsEnabled = false; - test2.Offnet = false; - TFN TfntestObject2 = new TFN("TEST_STRING"); - test2.Tfn = TfntestObject2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - IncomingNumberResult test1 = new IncomingNumberResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumberId = "TS"; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.Region = "TS"; - test1.Country = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Offnet = true; - TFN TfntestObject = new TFN("TEST_STRING"); - test1.Tfn = TfntestObject; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - IncomingNumberResult test1 = new IncomingNumberResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumberId = "TS"; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.Region = "TS"; - test1.Country = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Offnet = true; - TFN TfntestObject = new TFN("TEST_STRING"); - test1.Tfn = TfntestObject; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - IncomingNumberResult test1 = new IncomingNumberResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumberId = "TS"; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.Region = "TS"; - test1.Country = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Offnet = true; - TFN TfntestObject = new TFN("TEST_STRING"); - test1.Tfn = TfntestObject; - - IncomingNumberResult test2 = new IncomingNumberResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "TS"; - test2.PhoneNumberId = "TS"; - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.PhoneNumber = "TS"; - test2.Alias = "TS"; - test2.Region = "TS"; - test2.Country = "TS"; - test2.VoiceEnabled = true; - test2.SmsEnabled = true; - test2.Offnet = true; - TFN TfntestObject2 = new TFN("TEST_STRING"); - test2.Tfn = TfntestObject2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - IncomingNumberResult test1 = new IncomingNumberResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumberId = "TS"; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.Region = "TS"; - test1.Country = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Offnet = true; - TFN TfntestObject = new TFN("TEST_STRING"); - test1.Tfn = TfntestObject; - - IncomingNumberResult test2 = new IncomingNumberResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "TS"; - test2.PhoneNumberId = "TS"; - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.PhoneNumber = "TS"; - test2.Alias = "TS"; - test2.Region = "TS"; - test2.Country = "TS"; - test2.VoiceEnabled = true; - test2.SmsEnabled = true; - test2.Offnet = true; - TFN TfntestObject2 = new TFN("TEST_STRING"); - test2.Tfn = TfntestObject2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - IncomingNumberResult test1 = new IncomingNumberResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - Capabilities CapabilitiestestObject = new Capabilities(false, false, false, false, false); - test1.Capabilities = CapabilitiestestObject; - test1.CampaignId = "TS"; - test1.PhoneNumberId = "TS"; - test1.AccountId = "TS"; - test1.ApplicationId = "TS"; - test1.PhoneNumber = "TS"; - test1.Alias = "TS"; - test1.Region = "TS"; - test1.Country = "TS"; - test1.VoiceEnabled = true; - test1.SmsEnabled = true; - test1.Offnet = true; - TFN TfntestObject = new TFN("TEST_STRING"); - test1.Tfn = TfntestObject; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - IncomingNumberResult test2 = new IncomingNumberResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, new Capabilities(false, false, false, false, false), "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, new TFN("TEST_STRING")); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - Capabilities CapabilitiestestObject2 = new Capabilities(false, false, false, false, false); - test2.Capabilities = CapabilitiestestObject2; - test2.CampaignId = "TS"; - test2.PhoneNumberId = "TS"; - test2.AccountId = "TS"; - test2.ApplicationId = "TS"; - test2.PhoneNumber = "TS"; - test2.Alias = "TS"; - test2.Region = "TS"; - test2.Country = "TS"; - test2.VoiceEnabled = true; - test2.SmsEnabled = true; - test2.Offnet = true; - TFN TfntestObject2 = new TFN("TEST_STRING"); - test2.Tfn = TfntestObject2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/LeaveConferenceWebhookTests.cs b/src/freeclimb.Test/Model/LeaveConferenceWebhookTests.cs new file mode 100644 index 00000000..8ce4de23 --- /dev/null +++ b/src/freeclimb.Test/Model/LeaveConferenceWebhookTests.cs @@ -0,0 +1,181 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing LeaveConferenceWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class LeaveConferenceWebhookTests : IDisposable + { + private LeaveConferenceWebhook instance; + + public LeaveConferenceWebhookTests() + { + instance = new LeaveConferenceWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of LeaveConferenceWebhook + /// + [Fact] + public void LeaveConferenceWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + [Fact] + public void TestDeserializeJsonToLeaveConferenceWebhook() + { + string payload = @"{ ""requestType"": ""leaveConference"" }"; + LeaveConferenceWebhook deserialized = LeaveConferenceWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("leaveConference", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/LogListAllOfTests.cs b/src/freeclimb.Test/Model/LogListAllOfTests.cs deleted file mode 100644 index 69822a98..00000000 --- a/src/freeclimb.Test/Model/LogListAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing LogListAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class LogListAllOfTests - { - private LogListAllOf instance; - - public LogListAllOfTests() - { - - instance = new LogListAllOf(new List()); - - } - - /// - /// Test an instance of LogListAllOf - /// - [Fact] - public void LogListAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Logs' - /// - [Fact] - public void LogsTest() - { - - List testList = new List(); - instance.Logs = testList; - Assert.Equal(testList, instance.Logs); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - LogListAllOf test1 = new LogListAllOf(new List()); - List testList = new List(); - test1.Logs = testList; - - LogListAllOf test2 = new LogListAllOf(new List()); - List testList2 = new List(); - test2.Logs = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - LogListAllOf test1 = new LogListAllOf(new List()); - List testList = new List(); - test1.Logs = testList; - - LogListAllOf test2 = new LogListAllOf(new List()); - List testList2 = null; - test2.Logs = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - LogListAllOf test1 = new LogListAllOf(new List()); - List testList = new List(); - test1.Logs = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - LogListAllOf test1 = new LogListAllOf(new List()); - List testList = new List(); - test1.Logs = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - LogListAllOf test1 = new LogListAllOf(new List()); - List testList = new List(); - test1.Logs = testList; - - LogListAllOf test2 = new LogListAllOf(new List()); - List testList2 = new List(); - test2.Logs = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - LogListAllOf test1 = new LogListAllOf(new List()); - List testList = new List(); - test1.Logs = testList; - - LogListAllOf test2 = new LogListAllOf(new List()); - List testList2 = new List(); - test2.Logs = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - LogListAllOf test1 = new LogListAllOf(new List()); - List testList = new List(); - test1.Logs = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - LogListAllOf test2 = new LogListAllOf(new List()); - List testList2 = new List(); - test2.Logs = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/LogListTests.cs b/src/freeclimb.Test/Model/LogListTests.cs index 51c140e3..99ab8dbf 100644 --- a/src/freeclimb.Test/Model/LogListTests.cs +++ b/src/freeclimb.Test/Model/LogListTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,28 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class LogListTests + + public class LogListTests : IDisposable { private LogList instance; public LogListTests() { - - instance = new LogList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new LogList( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + logs: (List)TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +64,66 @@ public void LogListInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +132,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'Logs' /// [Fact] public void LogsTest() { - List testList = new List(); instance.Logs = testList; - Assert.Equal(testList, instance.Logs); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - LogList test1 = new LogList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Logs = testList; - - LogList test2 = new LogList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Logs = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - LogList test1 = new LogList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Logs = testList; - - LogList test2 = new LogList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.Logs = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - LogList test1 = new LogList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Logs = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - LogList test1 = new LogList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Logs = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - LogList test1 = new LogList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Logs = testList; - - LogList test2 = new LogList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Logs = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - LogList test1 = new LogList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Logs = testList; - - LogList test2 = new LogList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Logs = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - LogList test1 = new LogList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Logs = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - LogList test2 = new LogList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Logs = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.Logs, testList); } } } diff --git a/src/freeclimb.Test/Model/LogResultTests.cs b/src/freeclimb.Test/Model/LogResultTests.cs index e0c3b043..494bba44 100644 --- a/src/freeclimb.Test/Model/LogResultTests.cs +++ b/src/freeclimb.Test/Model/LogResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,27 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class LogResultTests + + public class LogResultTests : IDisposable { private LogResult instance; public LogResultTests() { - - instance = new LogResult(1, LogLevel.INFO, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - + instance = new LogResult( + timestamp: (int?)TestHelpers.getTestValue(typeof(int?)), + level: (LogLevel)TestHelpers.getTestValue(typeof(LogLevel)), + requestId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + message: (string)TestHelpers.getTestValue(typeof(string)), + metadata: (Object)TestHelpers.getTestValue(typeof(Object)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,17 +63,16 @@ public void LogResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Timestamp' /// [Fact] public void TimestampTest() { - instance.Timestamp = 1; - Assert.Equal(1, (int) instance.Timestamp); + Assert.Equal(1, (int)instance.Timestamp); } + /// /// Test the property 'Level' /// @@ -74,13 +80,13 @@ public void TimestampTest() public void LevelTest() { instance.Level = LogLevel.INFO; - Assert.Equal(instance.Level,LogLevel.INFO); + Assert.Equal(LogLevel.INFO, instance.Level); instance.Level = LogLevel.WARNING; - Assert.Equal(instance.Level,LogLevel.WARNING); + Assert.Equal(LogLevel.WARNING, instance.Level); instance.Level = LogLevel.ERROR; - Assert.Equal(instance.Level,LogLevel.ERROR); - + Assert.Equal(LogLevel.ERROR, instance.Level); } + /// /// Test the property 'RequestId' /// @@ -89,8 +95,8 @@ public void RequestIdTest() { instance.RequestId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.RequestId); - } + /// /// Test the property 'AccountId' /// @@ -99,8 +105,8 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } + /// /// Test the property 'CallId' /// @@ -109,8 +115,8 @@ public void CallIdTest() { instance.CallId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CallId); - } + /// /// Test the property 'Message' /// @@ -119,8 +125,8 @@ public void MessageTest() { instance.Message = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Message); - } + /// /// Test the property 'Metadata' /// @@ -130,202 +136,6 @@ public void MetadataTest() object testObject = new object(); instance.Metadata = testObject; Assert.Equal(testObject, instance.Metadata); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - LogResult test1 = new LogResult(1, LogLevel.INFO, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.Timestamp = 1; - test1.Level = LogLevel.INFO; - test1.RequestId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.Message = "TS"; - object testObject = new object(); - test1.Metadata = testObject; - - LogResult test2 = new LogResult(1, LogLevel.INFO, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.Timestamp = 1; - test2.Level = LogLevel.INFO; - test2.RequestId = "TS"; - test2.AccountId = "TS"; - test2.CallId = "TS"; - test2.Message = "TS"; - object testObject2 = testObject; - test2.Metadata = testObject2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - LogResult test1 = new LogResult(1, LogLevel.INFO, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.Timestamp = 1; - test1.Level = LogLevel.INFO; - test1.RequestId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.Message = "TS"; - object testObject = new object(); - test1.Metadata = testObject; - - LogResult test2 = new LogResult(1, LogLevel.INFO, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.Timestamp = 2; - test2.Level = LogLevel.WARNING; - test2.RequestId = "ts"; - test2.AccountId = "ts"; - test2.CallId = "ts"; - test2.Message = "ts"; - object testObject2 = new object(); - test2.Metadata = testObject2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - LogResult test1 = new LogResult(1, LogLevel.INFO, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.Timestamp = 1; - test1.Level = LogLevel.INFO; - test1.RequestId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.Message = "TS"; - object testObject = new object(); - test1.Metadata = testObject; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - LogResult test1 = new LogResult(1, LogLevel.INFO, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.Timestamp = 1; - test1.Level = LogLevel.INFO; - test1.RequestId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.Message = "TS"; - object testObject = new object(); - test1.Metadata = testObject; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - LogResult test1 = new LogResult(1, LogLevel.INFO, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.Timestamp = 1; - test1.Level = LogLevel.INFO; - test1.RequestId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.Message = "TS"; - object testObject = new object(); - test1.Metadata = testObject; - - LogResult test2 = new LogResult(1, LogLevel.INFO, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.Timestamp = 1; - test2.Level = LogLevel.INFO; - test2.RequestId = "TS"; - test2.AccountId = "TS"; - test2.CallId = "TS"; - test2.Message = "TS"; - object testObject2 = new object(); - test2.Metadata = testObject2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - LogResult test1 = new LogResult(1, LogLevel.INFO, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.Timestamp = 1; - test1.Level = LogLevel.INFO; - test1.RequestId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.Message = "TS"; - object testObject = new object(); - test1.Metadata = testObject; - - LogResult test2 = new LogResult(1, LogLevel.INFO, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.Timestamp = 1; - test2.Level = LogLevel.INFO; - test2.RequestId = "TS"; - test2.AccountId = "TS"; - test2.CallId = "TS"; - test2.Message = "TS"; - object testObject2 = testObject; - test2.Metadata = testObject2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - LogResult test1 = new LogResult(1, LogLevel.INFO, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test1.Timestamp = 1; - test1.Level = LogLevel.INFO; - test1.RequestId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.Message = "TS"; - object testObject = new object(); - test1.Metadata = testObject; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - LogResult test2 = new LogResult(1, LogLevel.INFO, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new object()); - test2.Timestamp = 1; - test2.Level = LogLevel.INFO; - test2.RequestId = "TS"; - test2.AccountId = "TS"; - test2.CallId = "TS"; - test2.Message = "TS"; - object testObject2 = testObject; - test2.Metadata = testObject2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/MachineDetectedWebhookTests.cs b/src/freeclimb.Test/Model/MachineDetectedWebhookTests.cs new file mode 100644 index 00000000..be6eda18 --- /dev/null +++ b/src/freeclimb.Test/Model/MachineDetectedWebhookTests.cs @@ -0,0 +1,205 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing MachineDetectedWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class MachineDetectedWebhookTests : IDisposable + { + private MachineDetectedWebhook instance; + + public MachineDetectedWebhookTests() + { + instance = new MachineDetectedWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + parentCallId: (string)TestHelpers.getTestValue(typeof(string)), + machineType: (MachineType)TestHelpers.getTestValue(typeof(MachineType)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MachineDetectedWebhook + /// + [Fact] + public void MachineDetectedWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'ParentCallId' + /// + [Fact] + public void ParentCallIdTest() + { + instance.ParentCallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ParentCallId); + } + + /// + /// Test the property 'MachineType' + /// + [Fact] + public void MachineTypeTest() + { + instance.MachineType = MachineType.ANSWERING_MACHINE; + Assert.Equal(MachineType.ANSWERING_MACHINE, instance.MachineType); + instance.MachineType = MachineType.FAX_MODEM; + Assert.Equal(MachineType.FAX_MODEM, instance.MachineType); + } + + [Fact] + public void TestDeserializeJsonToMachineDetectedWebhook() + { + string payload = @"{ ""requestType"": ""machineDetected"" }"; + MachineDetectedWebhook deserialized = MachineDetectedWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("machineDetected", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/MakeCallRequestTests.cs b/src/freeclimb.Test/Model/MakeCallRequestTests.cs index 13ede745..52e6c42a 100644 --- a/src/freeclimb.Test/Model/MakeCallRequestTests.cs +++ b/src/freeclimb.Test/Model/MakeCallRequestTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,30 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class MakeCallRequestTests + + public class MakeCallRequestTests : IDisposable { private MakeCallRequest instance; public MakeCallRequestTests() { - - instance = new MakeCallRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", false, "TEST_STRING"); - + instance = new MakeCallRequest( + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + applicationId: (string)TestHelpers.getTestValue(typeof(string)), + sendDigits: (string)TestHelpers.getTestValue(typeof(string)), + ifMachine: (string)TestHelpers.getTestValue(typeof(string)), + ifMachineUrl: (string)TestHelpers.getTestValue(typeof(string)), + timeout: (int)TestHelpers.getTestValue(typeof(int)), + parentCallId: (string)TestHelpers.getTestValue(typeof(string)), + privacyMode: (bool)TestHelpers.getTestValue(typeof(bool)), + callConnectUrl: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +66,6 @@ public void MakeCallRequestInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'From' /// @@ -65,8 +74,8 @@ public void FromTest() { instance.From = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.From); - } + /// /// Test the property 'To' /// @@ -75,8 +84,8 @@ public void ToTest() { instance.To = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.To); - } + /// /// Test the property 'ApplicationId' /// @@ -85,8 +94,8 @@ public void ApplicationIdTest() { instance.ApplicationId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ApplicationId); - } + /// /// Test the property 'SendDigits' /// @@ -95,8 +104,8 @@ public void SendDigitsTest() { instance.SendDigits = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.SendDigits); - } + /// /// Test the property 'IfMachine' /// @@ -105,8 +114,8 @@ public void IfMachineTest() { instance.IfMachine = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.IfMachine); - } + /// /// Test the property 'IfMachineUrl' /// @@ -115,18 +124,18 @@ public void IfMachineUrlTest() { instance.IfMachineUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.IfMachineUrl); - } + /// /// Test the property 'Timeout' /// [Fact] public void TimeoutTest() { - instance.Timeout = 1; - Assert.Equal(1, (int) instance.Timeout); + Assert.Equal(1, (int)instance.Timeout); } + /// /// Test the property 'ParentCallId' /// @@ -135,8 +144,8 @@ public void ParentCallIdTest() { instance.ParentCallId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ParentCallId); - } + /// /// Test the property 'PrivacyMode' /// @@ -144,9 +153,9 @@ public void ParentCallIdTest() public void PrivacyModeTest() { instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - + Assert.False(instance.PrivacyMode); } + /// /// Test the property 'CallConnectUrl' /// @@ -155,226 +164,6 @@ public void CallConnectUrlTest() { instance.CallConnectUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CallConnectUrl); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - MakeCallRequest test1 = new MakeCallRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", false, "TEST_STRING"); - test1.From = "TS"; - test1.To = "TS"; - test1.ApplicationId = "TS"; - test1.SendDigits = "TS"; - test1.IfMachine = "TS"; - test1.IfMachineUrl = "TS"; - test1.Timeout = 1; - test1.ParentCallId = "TS"; - test1.PrivacyMode = true; - test1.CallConnectUrl = "TS"; - - MakeCallRequest test2 = new MakeCallRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", false, "TEST_STRING"); - test2.From = "TS"; - test2.To = "TS"; - test2.ApplicationId = "TS"; - test2.SendDigits = "TS"; - test2.IfMachine = "TS"; - test2.IfMachineUrl = "TS"; - test2.Timeout = 1; - test2.ParentCallId = "TS"; - test2.PrivacyMode = true; - test2.CallConnectUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - MakeCallRequest test1 = new MakeCallRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", false, "TEST_STRING"); - test1.From = "TS"; - test1.To = "TS"; - test1.ApplicationId = "TS"; - test1.SendDigits = "TS"; - test1.IfMachine = "TS"; - test1.IfMachineUrl = "TS"; - test1.Timeout = 1; - test1.ParentCallId = "TS"; - test1.PrivacyMode = true; - test1.CallConnectUrl = "TS"; - - MakeCallRequest test2 = new MakeCallRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", false, "TEST_STRING"); - test2.From = "ts"; - test2.To = "ts"; - test2.ApplicationId = "ts"; - test2.SendDigits = "ts"; - test2.IfMachine = "ts"; - test2.IfMachineUrl = "ts"; - test2.Timeout = 2; - test2.ParentCallId = "ts"; - test2.PrivacyMode = false; - test2.CallConnectUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - MakeCallRequest test1 = new MakeCallRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", false, "TEST_STRING"); - test1.From = "TS"; - test1.To = "TS"; - test1.ApplicationId = "TS"; - test1.SendDigits = "TS"; - test1.IfMachine = "TS"; - test1.IfMachineUrl = "TS"; - test1.Timeout = 1; - test1.ParentCallId = "TS"; - test1.PrivacyMode = true; - test1.CallConnectUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - MakeCallRequest test1 = new MakeCallRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", false, "TEST_STRING"); - test1.From = "TS"; - test1.To = "TS"; - test1.ApplicationId = "TS"; - test1.SendDigits = "TS"; - test1.IfMachine = "TS"; - test1.IfMachineUrl = "TS"; - test1.Timeout = 1; - test1.ParentCallId = "TS"; - test1.PrivacyMode = true; - test1.CallConnectUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - MakeCallRequest test1 = new MakeCallRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", false, "TEST_STRING"); - test1.From = "TS"; - test1.To = "TS"; - test1.ApplicationId = "TS"; - test1.SendDigits = "TS"; - test1.IfMachine = "TS"; - test1.IfMachineUrl = "TS"; - test1.Timeout = 1; - test1.ParentCallId = "TS"; - test1.PrivacyMode = true; - test1.CallConnectUrl = "TS"; - - MakeCallRequest test2 = new MakeCallRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", false, "TEST_STRING"); - test2.From = "TS"; - test2.To = "TS"; - test2.ApplicationId = "TS"; - test2.SendDigits = "TS"; - test2.IfMachine = "TS"; - test2.IfMachineUrl = "TS"; - test2.Timeout = 1; - test2.ParentCallId = "TS"; - test2.PrivacyMode = true; - test2.CallConnectUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - MakeCallRequest test1 = new MakeCallRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", false, "TEST_STRING"); - test1.From = "TS"; - test1.To = "TS"; - test1.ApplicationId = "TS"; - test1.SendDigits = "TS"; - test1.IfMachine = "TS"; - test1.IfMachineUrl = "TS"; - test1.Timeout = 1; - test1.ParentCallId = "TS"; - test1.PrivacyMode = true; - test1.CallConnectUrl = "TS"; - - MakeCallRequest test2 = new MakeCallRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", false, "TEST_STRING"); - test2.From = "TS"; - test2.To = "TS"; - test2.ApplicationId = "TS"; - test2.SendDigits = "TS"; - test2.IfMachine = "TS"; - test2.IfMachineUrl = "TS"; - test2.Timeout = 1; - test2.ParentCallId = "TS"; - test2.PrivacyMode = true; - test2.CallConnectUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - MakeCallRequest test1 = new MakeCallRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", false, "TEST_STRING"); - test1.From = "TS"; - test1.To = "TS"; - test1.ApplicationId = "TS"; - test1.SendDigits = "TS"; - test1.IfMachine = "TS"; - test1.IfMachineUrl = "TS"; - test1.Timeout = 1; - test1.ParentCallId = "TS"; - test1.PrivacyMode = true; - test1.CallConnectUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - MakeCallRequest test2 = new MakeCallRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", false, "TEST_STRING"); - test2.From = "TS"; - test2.To = "TS"; - test2.ApplicationId = "TS"; - test2.SendDigits = "TS"; - test2.IfMachine = "TS"; - test2.IfMachineUrl = "TS"; - test2.Timeout = 1; - test2.ParentCallId = "TS"; - test2.PrivacyMode = true; - test2.CallConnectUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/MessageDeliveryWebhookTests.cs b/src/freeclimb.Test/Model/MessageDeliveryWebhookTests.cs new file mode 100644 index 00000000..d159f7df --- /dev/null +++ b/src/freeclimb.Test/Model/MessageDeliveryWebhookTests.cs @@ -0,0 +1,174 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing MessageDeliveryWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class MessageDeliveryWebhookTests : IDisposable + { + private MessageDeliveryWebhook instance; + + public MessageDeliveryWebhookTests() + { + instance = new MessageDeliveryWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + text: (string)TestHelpers.getTestValue(typeof(string)), + direction: (string)TestHelpers.getTestValue(typeof(string)), + applicationId: (string)TestHelpers.getTestValue(typeof(string)), + status: (string)TestHelpers.getTestValue(typeof(string)), + phoneNumberId: (string)TestHelpers.getTestValue(typeof(string)), + uri: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MessageDeliveryWebhook + /// + [Fact] + public void MessageDeliveryWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'Text' + /// + [Fact] + public void TextTest() + { + instance.Text = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.Text); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.Direction); + } + + /// + /// Test the property 'ApplicationId' + /// + [Fact] + public void ApplicationIdTest() + { + instance.ApplicationId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ApplicationId); + } + + /// + /// Test the property 'Status' + /// + [Fact] + public void StatusTest() + { + instance.Status = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.Status); + } + + /// + /// Test the property 'PhoneNumberId' + /// + [Fact] + public void PhoneNumberIdTest() + { + instance.PhoneNumberId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.PhoneNumberId); + } + + /// + /// Test the property 'Uri' + /// + [Fact] + public void UriTest() + { + instance.Uri = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.Uri); + } + + [Fact] + public void TestDeserializeJsonToMessageDeliveryWebhook() + { + string payload = @"{ ""requestType"": ""messageDelivery"" }"; + MessageDeliveryWebhook deserialized = MessageDeliveryWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("messageDelivery", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/MessageRequestAllOfTests.cs b/src/freeclimb.Test/Model/MessageRequestAllOfTests.cs deleted file mode 100644 index 99b352e2..00000000 --- a/src/freeclimb.Test/Model/MessageRequestAllOfTests.cs +++ /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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing MessageRequestAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MessageRequestAllOfTests - { - private MessageRequestAllOf instance; - - public MessageRequestAllOfTests() - { - - instance = new MessageRequestAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - - } - - /// - /// Test an instance of MessageRequestAllOf - /// - [Fact] - public void MessageRequestAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'From' - /// - [Fact] - public void FromTest() - { - instance.From = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.From); - - } - /// - /// Test the property 'To' - /// - [Fact] - public void ToTest() - { - instance.To = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.To); - - } - /// - /// Test the property 'Text' - /// - [Fact] - public void TextTest() - { - instance.Text = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Text); - - } - /// - /// Test the property 'NotificationUrl' - /// - [Fact] - public void NotificationUrlTest() - { - instance.NotificationUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.NotificationUrl); - - } - /// - /// Test the property 'MediaUrls' - /// - [Fact] - public void MediaUrlsTest() - { - - List testList = new List(); - instance.MediaUrls = testList; - Assert.Equal(testList, instance.MediaUrls); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - MessageRequestAllOf test1 = new MessageRequestAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageRequestAllOf test2 = new MessageRequestAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - MessageRequestAllOf test1 = new MessageRequestAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageRequestAllOf test2 = new MessageRequestAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test2.From = "ts"; - test2.To = "ts"; - test2.Text = "ts"; - test2.NotificationUrl = "ts"; - List testList2 = null; - test2.MediaUrls = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - MessageRequestAllOf test1 = new MessageRequestAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - MessageRequestAllOf test1 = new MessageRequestAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - MessageRequestAllOf test1 = new MessageRequestAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageRequestAllOf test2 = new MessageRequestAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - MessageRequestAllOf test1 = new MessageRequestAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageRequestAllOf test2 = new MessageRequestAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - MessageRequestAllOf test1 = new MessageRequestAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - MessageRequestAllOf test2 = new MessageRequestAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/MessageRequestTests.cs b/src/freeclimb.Test/Model/MessageRequestTests.cs index 9f2a35f5..64af5db4 100644 --- a/src/freeclimb.Test/Model/MessageRequestTests.cs +++ b/src/freeclimb.Test/Model/MessageRequestTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,29 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class MessageRequestTests + + public class MessageRequestTests : IDisposable { private MessageRequest instance; public MessageRequestTests() { - - instance = new MessageRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - + instance = new MessageRequest( + uri: (string)TestHelpers.getTestValue(typeof(string)), + dateCreated: (string)TestHelpers.getTestValue(typeof(string)), + dateUpdated: (string)TestHelpers.getTestValue(typeof(string)), + revision: (int)TestHelpers.getTestValue(typeof(int)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + text: (string)TestHelpers.getTestValue(typeof(string)), + notificationUrl: (string)TestHelpers.getTestValue(typeof(string)), + mediaUrls: (List)TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +65,6 @@ public void MessageRequestInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Uri' /// @@ -65,8 +73,8 @@ public void UriTest() { instance.Uri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Uri); - } + /// /// Test the property 'DateCreated' /// @@ -75,8 +83,8 @@ public void DateCreatedTest() { instance.DateCreated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateCreated); - } + /// /// Test the property 'DateUpdated' /// @@ -85,18 +93,18 @@ public void DateUpdatedTest() { instance.DateUpdated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateUpdated); - } + /// /// Test the property 'Revision' /// [Fact] public void RevisionTest() { - instance.Revision = 1; - Assert.Equal(1, (int) instance.Revision); + Assert.Equal(1, (int)instance.Revision); } + /// /// Test the property 'From' /// @@ -105,8 +113,8 @@ public void FromTest() { instance.From = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.From); - } + /// /// Test the property 'To' /// @@ -115,8 +123,8 @@ public void ToTest() { instance.To = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.To); - } + /// /// Test the property 'Text' /// @@ -125,8 +133,8 @@ public void TextTest() { instance.Text = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Text); - } + /// /// Test the property 'NotificationUrl' /// @@ -135,237 +143,17 @@ public void NotificationUrlTest() { instance.NotificationUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NotificationUrl); - } + /// /// Test the property 'MediaUrls' /// [Fact] public void MediaUrlsTest() { - List testList = new List(); instance.MediaUrls = testList; - Assert.Equal(testList, instance.MediaUrls); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - MessageRequest test1 = new MessageRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageRequest test2 = new MessageRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - MessageRequest test1 = new MessageRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageRequest test2 = new MessageRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test2.Uri = "ts"; - test2.DateCreated = "ts"; - test2.DateUpdated = "ts"; - test2.Revision = 2; - test2.From = "ts"; - test2.To = "ts"; - test2.Text = "ts"; - test2.NotificationUrl = "ts"; - List testList2 = null; - test2.MediaUrls = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - MessageRequest test1 = new MessageRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - MessageRequest test1 = new MessageRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - MessageRequest test1 = new MessageRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageRequest test2 = new MessageRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - MessageRequest test1 = new MessageRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageRequest test2 = new MessageRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - MessageRequest test1 = new MessageRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - MessageRequest test2 = new MessageRequest("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new List()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.MediaUrls, testList); } } } diff --git a/src/freeclimb.Test/Model/MessageResultAllOfTests.cs b/src/freeclimb.Test/Model/MessageResultAllOfTests.cs deleted file mode 100644 index 053132c8..00000000 --- a/src/freeclimb.Test/Model/MessageResultAllOfTests.cs +++ /dev/null @@ -1,445 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing MessageResultAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MessageResultAllOfTests - { - private MessageResultAllOf instance; - - public MessageResultAllOfTests() - { - - instance = new MessageResultAllOf("TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - - } - - /// - /// Test an instance of MessageResultAllOf - /// - [Fact] - public void MessageResultAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'AccountId' - /// - [Fact] - public void AccountIdTest() - { - instance.AccountId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.AccountId); - - } - /// - /// Test the property 'MessageId' - /// - [Fact] - public void MessageIdTest() - { - instance.MessageId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.MessageId); - - } - /// - /// Test the property 'Status' - /// - [Fact] - public void StatusTest() - { - instance.Status = MessageStatus.NEW; - Assert.Equal(instance.Status,MessageStatus.NEW); - instance.Status = MessageStatus.QUEUED; - Assert.Equal(instance.Status,MessageStatus.QUEUED); - instance.Status = MessageStatus.REJECTED; - Assert.Equal(instance.Status,MessageStatus.REJECTED); - instance.Status = MessageStatus.SENDING; - Assert.Equal(instance.Status,MessageStatus.SENDING); - instance.Status = MessageStatus.SENT; - Assert.Equal(instance.Status,MessageStatus.SENT); - instance.Status = MessageStatus.FAILED; - Assert.Equal(instance.Status,MessageStatus.FAILED); - instance.Status = MessageStatus.RECEIVED; - Assert.Equal(instance.Status,MessageStatus.RECEIVED); - instance.Status = MessageStatus.UNDELIVERED; - Assert.Equal(instance.Status,MessageStatus.UNDELIVERED); - instance.Status = MessageStatus.EXPIRED; - Assert.Equal(instance.Status,MessageStatus.EXPIRED); - instance.Status = MessageStatus.DELETED; - Assert.Equal(instance.Status,MessageStatus.DELETED); - instance.Status = MessageStatus.UNKNOWN; - Assert.Equal(instance.Status,MessageStatus.UNKNOWN); - - } - /// - /// Test the property 'From' - /// - [Fact] - public void FromTest() - { - instance.From = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.From); - - } - /// - /// Test the property 'To' - /// - [Fact] - public void ToTest() - { - instance.To = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.To); - - } - /// - /// Test the property 'Text' - /// - [Fact] - public void TextTest() - { - instance.Text = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Text); - - } - /// - /// Test the property 'Direction' - /// - [Fact] - public void DirectionTest() - { - instance.Direction = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Direction); - - } - /// - /// Test the property 'NotificationUrl' - /// - [Fact] - public void NotificationUrlTest() - { - instance.NotificationUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.NotificationUrl); - - } - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - instance.BrandId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.BrandId); - - } - /// - /// Test the property 'CampaignId' - /// - [Fact] - public void CampaignIdTest() - { - instance.CampaignId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.CampaignId); - - } - /// - /// Test the property 'SegmentCount' - /// - [Fact] - public void SegmentCountTest() - { - instance.SegmentCount = new decimal(1.0); - Assert.Equal(new decimal(1.0), instance.SegmentCount); - - } - /// - /// Test the property 'MediaUrls' - /// - [Fact] - public void MediaUrlsTest() - { - - List testList = new List(); - instance.MediaUrls = testList; - Assert.Equal(testList, instance.MediaUrls); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - MessageResultAllOf test1 = new MessageResultAllOf("TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test1.AccountId = "TS"; - test1.MessageId = "TS"; - test1.Status = MessageStatus.NEW; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.Direction = "TS"; - test1.NotificationUrl = "TS"; - test1.BrandId = "TS"; - test1.CampaignId = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageResultAllOf test2 = new MessageResultAllOf("TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test2.AccountId = "TS"; - test2.MessageId = "TS"; - test2.Status = MessageStatus.NEW; - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.Direction = "TS"; - test2.NotificationUrl = "TS"; - test2.BrandId = "TS"; - test2.CampaignId = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - MessageResultAllOf test1 = new MessageResultAllOf("TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test1.AccountId = "TS"; - test1.MessageId = "TS"; - test1.Status = MessageStatus.NEW; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.Direction = "TS"; - test1.NotificationUrl = "TS"; - test1.BrandId = "TS"; - test1.CampaignId = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageResultAllOf test2 = new MessageResultAllOf("TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test2.AccountId = "ts"; - test2.MessageId = "ts"; - test2.Status = MessageStatus.QUEUED; - test2.From = "ts"; - test2.To = "ts"; - test2.Text = "ts"; - test2.Direction = "ts"; - test2.NotificationUrl = "ts"; - test2.BrandId = "ts"; - test2.CampaignId = "ts"; - List testList2 = null; - test2.MediaUrls = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - MessageResultAllOf test1 = new MessageResultAllOf("TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test1.AccountId = "TS"; - test1.MessageId = "TS"; - test1.Status = MessageStatus.NEW; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.Direction = "TS"; - test1.NotificationUrl = "TS"; - test1.BrandId = "TS"; - test1.CampaignId = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - MessageResultAllOf test1 = new MessageResultAllOf("TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test1.AccountId = "TS"; - test1.MessageId = "TS"; - test1.Status = MessageStatus.NEW; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.Direction = "TS"; - test1.NotificationUrl = "TS"; - test1.BrandId = "TS"; - test1.CampaignId = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - MessageResultAllOf test1 = new MessageResultAllOf("TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test1.AccountId = "TS"; - test1.MessageId = "TS"; - test1.Status = MessageStatus.NEW; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.Direction = "TS"; - test1.NotificationUrl = "TS"; - test1.BrandId = "TS"; - test1.CampaignId = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageResultAllOf test2 = new MessageResultAllOf("TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test2.AccountId = "TS"; - test2.MessageId = "TS"; - test2.Status = MessageStatus.NEW; - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.Direction = "TS"; - test2.NotificationUrl = "TS"; - test2.BrandId = "TS"; - test2.CampaignId = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - MessageResultAllOf test1 = new MessageResultAllOf("TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test1.AccountId = "TS"; - test1.MessageId = "TS"; - test1.Status = MessageStatus.NEW; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.Direction = "TS"; - test1.NotificationUrl = "TS"; - test1.BrandId = "TS"; - test1.CampaignId = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageResultAllOf test2 = new MessageResultAllOf("TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test2.AccountId = "TS"; - test2.MessageId = "TS"; - test2.Status = MessageStatus.NEW; - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.Direction = "TS"; - test2.NotificationUrl = "TS"; - test2.BrandId = "TS"; - test2.CampaignId = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - MessageResultAllOf test1 = new MessageResultAllOf("TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test1.AccountId = "TS"; - test1.MessageId = "TS"; - test1.Status = MessageStatus.NEW; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.Direction = "TS"; - test1.NotificationUrl = "TS"; - test1.BrandId = "TS"; - test1.CampaignId = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - MessageResultAllOf test2 = new MessageResultAllOf("TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test2.AccountId = "TS"; - test2.MessageId = "TS"; - test2.Status = MessageStatus.NEW; - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.Direction = "TS"; - test2.NotificationUrl = "TS"; - test2.BrandId = "TS"; - test2.CampaignId = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/MessageResultTests.cs b/src/freeclimb.Test/Model/MessageResultTests.cs index 13c4175b..f22132e2 100644 --- a/src/freeclimb.Test/Model/MessageResultTests.cs +++ b/src/freeclimb.Test/Model/MessageResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,36 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class MessageResultTests + + public class MessageResultTests : IDisposable { private MessageResult instance; public MessageResultTests() { - - instance = new MessageResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - + instance = new MessageResult( + uri: (string)TestHelpers.getTestValue(typeof(string)), + dateCreated: (string)TestHelpers.getTestValue(typeof(string)), + dateUpdated: (string)TestHelpers.getTestValue(typeof(string)), + revision: (int)TestHelpers.getTestValue(typeof(int)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + messageId: (string)TestHelpers.getTestValue(typeof(string)), + status: (MessageStatus)TestHelpers.getTestValue(typeof(MessageStatus)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + text: (string)TestHelpers.getTestValue(typeof(string)), + direction: (string)TestHelpers.getTestValue(typeof(string)), + notificationUrl: (string)TestHelpers.getTestValue(typeof(string)), + brandId: (string)TestHelpers.getTestValue(typeof(string)), + campaignId: (string)TestHelpers.getTestValue(typeof(string)), + segmentCount: (decimal?)TestHelpers.getTestValue(typeof(decimal?)), + mediaUrls: (List)TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +72,6 @@ public void MessageResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Uri' /// @@ -65,8 +80,8 @@ public void UriTest() { instance.Uri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Uri); - } + /// /// Test the property 'DateCreated' /// @@ -75,8 +90,8 @@ public void DateCreatedTest() { instance.DateCreated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateCreated); - } + /// /// Test the property 'DateUpdated' /// @@ -85,18 +100,18 @@ public void DateUpdatedTest() { instance.DateUpdated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateUpdated); - } + /// /// Test the property 'Revision' /// [Fact] public void RevisionTest() { - instance.Revision = 1; - Assert.Equal(1, (int) instance.Revision); + Assert.Equal(1, (int)instance.Revision); } + /// /// Test the property 'AccountId' /// @@ -105,8 +120,8 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } + /// /// Test the property 'MessageId' /// @@ -115,8 +130,8 @@ public void MessageIdTest() { instance.MessageId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.MessageId); - } + /// /// Test the property 'Status' /// @@ -124,29 +139,29 @@ public void MessageIdTest() public void StatusTest() { instance.Status = MessageStatus.NEW; - Assert.Equal(instance.Status,MessageStatus.NEW); + Assert.Equal(MessageStatus.NEW, instance.Status); instance.Status = MessageStatus.QUEUED; - Assert.Equal(instance.Status,MessageStatus.QUEUED); + Assert.Equal(MessageStatus.QUEUED, instance.Status); instance.Status = MessageStatus.REJECTED; - Assert.Equal(instance.Status,MessageStatus.REJECTED); + Assert.Equal(MessageStatus.REJECTED, instance.Status); instance.Status = MessageStatus.SENDING; - Assert.Equal(instance.Status,MessageStatus.SENDING); + Assert.Equal(MessageStatus.SENDING, instance.Status); instance.Status = MessageStatus.SENT; - Assert.Equal(instance.Status,MessageStatus.SENT); + Assert.Equal(MessageStatus.SENT, instance.Status); instance.Status = MessageStatus.FAILED; - Assert.Equal(instance.Status,MessageStatus.FAILED); + Assert.Equal(MessageStatus.FAILED, instance.Status); instance.Status = MessageStatus.RECEIVED; - Assert.Equal(instance.Status,MessageStatus.RECEIVED); + Assert.Equal(MessageStatus.RECEIVED, instance.Status); instance.Status = MessageStatus.UNDELIVERED; - Assert.Equal(instance.Status,MessageStatus.UNDELIVERED); + Assert.Equal(MessageStatus.UNDELIVERED, instance.Status); instance.Status = MessageStatus.EXPIRED; - Assert.Equal(instance.Status,MessageStatus.EXPIRED); + Assert.Equal(MessageStatus.EXPIRED, instance.Status); instance.Status = MessageStatus.DELETED; - Assert.Equal(instance.Status,MessageStatus.DELETED); + Assert.Equal(MessageStatus.DELETED, instance.Status); instance.Status = MessageStatus.UNKNOWN; - Assert.Equal(instance.Status,MessageStatus.UNKNOWN); - + Assert.Equal(MessageStatus.UNKNOWN, instance.Status); } + /// /// Test the property 'From' /// @@ -155,8 +170,8 @@ public void FromTest() { instance.From = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.From); - } + /// /// Test the property 'To' /// @@ -165,8 +180,8 @@ public void ToTest() { instance.To = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.To); - } + /// /// Test the property 'Text' /// @@ -175,8 +190,8 @@ public void TextTest() { instance.Text = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Text); - } + /// /// Test the property 'Direction' /// @@ -185,8 +200,8 @@ public void DirectionTest() { instance.Direction = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Direction); - } + /// /// Test the property 'NotificationUrl' /// @@ -195,8 +210,8 @@ public void NotificationUrlTest() { instance.NotificationUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NotificationUrl); - } + /// /// Test the property 'BrandId' /// @@ -205,8 +220,8 @@ public void BrandIdTest() { instance.BrandId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.BrandId); - } + /// /// Test the property 'CampaignId' /// @@ -215,8 +230,8 @@ public void CampaignIdTest() { instance.CampaignId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CampaignId); - } + /// /// Test the property 'SegmentCount' /// @@ -225,309 +240,17 @@ public void SegmentCountTest() { instance.SegmentCount = new decimal(1.0); Assert.Equal(new decimal(1.0), instance.SegmentCount); - } + /// /// Test the property 'MediaUrls' /// [Fact] public void MediaUrlsTest() { - List testList = new List(); instance.MediaUrls = testList; - Assert.Equal(testList, instance.MediaUrls); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - MessageResult test1 = new MessageResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.MessageId = "TS"; - test1.Status = MessageStatus.NEW; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.Direction = "TS"; - test1.NotificationUrl = "TS"; - test1.BrandId = "TS"; - test1.CampaignId = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageResult test2 = new MessageResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.MessageId = "TS"; - test2.Status = MessageStatus.NEW; - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.Direction = "TS"; - test2.NotificationUrl = "TS"; - test2.BrandId = "TS"; - test2.CampaignId = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - MessageResult test1 = new MessageResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.MessageId = "TS"; - test1.Status = MessageStatus.NEW; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.Direction = "TS"; - test1.NotificationUrl = "TS"; - test1.BrandId = "TS"; - test1.CampaignId = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageResult test2 = new MessageResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test2.Uri = "ts"; - test2.DateCreated = "ts"; - test2.DateUpdated = "ts"; - test2.Revision = 2; - test2.AccountId = "ts"; - test2.MessageId = "ts"; - test2.Status = MessageStatus.QUEUED; - test2.From = "ts"; - test2.To = "ts"; - test2.Text = "ts"; - test2.Direction = "ts"; - test2.NotificationUrl = "ts"; - test2.BrandId = "ts"; - test2.CampaignId = "ts"; - List testList2 = null; - test2.MediaUrls = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - MessageResult test1 = new MessageResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.MessageId = "TS"; - test1.Status = MessageStatus.NEW; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.Direction = "TS"; - test1.NotificationUrl = "TS"; - test1.BrandId = "TS"; - test1.CampaignId = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - MessageResult test1 = new MessageResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.MessageId = "TS"; - test1.Status = MessageStatus.NEW; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.Direction = "TS"; - test1.NotificationUrl = "TS"; - test1.BrandId = "TS"; - test1.CampaignId = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - MessageResult test1 = new MessageResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.MessageId = "TS"; - test1.Status = MessageStatus.NEW; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.Direction = "TS"; - test1.NotificationUrl = "TS"; - test1.BrandId = "TS"; - test1.CampaignId = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageResult test2 = new MessageResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.MessageId = "TS"; - test2.Status = MessageStatus.NEW; - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.Direction = "TS"; - test2.NotificationUrl = "TS"; - test2.BrandId = "TS"; - test2.CampaignId = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - MessageResult test1 = new MessageResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.MessageId = "TS"; - test1.Status = MessageStatus.NEW; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.Direction = "TS"; - test1.NotificationUrl = "TS"; - test1.BrandId = "TS"; - test1.CampaignId = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - - MessageResult test2 = new MessageResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.MessageId = "TS"; - test2.Status = MessageStatus.NEW; - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.Direction = "TS"; - test2.NotificationUrl = "TS"; - test2.BrandId = "TS"; - test2.CampaignId = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - MessageResult test1 = new MessageResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.MessageId = "TS"; - test1.Status = MessageStatus.NEW; - test1.From = "TS"; - test1.To = "TS"; - test1.Text = "TS"; - test1.Direction = "TS"; - test1.NotificationUrl = "TS"; - test1.BrandId = "TS"; - test1.CampaignId = "TS"; - List testList = new List(); - test1.MediaUrls = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - MessageResult test2 = new MessageResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", MessageStatus.NEW, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new decimal(1.0), new List()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.MessageId = "TS"; - test2.Status = MessageStatus.NEW; - test2.From = "TS"; - test2.To = "TS"; - test2.Text = "TS"; - test2.Direction = "TS"; - test2.NotificationUrl = "TS"; - test2.BrandId = "TS"; - test2.CampaignId = "TS"; - List testList2 = new List(); - test2.MediaUrls = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.MediaUrls, testList); } } } diff --git a/src/freeclimb.Test/Model/MessageStatusWebhookTests.cs b/src/freeclimb.Test/Model/MessageStatusWebhookTests.cs new file mode 100644 index 00000000..e8ff88c6 --- /dev/null +++ b/src/freeclimb.Test/Model/MessageStatusWebhookTests.cs @@ -0,0 +1,205 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing MessageStatusWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class MessageStatusWebhookTests : IDisposable + { + private MessageStatusWebhook instance; + + public MessageStatusWebhookTests() + { + instance = new MessageStatusWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + messageId: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + text: (string)TestHelpers.getTestValue(typeof(string)), + direction: (string)TestHelpers.getTestValue(typeof(string)), + applicationId: (string)TestHelpers.getTestValue(typeof(string)), + status: (MessageStatus)TestHelpers.getTestValue(typeof(MessageStatus)), + phoneNumberId: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MessageStatusWebhook + /// + [Fact] + public void MessageStatusWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + instance.MessageId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.MessageId); + } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'Text' + /// + [Fact] + public void TextTest() + { + instance.Text = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.Text); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.Direction); + } + + /// + /// Test the property 'ApplicationId' + /// + [Fact] + public void ApplicationIdTest() + { + instance.ApplicationId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ApplicationId); + } + + /// + /// Test the property 'Status' + /// + [Fact] + public void StatusTest() + { + instance.Status = MessageStatus.NEW; + Assert.Equal(MessageStatus.NEW, instance.Status); + instance.Status = MessageStatus.QUEUED; + Assert.Equal(MessageStatus.QUEUED, instance.Status); + instance.Status = MessageStatus.REJECTED; + Assert.Equal(MessageStatus.REJECTED, instance.Status); + instance.Status = MessageStatus.SENDING; + Assert.Equal(MessageStatus.SENDING, instance.Status); + instance.Status = MessageStatus.SENT; + Assert.Equal(MessageStatus.SENT, instance.Status); + instance.Status = MessageStatus.FAILED; + Assert.Equal(MessageStatus.FAILED, instance.Status); + instance.Status = MessageStatus.RECEIVED; + Assert.Equal(MessageStatus.RECEIVED, instance.Status); + instance.Status = MessageStatus.UNDELIVERED; + Assert.Equal(MessageStatus.UNDELIVERED, instance.Status); + instance.Status = MessageStatus.EXPIRED; + Assert.Equal(MessageStatus.EXPIRED, instance.Status); + instance.Status = MessageStatus.DELETED; + Assert.Equal(MessageStatus.DELETED, instance.Status); + instance.Status = MessageStatus.UNKNOWN; + Assert.Equal(MessageStatus.UNKNOWN, instance.Status); + } + + /// + /// Test the property 'PhoneNumberId' + /// + [Fact] + public void PhoneNumberIdTest() + { + instance.PhoneNumberId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.PhoneNumberId); + } + + [Fact] + public void TestDeserializeJsonToMessageStatusWebhook() + { + string payload = @"{ ""requestType"": ""messageStatus"" }"; + MessageStatusWebhook deserialized = MessageStatusWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("messageStatus", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/MessagesListAllOfTests.cs b/src/freeclimb.Test/Model/MessagesListAllOfTests.cs deleted file mode 100644 index b3d1fff0..00000000 --- a/src/freeclimb.Test/Model/MessagesListAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing MessagesListAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MessagesListAllOfTests - { - private MessagesListAllOf instance; - - public MessagesListAllOfTests() - { - - instance = new MessagesListAllOf(new List()); - - } - - /// - /// Test an instance of MessagesListAllOf - /// - [Fact] - public void MessagesListAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Messages' - /// - [Fact] - public void MessagesTest() - { - - List testList = new List(); - instance.Messages = testList; - Assert.Equal(testList, instance.Messages); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - MessagesListAllOf test1 = new MessagesListAllOf(new List()); - List testList = new List(); - test1.Messages = testList; - - MessagesListAllOf test2 = new MessagesListAllOf(new List()); - List testList2 = new List(); - test2.Messages = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - MessagesListAllOf test1 = new MessagesListAllOf(new List()); - List testList = new List(); - test1.Messages = testList; - - MessagesListAllOf test2 = new MessagesListAllOf(new List()); - List testList2 = null; - test2.Messages = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - MessagesListAllOf test1 = new MessagesListAllOf(new List()); - List testList = new List(); - test1.Messages = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - MessagesListAllOf test1 = new MessagesListAllOf(new List()); - List testList = new List(); - test1.Messages = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - MessagesListAllOf test1 = new MessagesListAllOf(new List()); - List testList = new List(); - test1.Messages = testList; - - MessagesListAllOf test2 = new MessagesListAllOf(new List()); - List testList2 = new List(); - test2.Messages = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - MessagesListAllOf test1 = new MessagesListAllOf(new List()); - List testList = new List(); - test1.Messages = testList; - - MessagesListAllOf test2 = new MessagesListAllOf(new List()); - List testList2 = new List(); - test2.Messages = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - MessagesListAllOf test1 = new MessagesListAllOf(new List()); - List testList = new List(); - test1.Messages = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - MessagesListAllOf test2 = new MessagesListAllOf(new List()); - List testList2 = new List(); - test2.Messages = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/MessagesListTests.cs b/src/freeclimb.Test/Model/MessagesListTests.cs index bc633822..2938713f 100644 --- a/src/freeclimb.Test/Model/MessagesListTests.cs +++ b/src/freeclimb.Test/Model/MessagesListTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,28 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class MessagesListTests + + public class MessagesListTests : IDisposable { private MessagesList instance; public MessagesListTests() { - - instance = new MessagesList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new MessagesList( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + messages: (List)TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +64,66 @@ public void MessagesListInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +132,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'Messages' /// [Fact] public void MessagesTest() { - List testList = new List(); instance.Messages = testList; - Assert.Equal(testList, instance.Messages); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - MessagesList test1 = new MessagesList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Messages = testList; - - MessagesList test2 = new MessagesList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Messages = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - MessagesList test1 = new MessagesList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Messages = testList; - - MessagesList test2 = new MessagesList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.Messages = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - MessagesList test1 = new MessagesList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Messages = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - MessagesList test1 = new MessagesList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Messages = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - MessagesList test1 = new MessagesList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Messages = testList; - - MessagesList test2 = new MessagesList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Messages = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - MessagesList test1 = new MessagesList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Messages = testList; - - MessagesList test2 = new MessagesList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Messages = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - MessagesList test1 = new MessagesList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Messages = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - MessagesList test2 = new MessagesList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Messages = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.Messages, testList); } } } diff --git a/src/freeclimb.Test/Model/MutableResourceModelTests.cs b/src/freeclimb.Test/Model/MutableResourceModelTests.cs index 20bdc6fb..5392f75b 100644 --- a/src/freeclimb.Test/Model/MutableResourceModelTests.cs +++ b/src/freeclimb.Test/Model/MutableResourceModelTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,24 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class MutableResourceModelTests + + public class MutableResourceModelTests : IDisposable { private MutableResourceModel instance; public MutableResourceModelTests() { - - instance = new MutableResourceModel("TEST_STRING", "TEST_STRING", "TEST_STRING", 1); - + instance = new MutableResourceModel( + uri: (string)TestHelpers.getTestValue(typeof(string)), + dateCreated: (string)TestHelpers.getTestValue(typeof(string)), + dateUpdated: (string)TestHelpers.getTestValue(typeof(string)), + revision: (int)TestHelpers.getTestValue(typeof(int)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +60,6 @@ public void MutableResourceModelInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Uri' /// @@ -65,8 +68,8 @@ public void UriTest() { instance.Uri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Uri); - } + /// /// Test the property 'DateCreated' /// @@ -75,8 +78,8 @@ public void DateCreatedTest() { instance.DateCreated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateCreated); - } + /// /// Test the property 'DateUpdated' /// @@ -85,164 +88,16 @@ public void DateUpdatedTest() { instance.DateUpdated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateUpdated); - } + /// /// Test the property 'Revision' /// [Fact] public void RevisionTest() { - instance.Revision = 1; - Assert.Equal(1, (int) instance.Revision); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - MutableResourceModel test1 = new MutableResourceModel("TEST_STRING", "TEST_STRING", "TEST_STRING", 1); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - - MutableResourceModel test2 = new MutableResourceModel("TEST_STRING", "TEST_STRING", "TEST_STRING", 1); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - MutableResourceModel test1 = new MutableResourceModel("TEST_STRING", "TEST_STRING", "TEST_STRING", 1); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - - MutableResourceModel test2 = new MutableResourceModel("TEST_STRING", "TEST_STRING", "TEST_STRING", 1); - test2.Uri = "ts"; - test2.DateCreated = "ts"; - test2.DateUpdated = "ts"; - test2.Revision = 2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - MutableResourceModel test1 = new MutableResourceModel("TEST_STRING", "TEST_STRING", "TEST_STRING", 1); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - MutableResourceModel test1 = new MutableResourceModel("TEST_STRING", "TEST_STRING", "TEST_STRING", 1); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - MutableResourceModel test1 = new MutableResourceModel("TEST_STRING", "TEST_STRING", "TEST_STRING", 1); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - - MutableResourceModel test2 = new MutableResourceModel("TEST_STRING", "TEST_STRING", "TEST_STRING", 1); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - MutableResourceModel test1 = new MutableResourceModel("TEST_STRING", "TEST_STRING", "TEST_STRING", 1); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - - MutableResourceModel test2 = new MutableResourceModel("TEST_STRING", "TEST_STRING", "TEST_STRING", 1); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - MutableResourceModel test1 = new MutableResourceModel("TEST_STRING", "TEST_STRING", "TEST_STRING", 1); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - MutableResourceModel test2 = new MutableResourceModel("TEST_STRING", "TEST_STRING", "TEST_STRING", 1); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(1, (int)instance.Revision); } } } diff --git a/src/freeclimb.Test/Model/OutDialAllOfTests.cs b/src/freeclimb.Test/Model/OutDialAllOfTests.cs deleted file mode 100644 index aeb205e7..00000000 --- a/src/freeclimb.Test/Model/OutDialAllOfTests.cs +++ /dev/null @@ -1,382 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing OutDialAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OutDialAllOfTests - { - private OutDialAllOf instance; - - public OutDialAllOfTests() - { - - instance = new OutDialAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false); - - } - - /// - /// Test an instance of OutDialAllOf - /// - [Fact] - public void OutDialAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'ActionUrl' - /// - [Fact] - public void ActionUrlTest() - { - - instance.ActionUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ActionUrl); - } - /// - /// Test the property 'CallConnectUrl' - /// - [Fact] - public void CallConnectUrlTest() - { - - instance.CallConnectUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.CallConnectUrl); - } - /// - /// Test the property 'CallingNumber' - /// - [Fact] - public void CallingNumberTest() - { - instance.CallingNumber = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.CallingNumber); - - } - /// - /// Test the property 'Destination' - /// - [Fact] - public void DestinationTest() - { - instance.Destination = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Destination); - - } - /// - /// Test the property 'IfMachine' - /// - [Fact] - public void IfMachineTest() - { - instance.IfMachine = IfMachine.REDIRECT; - Assert.Equal(instance.IfMachine,IfMachine.REDIRECT); - instance.IfMachine = IfMachine.HANGUP; - Assert.Equal(instance.IfMachine,IfMachine.HANGUP); - - } - /// - /// Test the property 'IfMachineUrl' - /// - [Fact] - public void IfMachineUrlTest() - { - instance.IfMachineUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.IfMachineUrl); - - } - /// - /// Test the property 'SendDigits' - /// - [Fact] - public void SendDigitsTest() - { - instance.SendDigits = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.SendDigits); - - } - /// - /// Test the property 'StatusCallbackUrl' - /// - [Fact] - public void StatusCallbackUrlTest() - { - instance.StatusCallbackUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.StatusCallbackUrl); - - } - /// - /// Test the property 'Timeout' - /// - [Fact] - public void TimeoutTest() - { - - instance.Timeout = 1; - Assert.Equal(1, (int) instance.Timeout); - } - /// - /// Test the property 'PrivacyMode' - /// - [Fact] - public void PrivacyModeTest() - { - instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - OutDialAllOf test1 = new OutDialAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false); - test1.ActionUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.CallingNumber = "TS"; - test1.Destination = "TS"; - test1.IfMachine = IfMachine.REDIRECT; - test1.IfMachineUrl = "TS"; - test1.SendDigits = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.Timeout = 1; - test1.PrivacyMode = true; - - OutDialAllOf test2 = new OutDialAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false); - test2.ActionUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.CallingNumber = "TS"; - test2.Destination = "TS"; - test2.IfMachine = IfMachine.REDIRECT; - test2.IfMachineUrl = "TS"; - test2.SendDigits = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.Timeout = 1; - test2.PrivacyMode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - OutDialAllOf test1 = new OutDialAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false); - test1.ActionUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.CallingNumber = "TS"; - test1.Destination = "TS"; - test1.IfMachine = IfMachine.REDIRECT; - test1.IfMachineUrl = "TS"; - test1.SendDigits = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.Timeout = 1; - test1.PrivacyMode = true; - - OutDialAllOf test2 = new OutDialAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false); - test2.ActionUrl = "ts"; - test2.CallConnectUrl = "ts"; - test2.CallingNumber = "ts"; - test2.Destination = "ts"; - test2.IfMachine = IfMachine.HANGUP; - test2.IfMachineUrl = "ts"; - test2.SendDigits = "ts"; - test2.StatusCallbackUrl = "ts"; - test2.Timeout = 2; - test2.PrivacyMode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - OutDialAllOf test1 = new OutDialAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false); - test1.ActionUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.CallingNumber = "TS"; - test1.Destination = "TS"; - test1.IfMachine = IfMachine.REDIRECT; - test1.IfMachineUrl = "TS"; - test1.SendDigits = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.Timeout = 1; - test1.PrivacyMode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - OutDialAllOf test1 = new OutDialAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false); - test1.ActionUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.CallingNumber = "TS"; - test1.Destination = "TS"; - test1.IfMachine = IfMachine.REDIRECT; - test1.IfMachineUrl = "TS"; - test1.SendDigits = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.Timeout = 1; - test1.PrivacyMode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - OutDialAllOf test1 = new OutDialAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false); - test1.ActionUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.CallingNumber = "TS"; - test1.Destination = "TS"; - test1.IfMachine = IfMachine.REDIRECT; - test1.IfMachineUrl = "TS"; - test1.SendDigits = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.Timeout = 1; - test1.PrivacyMode = true; - - OutDialAllOf test2 = new OutDialAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false); - test2.ActionUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.CallingNumber = "TS"; - test2.Destination = "TS"; - test2.IfMachine = IfMachine.REDIRECT; - test2.IfMachineUrl = "TS"; - test2.SendDigits = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.Timeout = 1; - test2.PrivacyMode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - OutDialAllOf test1 = new OutDialAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false); - test1.ActionUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.CallingNumber = "TS"; - test1.Destination = "TS"; - test1.IfMachine = IfMachine.REDIRECT; - test1.IfMachineUrl = "TS"; - test1.SendDigits = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.Timeout = 1; - test1.PrivacyMode = true; - - OutDialAllOf test2 = new OutDialAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false); - test2.ActionUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.CallingNumber = "TS"; - test2.Destination = "TS"; - test2.IfMachine = IfMachine.REDIRECT; - test2.IfMachineUrl = "TS"; - test2.SendDigits = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.Timeout = 1; - test2.PrivacyMode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - OutDialAllOf test1 = new OutDialAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false); - test1.ActionUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.CallingNumber = "TS"; - test1.Destination = "TS"; - test1.IfMachine = IfMachine.REDIRECT; - test1.IfMachineUrl = "TS"; - test1.SendDigits = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.Timeout = 1; - test1.PrivacyMode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - OutDialAllOf test2 = new OutDialAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false); - test2.ActionUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.CallingNumber = "TS"; - test2.Destination = "TS"; - test2.IfMachine = IfMachine.REDIRECT; - test2.IfMachineUrl = "TS"; - test2.SendDigits = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.Timeout = 1; - test2.PrivacyMode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/OutDialApiConnectWebhookTests.cs b/src/freeclimb.Test/Model/OutDialApiConnectWebhookTests.cs new file mode 100644 index 00000000..cf65b69b --- /dev/null +++ b/src/freeclimb.Test/Model/OutDialApiConnectWebhookTests.cs @@ -0,0 +1,192 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing OutDialApiConnectWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class OutDialApiConnectWebhookTests : IDisposable + { + private OutDialApiConnectWebhook instance; + + public OutDialApiConnectWebhookTests() + { + instance = new OutDialApiConnectWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + parentCallId: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OutDialApiConnectWebhook + /// + [Fact] + public void OutDialApiConnectWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'ParentCallId' + /// + [Fact] + public void ParentCallIdTest() + { + instance.ParentCallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ParentCallId); + } + + [Fact] + public void TestDeserializeJsonToOutDialApiConnectWebhook() + { + string payload = @"{ ""requestType"": ""outDialApiConnect"" }"; + OutDialApiConnectWebhook deserialized = OutDialApiConnectWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("outDialApiConnect", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/OutDialConnectWebhookTests.cs b/src/freeclimb.Test/Model/OutDialConnectWebhookTests.cs new file mode 100644 index 00000000..a5c49a15 --- /dev/null +++ b/src/freeclimb.Test/Model/OutDialConnectWebhookTests.cs @@ -0,0 +1,192 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing OutDialConnectWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class OutDialConnectWebhookTests : IDisposable + { + private OutDialConnectWebhook instance; + + public OutDialConnectWebhookTests() + { + instance = new OutDialConnectWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + parentCallId: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OutDialConnectWebhook + /// + [Fact] + public void OutDialConnectWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'ParentCallId' + /// + [Fact] + public void ParentCallIdTest() + { + instance.ParentCallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ParentCallId); + } + + [Fact] + public void TestDeserializeJsonToOutDialConnectWebhook() + { + string payload = @"{ ""requestType"": ""outDialConnect"" }"; + OutDialConnectWebhook deserialized = OutDialConnectWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("outDialConnect", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/OutDialStartWebhookTests.cs b/src/freeclimb.Test/Model/OutDialStartWebhookTests.cs new file mode 100644 index 00000000..84a5fb0f --- /dev/null +++ b/src/freeclimb.Test/Model/OutDialStartWebhookTests.cs @@ -0,0 +1,203 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing OutDialStartWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class OutDialStartWebhookTests : IDisposable + { + private OutDialStartWebhook instance; + + public OutDialStartWebhookTests() + { + instance = new OutDialStartWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + dialCallId: (string)TestHelpers.getTestValue(typeof(string)), + parentCallId: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OutDialStartWebhook + /// + [Fact] + public void OutDialStartWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'DialCallId' + /// + [Fact] + public void DialCallIdTest() + { + instance.DialCallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.DialCallId); + } + + /// + /// Test the property 'ParentCallId' + /// + [Fact] + public void ParentCallIdTest() + { + instance.ParentCallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ParentCallId); + } + + [Fact] + public void TestDeserializeJsonToOutDialStartWebhook() + { + string payload = @"{ ""requestType"": ""outDialStart"" }"; + OutDialStartWebhook deserialized = OutDialStartWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("outDialStart", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/OutDialTests.cs b/src/freeclimb.Test/Model/OutDialTests.cs index fcb60b2f..3d59d791 100644 --- a/src/freeclimb.Test/Model/OutDialTests.cs +++ b/src/freeclimb.Test/Model/OutDialTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,30 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class OutDialTests + + public class OutDialTests : IDisposable { private OutDial instance; public OutDialTests() { - - instance = new OutDial("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - + instance = new OutDial( + actionUrl: (string)TestHelpers.getTestValue(typeof(string)), + callConnectUrl: (string)TestHelpers.getTestValue(typeof(string)), + callingNumber: (string)TestHelpers.getTestValue(typeof(string)), + destination: (string)TestHelpers.getTestValue(typeof(string)), + ifMachine: (IfMachine)TestHelpers.getTestValue(typeof(IfMachine)), + ifMachineUrl: (string)TestHelpers.getTestValue(typeof(string)), + sendDigits: (string)TestHelpers.getTestValue(typeof(string)), + statusCallbackUrl: (string)TestHelpers.getTestValue(typeof(string)), + timeout: (int)TestHelpers.getTestValue(typeof(int)), + privacyMode: (bool)TestHelpers.getTestValue(typeof(bool)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,27 +66,26 @@ public void OutDialInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'ActionUrl' /// [Fact] public void ActionUrlTest() { - instance.ActionUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ActionUrl); } + /// /// Test the property 'CallConnectUrl' /// [Fact] public void CallConnectUrlTest() { - instance.CallConnectUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CallConnectUrl); } + /// /// Test the property 'CallingNumber' /// @@ -85,8 +94,8 @@ public void CallingNumberTest() { instance.CallingNumber = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CallingNumber); - } + /// /// Test the property 'Destination' /// @@ -95,8 +104,8 @@ public void DestinationTest() { instance.Destination = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Destination); - } + /// /// Test the property 'IfMachine' /// @@ -104,11 +113,11 @@ public void DestinationTest() public void IfMachineTest() { instance.IfMachine = IfMachine.REDIRECT; - Assert.Equal(instance.IfMachine,IfMachine.REDIRECT); + Assert.Equal(IfMachine.REDIRECT, instance.IfMachine); instance.IfMachine = IfMachine.HANGUP; - Assert.Equal(instance.IfMachine,IfMachine.HANGUP); - + Assert.Equal(IfMachine.HANGUP, instance.IfMachine); } + /// /// Test the property 'IfMachineUrl' /// @@ -117,8 +126,8 @@ public void IfMachineUrlTest() { instance.IfMachineUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.IfMachineUrl); - } + /// /// Test the property 'SendDigits' /// @@ -127,8 +136,8 @@ public void SendDigitsTest() { instance.SendDigits = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.SendDigits); - } + /// /// Test the property 'StatusCallbackUrl' /// @@ -137,18 +146,18 @@ public void StatusCallbackUrlTest() { instance.StatusCallbackUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.StatusCallbackUrl); - } + /// /// Test the property 'Timeout' /// [Fact] public void TimeoutTest() { - instance.Timeout = 1; - Assert.Equal(1, (int) instance.Timeout); + Assert.Equal(1, (int)instance.Timeout); } + /// /// Test the property 'PrivacyMode' /// @@ -156,227 +165,7 @@ public void TimeoutTest() public void PrivacyModeTest() { instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - OutDial test1 = new OutDial("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.CallingNumber = "TS"; - test1.Destination = "TS"; - test1.IfMachine = IfMachine.REDIRECT; - test1.IfMachineUrl = "TS"; - test1.SendDigits = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.Timeout = 1; - test1.PrivacyMode = true; - - OutDial test2 = new OutDial("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.CallingNumber = "TS"; - test2.Destination = "TS"; - test2.IfMachine = IfMachine.REDIRECT; - test2.IfMachineUrl = "TS"; - test2.SendDigits = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.Timeout = 1; - test2.PrivacyMode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - OutDial test1 = new OutDial("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.CallingNumber = "TS"; - test1.Destination = "TS"; - test1.IfMachine = IfMachine.REDIRECT; - test1.IfMachineUrl = "TS"; - test1.SendDigits = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.Timeout = 1; - test1.PrivacyMode = true; - - OutDial test2 = new OutDial("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test2.ActionUrl = "ts"; - test2.CallConnectUrl = "ts"; - test2.CallingNumber = "ts"; - test2.Destination = "ts"; - test2.IfMachine = IfMachine.HANGUP; - test2.IfMachineUrl = "ts"; - test2.SendDigits = "ts"; - test2.StatusCallbackUrl = "ts"; - test2.Timeout = 2; - test2.PrivacyMode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - OutDial test1 = new OutDial("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.CallingNumber = "TS"; - test1.Destination = "TS"; - test1.IfMachine = IfMachine.REDIRECT; - test1.IfMachineUrl = "TS"; - test1.SendDigits = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.Timeout = 1; - test1.PrivacyMode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - OutDial test1 = new OutDial("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.CallingNumber = "TS"; - test1.Destination = "TS"; - test1.IfMachine = IfMachine.REDIRECT; - test1.IfMachineUrl = "TS"; - test1.SendDigits = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.Timeout = 1; - test1.PrivacyMode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - OutDial test1 = new OutDial("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.CallingNumber = "TS"; - test1.Destination = "TS"; - test1.IfMachine = IfMachine.REDIRECT; - test1.IfMachineUrl = "TS"; - test1.SendDigits = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.Timeout = 1; - test1.PrivacyMode = true; - - OutDial test2 = new OutDial("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.CallingNumber = "TS"; - test2.Destination = "TS"; - test2.IfMachine = IfMachine.REDIRECT; - test2.IfMachineUrl = "TS"; - test2.SendDigits = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.Timeout = 1; - test2.PrivacyMode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - OutDial test1 = new OutDial("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.CallingNumber = "TS"; - test1.Destination = "TS"; - test1.IfMachine = IfMachine.REDIRECT; - test1.IfMachineUrl = "TS"; - test1.SendDigits = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.Timeout = 1; - test1.PrivacyMode = true; - - OutDial test2 = new OutDial("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.CallingNumber = "TS"; - test2.Destination = "TS"; - test2.IfMachine = IfMachine.REDIRECT; - test2.IfMachineUrl = "TS"; - test2.SendDigits = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.Timeout = 1; - test2.PrivacyMode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - OutDial test1 = new OutDial("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.CallConnectUrl = "TS"; - test1.CallingNumber = "TS"; - test1.Destination = "TS"; - test1.IfMachine = IfMachine.REDIRECT; - test1.IfMachineUrl = "TS"; - test1.SendDigits = "TS"; - test1.StatusCallbackUrl = "TS"; - test1.Timeout = 1; - test1.PrivacyMode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - OutDial test2 = new OutDial("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.CallConnectUrl = "TS"; - test2.CallingNumber = "TS"; - test2.Destination = "TS"; - test2.IfMachine = IfMachine.REDIRECT; - test2.IfMachineUrl = "TS"; - test2.SendDigits = "TS"; - test2.StatusCallbackUrl = "TS"; - test2.Timeout = 1; - test2.PrivacyMode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.False(instance.PrivacyMode); } } } diff --git a/src/freeclimb.Test/Model/PaginationModelTests.cs b/src/freeclimb.Test/Model/PaginationModelTests.cs index 7981fb04..64ffdb94 100644 --- a/src/freeclimb.Test/Model/PaginationModelTests.cs +++ b/src/freeclimb.Test/Model/PaginationModelTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,27 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class PaginationModelTests + + public class PaginationModelTests : IDisposable { private PaginationModel instance; public PaginationModelTests() { - - instance = new PaginationModel(1, 1, 1, 1, 1, 1, "TEST_STRING"); - + instance = new PaginationModel( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +63,66 @@ public void PaginationModelInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,190 +131,6 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - PaginationModel test1 = new PaginationModel(1, 1, 1, 1, 1, 1, "TEST_STRING"); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - - PaginationModel test2 = new PaginationModel(1, 1, 1, 1, 1, 1, "TEST_STRING"); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - PaginationModel test1 = new PaginationModel(1, 1, 1, 1, 1, 1, "TEST_STRING"); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - - PaginationModel test2 = new PaginationModel(1, 1, 1, 1, 1, 1, "TEST_STRING"); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - PaginationModel test1 = new PaginationModel(1, 1, 1, 1, 1, 1, "TEST_STRING"); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - PaginationModel test1 = new PaginationModel(1, 1, 1, 1, 1, 1, "TEST_STRING"); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - PaginationModel test1 = new PaginationModel(1, 1, 1, 1, 1, 1, "TEST_STRING"); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - - PaginationModel test2 = new PaginationModel(1, 1, 1, 1, 1, 1, "TEST_STRING"); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - PaginationModel test1 = new PaginationModel(1, 1, 1, 1, 1, 1, "TEST_STRING"); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - - PaginationModel test2 = new PaginationModel(1, 1, 1, 1, 1, 1, "TEST_STRING"); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - PaginationModel test1 = new PaginationModel(1, 1, 1, 1, 1, 1, "TEST_STRING"); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - PaginationModel test2 = new PaginationModel(1, 1, 1, 1, 1, 1, "TEST_STRING"); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/ParkAllOfTests.cs b/src/freeclimb.Test/Model/ParkAllOfTests.cs deleted file mode 100644 index dd4c8555..00000000 --- a/src/freeclimb.Test/Model/ParkAllOfTests.cs +++ /dev/null @@ -1,226 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing ParkAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ParkAllOfTests - { - private ParkAllOf instance; - - public ParkAllOfTests() - { - - instance = new ParkAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING"); - - } - - /// - /// Test an instance of ParkAllOf - /// - [Fact] - public void ParkAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'WaitUrl' - /// - [Fact] - public void WaitUrlTest() - { - - instance.WaitUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.WaitUrl); - } - /// - /// Test the property 'ActionUrl' - /// - [Fact] - public void ActionUrlTest() - { - - instance.ActionUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ActionUrl); - } - /// - /// Test the property 'NotificationUrl' - /// - [Fact] - public void NotificationUrlTest() - { - instance.NotificationUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.NotificationUrl); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - ParkAllOf test1 = new ParkAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - - ParkAllOf test2 = new ParkAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - ParkAllOf test1 = new ParkAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - - ParkAllOf test2 = new ParkAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.WaitUrl = "ts"; - test2.ActionUrl = "ts"; - test2.NotificationUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - ParkAllOf test1 = new ParkAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - ParkAllOf test1 = new ParkAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - ParkAllOf test1 = new ParkAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - - ParkAllOf test2 = new ParkAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - ParkAllOf test1 = new ParkAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - - ParkAllOf test2 = new ParkAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - ParkAllOf test1 = new ParkAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - ParkAllOf test2 = new ParkAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/ParkTests.cs b/src/freeclimb.Test/Model/ParkTests.cs index 989dc8d0..baa150fc 100644 --- a/src/freeclimb.Test/Model/ParkTests.cs +++ b/src/freeclimb.Test/Model/ParkTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,23 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class ParkTests + + public class ParkTests : IDisposable { private Park instance; public ParkTests() { - - instance = new Park("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - + instance = new Park( + waitUrl: (string)TestHelpers.getTestValue(typeof(string)), + actionUrl: (string)TestHelpers.getTestValue(typeof(string)), + notificationUrl: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,27 +59,26 @@ public void ParkInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'WaitUrl' /// [Fact] public void WaitUrlTest() { - instance.WaitUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.WaitUrl); } + /// /// Test the property 'ActionUrl' /// [Fact] public void ActionUrlTest() { - instance.ActionUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ActionUrl); } + /// /// Test the property 'NotificationUrl' /// @@ -85,142 +87,6 @@ public void NotificationUrlTest() { instance.NotificationUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NotificationUrl); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - Park test1 = new Park("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - - Park test2 = new Park("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - Park test1 = new Park("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - - Park test2 = new Park("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.WaitUrl = "ts"; - test2.ActionUrl = "ts"; - test2.NotificationUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - Park test1 = new Park("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - Park test1 = new Park("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - Park test1 = new Park("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - - Park test2 = new Park("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - Park test1 = new Park("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - - Park test2 = new Park("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - Park test1 = new Park("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.WaitUrl = "TS"; - test1.ActionUrl = "TS"; - test1.NotificationUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - Park test2 = new Park("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.WaitUrl = "TS"; - test2.ActionUrl = "TS"; - test2.NotificationUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/PauseAllOfTests.cs b/src/freeclimb.Test/Model/PauseAllOfTests.cs deleted file mode 100644 index 7580783f..00000000 --- a/src/freeclimb.Test/Model/PauseAllOfTests.cs +++ /dev/null @@ -1,182 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing PauseAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class PauseAllOfTests - { - private PauseAllOf instance; - - public PauseAllOfTests() - { - - instance = new PauseAllOf(1); - - } - - /// - /// Test an instance of PauseAllOf - /// - [Fact] - public void PauseAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Length' - /// - [Fact] - public void LengthTest() - { - - instance.Length = 1; - Assert.Equal(1, (int) instance.Length); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - PauseAllOf test1 = new PauseAllOf(1); - test1.Length = 1; - - PauseAllOf test2 = new PauseAllOf(1); - test2.Length = 1; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - PauseAllOf test1 = new PauseAllOf(1); - test1.Length = 1; - - PauseAllOf test2 = new PauseAllOf(1); - test2.Length = 2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - PauseAllOf test1 = new PauseAllOf(1); - test1.Length = 1; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - PauseAllOf test1 = new PauseAllOf(1); - test1.Length = 1; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - PauseAllOf test1 = new PauseAllOf(1); - test1.Length = 1; - - PauseAllOf test2 = new PauseAllOf(1); - test2.Length = 1; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - PauseAllOf test1 = new PauseAllOf(1); - test1.Length = 1; - - PauseAllOf test2 = new PauseAllOf(1); - test2.Length = 1; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - PauseAllOf test1 = new PauseAllOf(1); - test1.Length = 1; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - PauseAllOf test2 = new PauseAllOf(1); - test2.Length = 1; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/PauseTests.cs b/src/freeclimb.Test/Model/PauseTests.cs index 8626d310..ccb7bb58 100644 --- a/src/freeclimb.Test/Model/PauseTests.cs +++ b/src/freeclimb.Test/Model/PauseTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,19 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class PauseTests + + public class PauseTests : IDisposable { private Pause instance; public PauseTests() { - - instance = new Pause(1, "TEST_STRING"); - + instance = new Pause(length: (int)TestHelpers.getTestValue(typeof(int))); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,127 +55,14 @@ public void PauseInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Length' /// [Fact] public void LengthTest() { - instance.Length = 1; - Assert.Equal(1, (int) instance.Length); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - Pause test1 = new Pause(1, "TEST_STRING"); - test1.Length = 1; - - Pause test2 = new Pause(1, "TEST_STRING"); - test2.Length = 1; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - Pause test1 = new Pause(1, "TEST_STRING"); - test1.Length = 1; - - Pause test2 = new Pause(1, "TEST_STRING"); - test2.Length = 2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - Pause test1 = new Pause(1, "TEST_STRING"); - test1.Length = 1; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - Pause test1 = new Pause(1, "TEST_STRING"); - test1.Length = 1; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - Pause test1 = new Pause(1, "TEST_STRING"); - test1.Length = 1; - - Pause test2 = new Pause(1, "TEST_STRING"); - test2.Length = 1; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - Pause test1 = new Pause(1, "TEST_STRING"); - test1.Length = 1; - - Pause test2 = new Pause(1, "TEST_STRING"); - test2.Length = 1; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - Pause test1 = new Pause(1, "TEST_STRING"); - test1.Length = 1; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - Pause test2 = new Pause(1, "TEST_STRING"); - test2.Length = 1; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(1, (int)instance.Length); } } } diff --git a/src/freeclimb.Test/Model/PerclCommandTests.cs b/src/freeclimb.Test/Model/PerclCommandTests.cs index 77c61682..b07015b7 100644 --- a/src/freeclimb.Test/Model/PerclCommandTests.cs +++ b/src/freeclimb.Test/Model/PerclCommandTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,353 +31,4 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class PerclCommandTests - { - private PerclCommand instance; - - public PerclCommandTests() - { - - instance = new PerclCommand("TEST_STRING"); - - } - - /// - /// Test an instance of PerclCommand - /// - [Fact] - public void PerclCommandInstanceTest() - { - Assert.IsType(instance); - } - - /// - /// Test deserialize a TranscribeUtterance from type PerclCommand - /// - [Fact] - public void TranscribeUtteranceDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new TranscribeUtterance("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List(), "TEST_STRING").ToJson())); - } - /// - /// Test deserialize a Reject from type PerclCommand - /// - [Fact] - public void RejectDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new Reject("TEST_STRING").ToJson())); - } - /// - /// Test deserialize a RemoveFromConference from type PerclCommand - /// - [Fact] - public void RemoveFromConferenceDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new RemoveFromConference().ToJson())); - } - /// - /// Test deserialize a SetDTMFPassThrough from type PerclCommand - /// - [Fact] - public void SetDTMFPassThroughDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new SetDTMFPassThrough(false).ToJson())); - } - /// - /// Test deserialize a TerminateConference from type PerclCommand - /// - [Fact] - public void TerminateConferenceDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new TerminateConference().ToJson())); - } - /// - /// Test deserialize a Park from type PerclCommand - /// - [Fact] - public void ParkDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new Park("https://a.com", "https://a.com", "TEST_STRING", "TEST_STRING").ToJson())); - } - /// - /// Test deserialize a SendDigits from type PerclCommand - /// - [Fact] - public void SendDigitsDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new SendDigits("TEST_STRING", 1, false).ToJson())); - } - /// - /// Test deserialize a AddToConference from type PerclCommand - /// - [Fact] - public void AddToConferenceDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new AddToConference(false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, "TEST_STRING", false, false).ToJson())); - } - /// - /// Test deserialize a Sms from type PerclCommand - /// - [Fact] - public void SmsDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new Sms("TEST_STRING", "TEST_STRING", "TEST_STRING").ToJson())); - } - /// - /// Test deserialize a Pause from type PerclCommand - /// - [Fact] - public void PauseDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new Pause(1).ToJson())); - } - /// - /// Test deserialize a Redirect from type PerclCommand - /// - [Fact] - public void RedirectDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new Redirect("https://a.com").ToJson())); - } - /// - /// Test deserialize a Unpark from type PerclCommand - /// - [Fact] - public void UnparkDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new Unpark().ToJson())); - } - /// - /// Test deserialize a Play from type PerclCommand - /// - [Fact] - public void PlayDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new Play("TEST_STRING", 1, false).ToJson())); - } - /// - /// Test deserialize a SetTalk from type PerclCommand - /// - [Fact] - public void SetTalkDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new SetTalk(false).ToJson())); - } - /// - /// Test deserialize a OutDial from type PerclCommand - /// - [Fact] - public void OutDialDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new OutDial("https://a.com", "https://a.com", "TEST_STRING", "TEST_STRING", IfMachine.REDIRECT, "https://a.com", "TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING").ToJson())); - } - /// - /// Test deserialize a GetSpeech from type PerclCommand - /// - [Fact] - public void GetSpeechDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new GetSpeech("https://a.com", GrammarType.URL, "TEST_STRING", "TEST_STRING", false, new List(), 1, 1, 1, 1, 1, 1, false, "TEST_STRING").ToJson())); - } - /// - /// Test deserialize a GetDigits from type PerclCommand - /// - [Fact] - public void GetDigitsDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new GetDigits("https://a.com", 1, "TEST_STRING", false, 300, 1, 1, new List(), false, "TEST_STRING").ToJson())); - } - /// - /// Test deserialize a CreateConference from type PerclCommand - /// - [Fact] - public void CreateConferenceDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new CreateConference("TEST_STRING", false, PlayBeep.ALWAYS, false, "https://a.com", "https://a.com", "TEST_STRING").ToJson())); - } - /// - /// Test deserialize a StartRecordCall from type PerclCommand - /// - [Fact] - public void StartRecordCallDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new StartRecordCall().ToJson())); - } - /// - /// Test deserialize a SetListen from type PerclCommand - /// - [Fact] - public void SetListenDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new SetListen(false).ToJson())); - } - /// - /// Test deserialize a PlayEarlyMedia from type PerclCommand - /// - [Fact] - public void PlayEarlyMediaDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new PlayEarlyMedia("TEST_STRING").ToJson())); - } - /// - /// Test deserialize a Hangup from type PerclCommand - /// - [Fact] - public void HangupDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new Hangup().ToJson())); - } - /// - /// Test deserialize a Say from type PerclCommand - /// - [Fact] - public void SayDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new Say("TEST_STRING", "TEST_STRING", 1, false).ToJson())); - } - /// - /// Test deserialize a Enqueue from type PerclCommand - /// - [Fact] - public void EnqueueDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new Enqueue("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING").ToJson())); - } - /// - /// Test deserialize a Dequeue from type PerclCommand - /// - [Fact] - public void DequeueDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new Dequeue().ToJson())); - } - /// - /// Test deserialize a RecordUtterance from type PerclCommand - /// - [Fact] - public void RecordUtteranceDeserializeFromPerclCommandTest() - { - Assert.IsType(JsonConvert.DeserializeObject(new RecordUtterance("https://a.com", 1, "TEST_STRING", 1, false, false, false).ToJson())); - } - - /// - /// Test the property 'Command' - /// - [Fact] - public void CommandTest() - { - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - PerclCommand test1 = new PerclCommand("TEST_STRING"); - test1.Command = "TS"; - - PerclCommand test2 = new PerclCommand("TEST_STRING"); - test2.Command = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - PerclCommand test1 = new PerclCommand("TEST_STRING"); - test1.Command = "TS"; - - PerclCommand test2 = new PerclCommand("TEST_STRING"); - test2.Command = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - PerclCommand test1 = new PerclCommand("TEST_STRING"); - test1.Command = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - PerclCommand test1 = new PerclCommand("TEST_STRING"); - test1.Command = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - PerclCommand test1 = new PerclCommand("TEST_STRING"); - test1.Command = "TS"; - - PerclCommand test2 = new PerclCommand("TEST_STRING"); - test2.Command = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - PerclCommand test1 = new PerclCommand("TEST_STRING"); - test1.Command = "TS"; - - PerclCommand test2 = new PerclCommand("TEST_STRING"); - test2.Command = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - PerclCommand test1 = new PerclCommand("TEST_STRING"); - test1.Command = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - PerclCommand test2 = new PerclCommand("TEST_STRING"); - test2.Command = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } } diff --git a/src/freeclimb.Test/Model/PerclScriptTests.cs b/src/freeclimb.Test/Model/PerclScriptTests.cs index 3733f517..05c988f9 100644 --- a/src/freeclimb.Test/Model/PerclScriptTests.cs +++ b/src/freeclimb.Test/Model/PerclScriptTests.cs @@ -9,24 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - +using freeclimb.Client; using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -38,46 +32,51 @@ namespace freeclimb.Test.Model /// Please update the test case below to test the model. /// public class PerclScriptTemplateTests : IDisposable -{ - // TODO uncomment below to declare an instance variable for PerclScript - private PerclScript instance; - - public PerclScriptTemplateTests() { - instance = new PerclScript(); - CreateConference create = new CreateConference("", false, PlayBeep.ALWAYS, false, "", ""); - List commands = new List(); - commands.Add(create); - instance = new PerclScript(commands); - } + // TODO uncomment below to declare an instance variable for PerclScript + private PerclScript instance; - public void Dispose() - { - // Cleanup when everything is done. - } + public PerclScriptTemplateTests() + { + instance = new PerclScript(); + CreateConference create = new CreateConference( + "", + false, + PlayBeep.ALWAYS, + false, + "", + "" + ); + List commands = new List(); + commands.Add(create); + instance = new PerclScript(commands); + } - /// - /// Test an instance of PerclScript - /// - [Fact] - public void PerclScriptInstanceTest() - { - // TODO uncomment below to test "IsType" PerclScript - //Assert.IsType(instance); - } + public void Dispose() + { + // Cleanup when everything is done. + } + /// + /// Test an instance of PerclScript + /// + [Fact] + public void PerclScriptInstanceTest() + { + Assert.IsType(instance); + } - /// - /// Test the property 'PerclScript' - /// - [Fact] - public void CommandsTest() - { - // TODO unit test for the property 'Commands' - string actualJSONString = instance.ToJson(); - string expectedJSONString = "[{\"CreateConference\":{\"actionUrl\":\"\",\"alias\":false,\"playBeep\":\"always\",\"record\":false,\"statusCallbackUrl\":\"\",\"waitUrl\":\"\"}}]"; - Assert.Equal(expectedJSONString, actualJSONString); + /// + /// Test the property 'PerclScript' + /// + [Fact] + public void CommandsTest() + { + // TODO unit test for the property 'Commands' + string actualJSONString = instance.ToJson(); + string expectedJSONString = + "[{\"CreateConference\":{\"actionUrl\":\"\",\"alias\":false,\"playBeep\":\"always\",\"record\":false,\"statusCallbackUrl\":\"\",\"waitUrl\":\"\"}}]"; + Assert.Equal(expectedJSONString, actualJSONString); + } } } - -} diff --git a/src/freeclimb.Test/Model/PlayAllOfTests.cs b/src/freeclimb.Test/Model/PlayAllOfTests.cs deleted file mode 100644 index 764f55c2..00000000 --- a/src/freeclimb.Test/Model/PlayAllOfTests.cs +++ /dev/null @@ -1,226 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing PlayAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class PlayAllOfTests - { - private PlayAllOf instance; - - public PlayAllOfTests() - { - - instance = new PlayAllOf("TEST_STRING", 1, false); - - } - - /// - /// Test an instance of PlayAllOf - /// - [Fact] - public void PlayAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'File' - /// - [Fact] - public void FileTest() - { - instance.File = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.File); - - } - /// - /// Test the property 'Loop' - /// - [Fact] - public void LoopTest() - { - - instance.Loop = 1; - Assert.Equal(1, (int) instance.Loop); - } - /// - /// Test the property 'PrivacyMode' - /// - [Fact] - public void PrivacyModeTest() - { - instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - PlayAllOf test1 = new PlayAllOf("TEST_STRING", 1, false); - test1.File = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - PlayAllOf test2 = new PlayAllOf("TEST_STRING", 1, false); - test2.File = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - PlayAllOf test1 = new PlayAllOf("TEST_STRING", 1, false); - test1.File = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - PlayAllOf test2 = new PlayAllOf("TEST_STRING", 1, false); - test2.File = "ts"; - test2.Loop = 2; - test2.PrivacyMode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - PlayAllOf test1 = new PlayAllOf("TEST_STRING", 1, false); - test1.File = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - PlayAllOf test1 = new PlayAllOf("TEST_STRING", 1, false); - test1.File = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - PlayAllOf test1 = new PlayAllOf("TEST_STRING", 1, false); - test1.File = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - PlayAllOf test2 = new PlayAllOf("TEST_STRING", 1, false); - test2.File = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - PlayAllOf test1 = new PlayAllOf("TEST_STRING", 1, false); - test1.File = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - PlayAllOf test2 = new PlayAllOf("TEST_STRING", 1, false); - test2.File = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - PlayAllOf test1 = new PlayAllOf("TEST_STRING", 1, false); - test1.File = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - PlayAllOf test2 = new PlayAllOf("TEST_STRING", 1, false); - test2.File = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/PlayEarlyMediaAllOfTests.cs b/src/freeclimb.Test/Model/PlayEarlyMediaAllOfTests.cs deleted file mode 100644 index 6560aef3..00000000 --- a/src/freeclimb.Test/Model/PlayEarlyMediaAllOfTests.cs +++ /dev/null @@ -1,182 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing PlayEarlyMediaAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class PlayEarlyMediaAllOfTests - { - private PlayEarlyMediaAllOf instance; - - public PlayEarlyMediaAllOfTests() - { - - instance = new PlayEarlyMediaAllOf("TEST_STRING"); - - } - - /// - /// Test an instance of PlayEarlyMediaAllOf - /// - [Fact] - public void PlayEarlyMediaAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'File' - /// - [Fact] - public void FileTest() - { - instance.File = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.File); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - PlayEarlyMediaAllOf test1 = new PlayEarlyMediaAllOf("TEST_STRING"); - test1.File = "TS"; - - PlayEarlyMediaAllOf test2 = new PlayEarlyMediaAllOf("TEST_STRING"); - test2.File = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - PlayEarlyMediaAllOf test1 = new PlayEarlyMediaAllOf("TEST_STRING"); - test1.File = "TS"; - - PlayEarlyMediaAllOf test2 = new PlayEarlyMediaAllOf("TEST_STRING"); - test2.File = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - PlayEarlyMediaAllOf test1 = new PlayEarlyMediaAllOf("TEST_STRING"); - test1.File = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - PlayEarlyMediaAllOf test1 = new PlayEarlyMediaAllOf("TEST_STRING"); - test1.File = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - PlayEarlyMediaAllOf test1 = new PlayEarlyMediaAllOf("TEST_STRING"); - test1.File = "TS"; - - PlayEarlyMediaAllOf test2 = new PlayEarlyMediaAllOf("TEST_STRING"); - test2.File = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - PlayEarlyMediaAllOf test1 = new PlayEarlyMediaAllOf("TEST_STRING"); - test1.File = "TS"; - - PlayEarlyMediaAllOf test2 = new PlayEarlyMediaAllOf("TEST_STRING"); - test2.File = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - PlayEarlyMediaAllOf test1 = new PlayEarlyMediaAllOf("TEST_STRING"); - test1.File = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - PlayEarlyMediaAllOf test2 = new PlayEarlyMediaAllOf("TEST_STRING"); - test2.File = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/PlayEarlyMediaTests.cs b/src/freeclimb.Test/Model/PlayEarlyMediaTests.cs index 91be2bd6..cc99e31b 100644 --- a/src/freeclimb.Test/Model/PlayEarlyMediaTests.cs +++ b/src/freeclimb.Test/Model/PlayEarlyMediaTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,19 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class PlayEarlyMediaTests + + public class PlayEarlyMediaTests : IDisposable { private PlayEarlyMedia instance; public PlayEarlyMediaTests() { - - instance = new PlayEarlyMedia("TEST_STRING", "TEST_STRING"); - + instance = new PlayEarlyMedia(file: (string)TestHelpers.getTestValue(typeof(string))); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +55,6 @@ public void PlayEarlyMediaInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'File' /// @@ -65,118 +63,6 @@ public void FileTest() { instance.File = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.File); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - PlayEarlyMedia test1 = new PlayEarlyMedia("TEST_STRING", "TEST_STRING"); - test1.File = "TS"; - - PlayEarlyMedia test2 = new PlayEarlyMedia("TEST_STRING", "TEST_STRING"); - test2.File = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - PlayEarlyMedia test1 = new PlayEarlyMedia("TEST_STRING", "TEST_STRING"); - test1.File = "TS"; - - PlayEarlyMedia test2 = new PlayEarlyMedia("TEST_STRING", "TEST_STRING"); - test2.File = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - PlayEarlyMedia test1 = new PlayEarlyMedia("TEST_STRING", "TEST_STRING"); - test1.File = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - PlayEarlyMedia test1 = new PlayEarlyMedia("TEST_STRING", "TEST_STRING"); - test1.File = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - PlayEarlyMedia test1 = new PlayEarlyMedia("TEST_STRING", "TEST_STRING"); - test1.File = "TS"; - - PlayEarlyMedia test2 = new PlayEarlyMedia("TEST_STRING", "TEST_STRING"); - test2.File = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - PlayEarlyMedia test1 = new PlayEarlyMedia("TEST_STRING", "TEST_STRING"); - test1.File = "TS"; - - PlayEarlyMedia test2 = new PlayEarlyMedia("TEST_STRING", "TEST_STRING"); - test2.File = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - PlayEarlyMedia test1 = new PlayEarlyMedia("TEST_STRING", "TEST_STRING"); - test1.File = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - PlayEarlyMedia test2 = new PlayEarlyMedia("TEST_STRING", "TEST_STRING"); - test2.File = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/PlayTests.cs b/src/freeclimb.Test/Model/PlayTests.cs index db6c6738..9d34df32 100644 --- a/src/freeclimb.Test/Model/PlayTests.cs +++ b/src/freeclimb.Test/Model/PlayTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,23 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class PlayTests + + public class PlayTests : IDisposable { private Play instance; public PlayTests() { - - instance = new Play("TEST_STRING", 1, false, "TEST_STRING"); - + instance = new Play( + file: (string)TestHelpers.getTestValue(typeof(string)), + loop: (int)TestHelpers.getTestValue(typeof(int)), + privacyMode: (bool)TestHelpers.getTestValue(typeof(bool)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +59,6 @@ public void PlayInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'File' /// @@ -65,18 +67,18 @@ public void FileTest() { instance.File = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.File); - } + /// /// Test the property 'Loop' /// [Fact] public void LoopTest() { - instance.Loop = 1; - Assert.Equal(1, (int) instance.Loop); + Assert.Equal(1, (int)instance.Loop); } + /// /// Test the property 'PrivacyMode' /// @@ -84,143 +86,7 @@ public void LoopTest() public void PrivacyModeTest() { instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - Play test1 = new Play("TEST_STRING", 1, false, "TEST_STRING"); - test1.File = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - Play test2 = new Play("TEST_STRING", 1, false, "TEST_STRING"); - test2.File = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - Play test1 = new Play("TEST_STRING", 1, false, "TEST_STRING"); - test1.File = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - Play test2 = new Play("TEST_STRING", 1, false, "TEST_STRING"); - test2.File = "ts"; - test2.Loop = 2; - test2.PrivacyMode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - Play test1 = new Play("TEST_STRING", 1, false, "TEST_STRING"); - test1.File = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - Play test1 = new Play("TEST_STRING", 1, false, "TEST_STRING"); - test1.File = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - Play test1 = new Play("TEST_STRING", 1, false, "TEST_STRING"); - test1.File = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - Play test2 = new Play("TEST_STRING", 1, false, "TEST_STRING"); - test2.File = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - Play test1 = new Play("TEST_STRING", 1, false, "TEST_STRING"); - test1.File = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - Play test2 = new Play("TEST_STRING", 1, false, "TEST_STRING"); - test2.File = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - Play test1 = new Play("TEST_STRING", 1, false, "TEST_STRING"); - test1.File = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - Play test2 = new Play("TEST_STRING", 1, false, "TEST_STRING"); - test2.File = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.False(instance.PrivacyMode); } } } diff --git a/src/freeclimb.Test/Model/QueueListAllOfTests.cs b/src/freeclimb.Test/Model/QueueListAllOfTests.cs deleted file mode 100644 index 63813bef..00000000 --- a/src/freeclimb.Test/Model/QueueListAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing QueueListAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class QueueListAllOfTests - { - private QueueListAllOf instance; - - public QueueListAllOfTests() - { - - instance = new QueueListAllOf(new List()); - - } - - /// - /// Test an instance of QueueListAllOf - /// - [Fact] - public void QueueListAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Queues' - /// - [Fact] - public void QueuesTest() - { - - List testList = new List(); - instance.Queues = testList; - Assert.Equal(testList, instance.Queues); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - QueueListAllOf test1 = new QueueListAllOf(new List()); - List testList = new List(); - test1.Queues = testList; - - QueueListAllOf test2 = new QueueListAllOf(new List()); - List testList2 = new List(); - test2.Queues = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - QueueListAllOf test1 = new QueueListAllOf(new List()); - List testList = new List(); - test1.Queues = testList; - - QueueListAllOf test2 = new QueueListAllOf(new List()); - List testList2 = null; - test2.Queues = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - QueueListAllOf test1 = new QueueListAllOf(new List()); - List testList = new List(); - test1.Queues = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - QueueListAllOf test1 = new QueueListAllOf(new List()); - List testList = new List(); - test1.Queues = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - QueueListAllOf test1 = new QueueListAllOf(new List()); - List testList = new List(); - test1.Queues = testList; - - QueueListAllOf test2 = new QueueListAllOf(new List()); - List testList2 = new List(); - test2.Queues = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - QueueListAllOf test1 = new QueueListAllOf(new List()); - List testList = new List(); - test1.Queues = testList; - - QueueListAllOf test2 = new QueueListAllOf(new List()); - List testList2 = new List(); - test2.Queues = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - QueueListAllOf test1 = new QueueListAllOf(new List()); - List testList = new List(); - test1.Queues = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - QueueListAllOf test2 = new QueueListAllOf(new List()); - List testList2 = new List(); - test2.Queues = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/QueueListTests.cs b/src/freeclimb.Test/Model/QueueListTests.cs index ddd7cce0..57eb524a 100644 --- a/src/freeclimb.Test/Model/QueueListTests.cs +++ b/src/freeclimb.Test/Model/QueueListTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,28 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class QueueListTests + + public class QueueListTests : IDisposable { private QueueList instance; public QueueListTests() { - - instance = new QueueList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new QueueList( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + queues: (List)TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +64,66 @@ public void QueueListInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +132,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'Queues' /// [Fact] public void QueuesTest() { - List testList = new List(); instance.Queues = testList; - Assert.Equal(testList, instance.Queues); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - QueueList test1 = new QueueList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Queues = testList; - - QueueList test2 = new QueueList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Queues = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - QueueList test1 = new QueueList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Queues = testList; - - QueueList test2 = new QueueList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.Queues = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - QueueList test1 = new QueueList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Queues = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - QueueList test1 = new QueueList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Queues = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - QueueList test1 = new QueueList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Queues = testList; - - QueueList test2 = new QueueList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Queues = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - QueueList test1 = new QueueList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Queues = testList; - - QueueList test2 = new QueueList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Queues = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - QueueList test1 = new QueueList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Queues = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - QueueList test2 = new QueueList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Queues = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.Queues, testList); } } } diff --git a/src/freeclimb.Test/Model/QueueMemberListAllOfTests.cs b/src/freeclimb.Test/Model/QueueMemberListAllOfTests.cs deleted file mode 100644 index 90c9394a..00000000 --- a/src/freeclimb.Test/Model/QueueMemberListAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing QueueMemberListAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class QueueMemberListAllOfTests - { - private QueueMemberListAllOf instance; - - public QueueMemberListAllOfTests() - { - - instance = new QueueMemberListAllOf(new List()); - - } - - /// - /// Test an instance of QueueMemberListAllOf - /// - [Fact] - public void QueueMemberListAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'QueueMembers' - /// - [Fact] - public void QueueMembersTest() - { - - List testList = new List(); - instance.QueueMembers = testList; - Assert.Equal(testList, instance.QueueMembers); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - QueueMemberListAllOf test1 = new QueueMemberListAllOf(new List()); - List testList = new List(); - test1.QueueMembers = testList; - - QueueMemberListAllOf test2 = new QueueMemberListAllOf(new List()); - List testList2 = new List(); - test2.QueueMembers = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - QueueMemberListAllOf test1 = new QueueMemberListAllOf(new List()); - List testList = new List(); - test1.QueueMembers = testList; - - QueueMemberListAllOf test2 = new QueueMemberListAllOf(new List()); - List testList2 = null; - test2.QueueMembers = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - QueueMemberListAllOf test1 = new QueueMemberListAllOf(new List()); - List testList = new List(); - test1.QueueMembers = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - QueueMemberListAllOf test1 = new QueueMemberListAllOf(new List()); - List testList = new List(); - test1.QueueMembers = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - QueueMemberListAllOf test1 = new QueueMemberListAllOf(new List()); - List testList = new List(); - test1.QueueMembers = testList; - - QueueMemberListAllOf test2 = new QueueMemberListAllOf(new List()); - List testList2 = new List(); - test2.QueueMembers = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - QueueMemberListAllOf test1 = new QueueMemberListAllOf(new List()); - List testList = new List(); - test1.QueueMembers = testList; - - QueueMemberListAllOf test2 = new QueueMemberListAllOf(new List()); - List testList2 = new List(); - test2.QueueMembers = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - QueueMemberListAllOf test1 = new QueueMemberListAllOf(new List()); - List testList = new List(); - test1.QueueMembers = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - QueueMemberListAllOf test2 = new QueueMemberListAllOf(new List()); - List testList2 = new List(); - test2.QueueMembers = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/QueueMemberListTests.cs b/src/freeclimb.Test/Model/QueueMemberListTests.cs index 861f9b0f..fa664068 100644 --- a/src/freeclimb.Test/Model/QueueMemberListTests.cs +++ b/src/freeclimb.Test/Model/QueueMemberListTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,28 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class QueueMemberListTests + + public class QueueMemberListTests : IDisposable { private QueueMemberList instance; public QueueMemberListTests() { - - instance = new QueueMemberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new QueueMemberList( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + queueMembers: (List)TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +64,66 @@ public void QueueMemberListInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +132,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'QueueMembers' /// [Fact] public void QueueMembersTest() { - List testList = new List(); instance.QueueMembers = testList; - Assert.Equal(testList, instance.QueueMembers); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - QueueMemberList test1 = new QueueMemberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.QueueMembers = testList; - - QueueMemberList test2 = new QueueMemberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.QueueMembers = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - QueueMemberList test1 = new QueueMemberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.QueueMembers = testList; - - QueueMemberList test2 = new QueueMemberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.QueueMembers = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - QueueMemberList test1 = new QueueMemberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.QueueMembers = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - QueueMemberList test1 = new QueueMemberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.QueueMembers = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - QueueMemberList test1 = new QueueMemberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.QueueMembers = testList; - - QueueMemberList test2 = new QueueMemberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.QueueMembers = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - QueueMemberList test1 = new QueueMemberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.QueueMembers = testList; - - QueueMemberList test2 = new QueueMemberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.QueueMembers = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - QueueMemberList test1 = new QueueMemberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.QueueMembers = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - QueueMemberList test2 = new QueueMemberList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.QueueMembers = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.QueueMembers, testList); } } } diff --git a/src/freeclimb.Test/Model/QueueMemberTests.cs b/src/freeclimb.Test/Model/QueueMemberTests.cs index 1faa091d..f6791be5 100644 --- a/src/freeclimb.Test/Model/QueueMemberTests.cs +++ b/src/freeclimb.Test/Model/QueueMemberTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,25 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class QueueMemberTests + + public class QueueMemberTests : IDisposable { private QueueMember instance; public QueueMemberTests() { - - instance = new QueueMember("TEST_STRING", "TEST_STRING", 1, 1, "TEST_STRING"); - + instance = new QueueMember( + uri: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + waitTime: (int?)TestHelpers.getTestValue(typeof(int?)), + position: (int?)TestHelpers.getTestValue(typeof(int?)), + dateEnqueued: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +61,6 @@ public void QueueMemberInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Uri' /// @@ -65,8 +69,8 @@ public void UriTest() { instance.Uri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Uri); - } + /// /// Test the property 'CallId' /// @@ -75,28 +79,28 @@ public void CallIdTest() { instance.CallId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CallId); - } + /// /// Test the property 'WaitTime' /// [Fact] public void WaitTimeTest() { - instance.WaitTime = 1; - Assert.Equal(1, (int) instance.WaitTime); + Assert.Equal(1, (int)instance.WaitTime); } + /// /// Test the property 'Position' /// [Fact] public void PositionTest() { - instance.Position = 1; - Assert.Equal(1, (int) instance.Position); + Assert.Equal(1, (int)instance.Position); } + /// /// Test the property 'DateEnqueued' /// @@ -105,166 +109,6 @@ public void DateEnqueuedTest() { instance.DateEnqueued = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateEnqueued); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - QueueMember test1 = new QueueMember("TEST_STRING", "TEST_STRING", 1, 1, "TEST_STRING"); - test1.Uri = "TS"; - test1.CallId = "TS"; - test1.WaitTime = 1; - test1.Position = 1; - test1.DateEnqueued = "TS"; - - QueueMember test2 = new QueueMember("TEST_STRING", "TEST_STRING", 1, 1, "TEST_STRING"); - test2.Uri = "TS"; - test2.CallId = "TS"; - test2.WaitTime = 1; - test2.Position = 1; - test2.DateEnqueued = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - QueueMember test1 = new QueueMember("TEST_STRING", "TEST_STRING", 1, 1, "TEST_STRING"); - test1.Uri = "TS"; - test1.CallId = "TS"; - test1.WaitTime = 1; - test1.Position = 1; - test1.DateEnqueued = "TS"; - - QueueMember test2 = new QueueMember("TEST_STRING", "TEST_STRING", 1, 1, "TEST_STRING"); - test2.Uri = "ts"; - test2.CallId = "ts"; - test2.WaitTime = 2; - test2.Position = 2; - test2.DateEnqueued = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - QueueMember test1 = new QueueMember("TEST_STRING", "TEST_STRING", 1, 1, "TEST_STRING"); - test1.Uri = "TS"; - test1.CallId = "TS"; - test1.WaitTime = 1; - test1.Position = 1; - test1.DateEnqueued = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - QueueMember test1 = new QueueMember("TEST_STRING", "TEST_STRING", 1, 1, "TEST_STRING"); - test1.Uri = "TS"; - test1.CallId = "TS"; - test1.WaitTime = 1; - test1.Position = 1; - test1.DateEnqueued = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - QueueMember test1 = new QueueMember("TEST_STRING", "TEST_STRING", 1, 1, "TEST_STRING"); - test1.Uri = "TS"; - test1.CallId = "TS"; - test1.WaitTime = 1; - test1.Position = 1; - test1.DateEnqueued = "TS"; - - QueueMember test2 = new QueueMember("TEST_STRING", "TEST_STRING", 1, 1, "TEST_STRING"); - test2.Uri = "TS"; - test2.CallId = "TS"; - test2.WaitTime = 1; - test2.Position = 1; - test2.DateEnqueued = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - QueueMember test1 = new QueueMember("TEST_STRING", "TEST_STRING", 1, 1, "TEST_STRING"); - test1.Uri = "TS"; - test1.CallId = "TS"; - test1.WaitTime = 1; - test1.Position = 1; - test1.DateEnqueued = "TS"; - - QueueMember test2 = new QueueMember("TEST_STRING", "TEST_STRING", 1, 1, "TEST_STRING"); - test2.Uri = "TS"; - test2.CallId = "TS"; - test2.WaitTime = 1; - test2.Position = 1; - test2.DateEnqueued = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - QueueMember test1 = new QueueMember("TEST_STRING", "TEST_STRING", 1, 1, "TEST_STRING"); - test1.Uri = "TS"; - test1.CallId = "TS"; - test1.WaitTime = 1; - test1.Position = 1; - test1.DateEnqueued = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - QueueMember test2 = new QueueMember("TEST_STRING", "TEST_STRING", 1, 1, "TEST_STRING"); - test2.Uri = "TS"; - test2.CallId = "TS"; - test2.WaitTime = 1; - test2.Position = 1; - test2.DateEnqueued = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/QueueRequestTests.cs b/src/freeclimb.Test/Model/QueueRequestTests.cs index cd81fed6..d5784ad2 100644 --- a/src/freeclimb.Test/Model/QueueRequestTests.cs +++ b/src/freeclimb.Test/Model/QueueRequestTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,22 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class QueueRequestTests + + public class QueueRequestTests : IDisposable { private QueueRequest instance; public QueueRequestTests() { - - instance = new QueueRequest("TEST_STRING", 1); - + instance = new QueueRequest( + alias: (string)TestHelpers.getTestValue(typeof(string)), + maxSize: (int)TestHelpers.getTestValue(typeof(int)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +58,6 @@ public void QueueRequestInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Alias' /// @@ -65,140 +66,16 @@ public void AliasTest() { instance.Alias = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Alias); - } + /// /// Test the property 'MaxSize' /// [Fact] public void MaxSizeTest() { - instance.MaxSize = 1; - Assert.Equal(1, (int) instance.MaxSize); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - QueueRequest test1 = new QueueRequest("TEST_STRING", 1); - test1.Alias = "TS"; - test1.MaxSize = 1; - - QueueRequest test2 = new QueueRequest("TEST_STRING", 1); - test2.Alias = "TS"; - test2.MaxSize = 1; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - QueueRequest test1 = new QueueRequest("TEST_STRING", 1); - test1.Alias = "TS"; - test1.MaxSize = 1; - - QueueRequest test2 = new QueueRequest("TEST_STRING", 1); - test2.Alias = "ts"; - test2.MaxSize = 2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - QueueRequest test1 = new QueueRequest("TEST_STRING", 1); - test1.Alias = "TS"; - test1.MaxSize = 1; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - QueueRequest test1 = new QueueRequest("TEST_STRING", 1); - test1.Alias = "TS"; - test1.MaxSize = 1; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - QueueRequest test1 = new QueueRequest("TEST_STRING", 1); - test1.Alias = "TS"; - test1.MaxSize = 1; - - QueueRequest test2 = new QueueRequest("TEST_STRING", 1); - test2.Alias = "TS"; - test2.MaxSize = 1; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - QueueRequest test1 = new QueueRequest("TEST_STRING", 1); - test1.Alias = "TS"; - test1.MaxSize = 1; - - QueueRequest test2 = new QueueRequest("TEST_STRING", 1); - test2.Alias = "TS"; - test2.MaxSize = 1; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - QueueRequest test1 = new QueueRequest("TEST_STRING", 1); - test1.Alias = "TS"; - test1.MaxSize = 1; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - QueueRequest test2 = new QueueRequest("TEST_STRING", 1); - test2.Alias = "TS"; - test2.MaxSize = 1; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(1, (int)instance.MaxSize); } } } diff --git a/src/freeclimb.Test/Model/QueueResultAllOfTests.cs b/src/freeclimb.Test/Model/QueueResultAllOfTests.cs deleted file mode 100644 index 76dff64e..00000000 --- a/src/freeclimb.Test/Model/QueueResultAllOfTests.cs +++ /dev/null @@ -1,327 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing QueueResultAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class QueueResultAllOfTests - { - private QueueResultAllOf instance; - - public QueueResultAllOfTests() - { - - instance = new QueueResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - - } - - /// - /// Test an instance of QueueResultAllOf - /// - [Fact] - public void QueueResultAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'AccountId' - /// - [Fact] - public void AccountIdTest() - { - instance.AccountId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.AccountId); - - } - /// - /// Test the property 'QueueId' - /// - [Fact] - public void QueueIdTest() - { - instance.QueueId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.QueueId); - - } - /// - /// Test the property 'Alias' - /// - [Fact] - public void AliasTest() - { - instance.Alias = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Alias); - - } - /// - /// Test the property 'MaxSize' - /// - [Fact] - public void MaxSizeTest() - { - - instance.MaxSize = 1; - Assert.Equal(1, (int) instance.MaxSize); - } - /// - /// Test the property 'CurrentSize' - /// - [Fact] - public void CurrentSizeTest() - { - - instance.CurrentSize = 1; - Assert.Equal(1, (int) instance.CurrentSize); - } - /// - /// Test the property 'AverageQueueRemovalTime' - /// - [Fact] - public void AverageQueueRemovalTimeTest() - { - - instance.AverageQueueRemovalTime = 1; - Assert.Equal(1, (int) instance.AverageQueueRemovalTime); - } - /// - /// Test the property 'SubresourceUris' - /// - [Fact] - public void SubresourceUrisTest() - { - object testObject = new object(); - instance.SubresourceUris = testObject; - Assert.Equal(testObject, instance.SubresourceUris); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - QueueResultAllOf test1 = new QueueResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test1.AccountId = "TS"; - test1.QueueId = "TS"; - test1.Alias = "TS"; - test1.MaxSize = 1; - test1.CurrentSize = 1; - test1.AverageQueueRemovalTime = 1; - object testObject = new object(); - test1.SubresourceUris = testObject; - - QueueResultAllOf test2 = new QueueResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test2.AccountId = "TS"; - test2.QueueId = "TS"; - test2.Alias = "TS"; - test2.MaxSize = 1; - test2.CurrentSize = 1; - test2.AverageQueueRemovalTime = 1; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - QueueResultAllOf test1 = new QueueResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test1.AccountId = "TS"; - test1.QueueId = "TS"; - test1.Alias = "TS"; - test1.MaxSize = 1; - test1.CurrentSize = 1; - test1.AverageQueueRemovalTime = 1; - object testObject = new object(); - test1.SubresourceUris = testObject; - - QueueResultAllOf test2 = new QueueResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test2.AccountId = "ts"; - test2.QueueId = "ts"; - test2.Alias = "ts"; - test2.MaxSize = 2; - test2.CurrentSize = 2; - test2.AverageQueueRemovalTime = 2; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - QueueResultAllOf test1 = new QueueResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test1.AccountId = "TS"; - test1.QueueId = "TS"; - test1.Alias = "TS"; - test1.MaxSize = 1; - test1.CurrentSize = 1; - test1.AverageQueueRemovalTime = 1; - object testObject = new object(); - test1.SubresourceUris = testObject; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - QueueResultAllOf test1 = new QueueResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test1.AccountId = "TS"; - test1.QueueId = "TS"; - test1.Alias = "TS"; - test1.MaxSize = 1; - test1.CurrentSize = 1; - test1.AverageQueueRemovalTime = 1; - object testObject = new object(); - test1.SubresourceUris = testObject; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - QueueResultAllOf test1 = new QueueResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test1.AccountId = "TS"; - test1.QueueId = "TS"; - test1.Alias = "TS"; - test1.MaxSize = 1; - test1.CurrentSize = 1; - test1.AverageQueueRemovalTime = 1; - object testObject = new object(); - test1.SubresourceUris = testObject; - - QueueResultAllOf test2 = new QueueResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test2.AccountId = "TS"; - test2.QueueId = "TS"; - test2.Alias = "TS"; - test2.MaxSize = 1; - test2.CurrentSize = 1; - test2.AverageQueueRemovalTime = 1; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - QueueResultAllOf test1 = new QueueResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test1.AccountId = "TS"; - test1.QueueId = "TS"; - test1.Alias = "TS"; - test1.MaxSize = 1; - test1.CurrentSize = 1; - test1.AverageQueueRemovalTime = 1; - object testObject = new object(); - test1.SubresourceUris = testObject; - - QueueResultAllOf test2 = new QueueResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test2.AccountId = "TS"; - test2.QueueId = "TS"; - test2.Alias = "TS"; - test2.MaxSize = 1; - test2.CurrentSize = 1; - test2.AverageQueueRemovalTime = 1; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - QueueResultAllOf test1 = new QueueResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test1.AccountId = "TS"; - test1.QueueId = "TS"; - test1.Alias = "TS"; - test1.MaxSize = 1; - test1.CurrentSize = 1; - test1.AverageQueueRemovalTime = 1; - object testObject = new object(); - test1.SubresourceUris = testObject; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - QueueResultAllOf test2 = new QueueResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test2.AccountId = "TS"; - test2.QueueId = "TS"; - test2.Alias = "TS"; - test2.MaxSize = 1; - test2.CurrentSize = 1; - test2.AverageQueueRemovalTime = 1; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/QueueResultTests.cs b/src/freeclimb.Test/Model/QueueResultTests.cs index bac4fc81..69cd9650 100644 --- a/src/freeclimb.Test/Model/QueueResultTests.cs +++ b/src/freeclimb.Test/Model/QueueResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,31 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class QueueResultTests + + public class QueueResultTests : IDisposable { private QueueResult instance; public QueueResultTests() { - - instance = new QueueResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - + instance = new QueueResult( + uri: (string)TestHelpers.getTestValue(typeof(string)), + dateCreated: (string)TestHelpers.getTestValue(typeof(string)), + dateUpdated: (string)TestHelpers.getTestValue(typeof(string)), + revision: (int)TestHelpers.getTestValue(typeof(int)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + alias: (string)TestHelpers.getTestValue(typeof(string)), + maxSize: (int?)TestHelpers.getTestValue(typeof(int?)), + currentSize: (int?)TestHelpers.getTestValue(typeof(int?)), + averageQueueRemovalTime: (int?)TestHelpers.getTestValue(typeof(int?)), + subresourceUris: (Object)TestHelpers.getTestValue(typeof(Object)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +67,6 @@ public void QueueResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Uri' /// @@ -65,8 +75,8 @@ public void UriTest() { instance.Uri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Uri); - } + /// /// Test the property 'DateCreated' /// @@ -75,8 +85,8 @@ public void DateCreatedTest() { instance.DateCreated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateCreated); - } + /// /// Test the property 'DateUpdated' /// @@ -85,18 +95,18 @@ public void DateUpdatedTest() { instance.DateUpdated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateUpdated); - } + /// /// Test the property 'Revision' /// [Fact] public void RevisionTest() { - instance.Revision = 1; - Assert.Equal(1, (int) instance.Revision); + Assert.Equal(1, (int)instance.Revision); } + /// /// Test the property 'AccountId' /// @@ -105,8 +115,8 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } + /// /// Test the property 'QueueId' /// @@ -115,8 +125,8 @@ public void QueueIdTest() { instance.QueueId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.QueueId); - } + /// /// Test the property 'Alias' /// @@ -125,38 +135,38 @@ public void AliasTest() { instance.Alias = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Alias); - } + /// /// Test the property 'MaxSize' /// [Fact] public void MaxSizeTest() { - instance.MaxSize = 1; - Assert.Equal(1, (int) instance.MaxSize); + Assert.Equal(1, (int)instance.MaxSize); } + /// /// Test the property 'CurrentSize' /// [Fact] public void CurrentSizeTest() { - instance.CurrentSize = 1; - Assert.Equal(1, (int) instance.CurrentSize); + Assert.Equal(1, (int)instance.CurrentSize); } + /// /// Test the property 'AverageQueueRemovalTime' /// [Fact] public void AverageQueueRemovalTimeTest() { - instance.AverageQueueRemovalTime = 1; - Assert.Equal(1, (int) instance.AverageQueueRemovalTime); + Assert.Equal(1, (int)instance.AverageQueueRemovalTime); } + /// /// Test the property 'SubresourceUris' /// @@ -166,250 +176,6 @@ public void SubresourceUrisTest() object testObject = new object(); instance.SubresourceUris = testObject; Assert.Equal(testObject, instance.SubresourceUris); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - QueueResult test1 = new QueueResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.QueueId = "TS"; - test1.Alias = "TS"; - test1.MaxSize = 1; - test1.CurrentSize = 1; - test1.AverageQueueRemovalTime = 1; - object testObject = new object(); - test1.SubresourceUris = testObject; - - QueueResult test2 = new QueueResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.QueueId = "TS"; - test2.Alias = "TS"; - test2.MaxSize = 1; - test2.CurrentSize = 1; - test2.AverageQueueRemovalTime = 1; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - QueueResult test1 = new QueueResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.QueueId = "TS"; - test1.Alias = "TS"; - test1.MaxSize = 1; - test1.CurrentSize = 1; - test1.AverageQueueRemovalTime = 1; - object testObject = new object(); - test1.SubresourceUris = testObject; - - QueueResult test2 = new QueueResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test2.Uri = "ts"; - test2.DateCreated = "ts"; - test2.DateUpdated = "ts"; - test2.Revision = 2; - test2.AccountId = "ts"; - test2.QueueId = "ts"; - test2.Alias = "ts"; - test2.MaxSize = 2; - test2.CurrentSize = 2; - test2.AverageQueueRemovalTime = 2; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - QueueResult test1 = new QueueResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.QueueId = "TS"; - test1.Alias = "TS"; - test1.MaxSize = 1; - test1.CurrentSize = 1; - test1.AverageQueueRemovalTime = 1; - object testObject = new object(); - test1.SubresourceUris = testObject; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - QueueResult test1 = new QueueResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.QueueId = "TS"; - test1.Alias = "TS"; - test1.MaxSize = 1; - test1.CurrentSize = 1; - test1.AverageQueueRemovalTime = 1; - object testObject = new object(); - test1.SubresourceUris = testObject; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - QueueResult test1 = new QueueResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.QueueId = "TS"; - test1.Alias = "TS"; - test1.MaxSize = 1; - test1.CurrentSize = 1; - test1.AverageQueueRemovalTime = 1; - object testObject = new object(); - test1.SubresourceUris = testObject; - - QueueResult test2 = new QueueResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.QueueId = "TS"; - test2.Alias = "TS"; - test2.MaxSize = 1; - test2.CurrentSize = 1; - test2.AverageQueueRemovalTime = 1; - object testObject2 = new object(); - test2.SubresourceUris = testObject2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - QueueResult test1 = new QueueResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.QueueId = "TS"; - test1.Alias = "TS"; - test1.MaxSize = 1; - test1.CurrentSize = 1; - test1.AverageQueueRemovalTime = 1; - object testObject = new object(); - test1.SubresourceUris = testObject; - - QueueResult test2 = new QueueResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.QueueId = "TS"; - test2.Alias = "TS"; - test2.MaxSize = 1; - test2.CurrentSize = 1; - test2.AverageQueueRemovalTime = 1; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - QueueResult test1 = new QueueResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.AccountId = "TS"; - test1.QueueId = "TS"; - test1.Alias = "TS"; - test1.MaxSize = 1; - test1.CurrentSize = 1; - test1.AverageQueueRemovalTime = 1; - object testObject = new object(); - test1.SubresourceUris = testObject; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - QueueResult test2 = new QueueResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, 1, 1, new object()); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.AccountId = "TS"; - test2.QueueId = "TS"; - test2.Alias = "TS"; - test2.MaxSize = 1; - test2.CurrentSize = 1; - test2.AverageQueueRemovalTime = 1; - object testObject2 = testObject; - test2.SubresourceUris = testObject2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/QueueWaitWebhookTests.cs b/src/freeclimb.Test/Model/QueueWaitWebhookTests.cs new file mode 100644 index 00000000..05b9d4ed --- /dev/null +++ b/src/freeclimb.Test/Model/QueueWaitWebhookTests.cs @@ -0,0 +1,214 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing QueueWaitWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class QueueWaitWebhookTests : IDisposable + { + private QueueWaitWebhook instance; + + public QueueWaitWebhookTests() + { + instance = new QueueWaitWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + queuePosition: (string)TestHelpers.getTestValue(typeof(string)), + queueTime: (int)TestHelpers.getTestValue(typeof(int)), + currentQueueSize: (int)TestHelpers.getTestValue(typeof(int)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of QueueWaitWebhook + /// + [Fact] + public void QueueWaitWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'QueuePosition' + /// + [Fact] + public void QueuePositionTest() + { + instance.QueuePosition = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueuePosition); + } + + /// + /// Test the property 'QueueTime' + /// + [Fact] + public void QueueTimeTest() + { + instance.QueueTime = 1; + Assert.Equal(1, (int)instance.QueueTime); + } + + /// + /// Test the property 'CurrentQueueSize' + /// + [Fact] + public void CurrentQueueSizeTest() + { + instance.CurrentQueueSize = 1; + Assert.Equal(1, (int)instance.CurrentQueueSize); + } + + [Fact] + public void TestDeserializeJsonToQueueWaitWebhook() + { + string payload = @"{ ""requestType"": ""queueWait"" }"; + QueueWaitWebhook deserialized = QueueWaitWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("queueWait", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/RecordUtteranceAllOfTests.cs b/src/freeclimb.Test/Model/RecordUtteranceAllOfTests.cs deleted file mode 100644 index baa5c0bd..00000000 --- a/src/freeclimb.Test/Model/RecordUtteranceAllOfTests.cs +++ /dev/null @@ -1,314 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing RecordUtteranceAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class RecordUtteranceAllOfTests - { - private RecordUtteranceAllOf instance; - - public RecordUtteranceAllOfTests() - { - - instance = new RecordUtteranceAllOf("TEST_STRING", 1, "TEST_STRING", 1, false, false, false); - - } - - /// - /// Test an instance of RecordUtteranceAllOf - /// - [Fact] - public void RecordUtteranceAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'ActionUrl' - /// - [Fact] - public void ActionUrlTest() - { - - instance.ActionUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ActionUrl); - } - /// - /// Test the property 'SilenceTimeoutMs' - /// - [Fact] - public void SilenceTimeoutMsTest() - { - - instance.SilenceTimeoutMs = 1; - Assert.Equal(1, (int) instance.SilenceTimeoutMs); - } - /// - /// Test the property 'FinishOnKey' - /// - [Fact] - public void FinishOnKeyTest() - { - instance.FinishOnKey = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.FinishOnKey); - - } - /// - /// Test the property 'MaxLengthSec' - /// - [Fact] - public void MaxLengthSecTest() - { - - instance.MaxLengthSec = 1; - Assert.Equal(1, (int) instance.MaxLengthSec); - } - /// - /// Test the property 'PlayBeep' - /// - [Fact] - public void PlayBeepTest() - { - instance.PlayBeep = false; - Assert.Equal(false, instance.PlayBeep); - - } - /// - /// Test the property 'AutoStart' - /// - [Fact] - public void AutoStartTest() - { - instance.AutoStart = false; - Assert.Equal(false, instance.AutoStart); - - } - /// - /// Test the property 'PrivacyMode' - /// - [Fact] - public void PrivacyModeTest() - { - instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - RecordUtteranceAllOf test1 = new RecordUtteranceAllOf("TEST_STRING", 1, "TEST_STRING", 1, false, false, false); - test1.ActionUrl = "TS"; - test1.SilenceTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.MaxLengthSec = 1; - test1.PlayBeep = true; - test1.AutoStart = true; - test1.PrivacyMode = true; - - RecordUtteranceAllOf test2 = new RecordUtteranceAllOf("TEST_STRING", 1, "TEST_STRING", 1, false, false, false); - test2.ActionUrl = "TS"; - test2.SilenceTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.MaxLengthSec = 1; - test2.PlayBeep = true; - test2.AutoStart = true; - test2.PrivacyMode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - RecordUtteranceAllOf test1 = new RecordUtteranceAllOf("TEST_STRING", 1, "TEST_STRING", 1, false, false, false); - test1.ActionUrl = "TS"; - test1.SilenceTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.MaxLengthSec = 1; - test1.PlayBeep = true; - test1.AutoStart = true; - test1.PrivacyMode = true; - - RecordUtteranceAllOf test2 = new RecordUtteranceAllOf("TEST_STRING", 1, "TEST_STRING", 1, false, false, false); - test2.ActionUrl = "ts"; - test2.SilenceTimeoutMs = 2; - test2.FinishOnKey = "ts"; - test2.MaxLengthSec = 2; - test2.PlayBeep = false; - test2.AutoStart = false; - test2.PrivacyMode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - RecordUtteranceAllOf test1 = new RecordUtteranceAllOf("TEST_STRING", 1, "TEST_STRING", 1, false, false, false); - test1.ActionUrl = "TS"; - test1.SilenceTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.MaxLengthSec = 1; - test1.PlayBeep = true; - test1.AutoStart = true; - test1.PrivacyMode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - RecordUtteranceAllOf test1 = new RecordUtteranceAllOf("TEST_STRING", 1, "TEST_STRING", 1, false, false, false); - test1.ActionUrl = "TS"; - test1.SilenceTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.MaxLengthSec = 1; - test1.PlayBeep = true; - test1.AutoStart = true; - test1.PrivacyMode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - RecordUtteranceAllOf test1 = new RecordUtteranceAllOf("TEST_STRING", 1, "TEST_STRING", 1, false, false, false); - test1.ActionUrl = "TS"; - test1.SilenceTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.MaxLengthSec = 1; - test1.PlayBeep = true; - test1.AutoStart = true; - test1.PrivacyMode = true; - - RecordUtteranceAllOf test2 = new RecordUtteranceAllOf("TEST_STRING", 1, "TEST_STRING", 1, false, false, false); - test2.ActionUrl = "TS"; - test2.SilenceTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.MaxLengthSec = 1; - test2.PlayBeep = true; - test2.AutoStart = true; - test2.PrivacyMode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - RecordUtteranceAllOf test1 = new RecordUtteranceAllOf("TEST_STRING", 1, "TEST_STRING", 1, false, false, false); - test1.ActionUrl = "TS"; - test1.SilenceTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.MaxLengthSec = 1; - test1.PlayBeep = true; - test1.AutoStart = true; - test1.PrivacyMode = true; - - RecordUtteranceAllOf test2 = new RecordUtteranceAllOf("TEST_STRING", 1, "TEST_STRING", 1, false, false, false); - test2.ActionUrl = "TS"; - test2.SilenceTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.MaxLengthSec = 1; - test2.PlayBeep = true; - test2.AutoStart = true; - test2.PrivacyMode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - RecordUtteranceAllOf test1 = new RecordUtteranceAllOf("TEST_STRING", 1, "TEST_STRING", 1, false, false, false); - test1.ActionUrl = "TS"; - test1.SilenceTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.MaxLengthSec = 1; - test1.PlayBeep = true; - test1.AutoStart = true; - test1.PrivacyMode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - RecordUtteranceAllOf test2 = new RecordUtteranceAllOf("TEST_STRING", 1, "TEST_STRING", 1, false, false, false); - test2.ActionUrl = "TS"; - test2.SilenceTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.MaxLengthSec = 1; - test2.PlayBeep = true; - test2.AutoStart = true; - test2.PrivacyMode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/RecordUtteranceTests.cs b/src/freeclimb.Test/Model/RecordUtteranceTests.cs index b7549df0..6ce0f629 100644 --- a/src/freeclimb.Test/Model/RecordUtteranceTests.cs +++ b/src/freeclimb.Test/Model/RecordUtteranceTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,27 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class RecordUtteranceTests + + public class RecordUtteranceTests : IDisposable { private RecordUtterance instance; public RecordUtteranceTests() { - - instance = new RecordUtterance("TEST_STRING", 1, "TEST_STRING", 1, false, false, false, "TEST_STRING"); - + instance = new RecordUtterance( + actionUrl: (string)TestHelpers.getTestValue(typeof(string)), + silenceTimeoutMs: (int)TestHelpers.getTestValue(typeof(int)), + finishOnKey: (string)TestHelpers.getTestValue(typeof(string)), + maxLengthSec: (int)TestHelpers.getTestValue(typeof(int)), + playBeep: (bool)TestHelpers.getTestValue(typeof(bool)), + autoStart: (bool)TestHelpers.getTestValue(typeof(bool)), + privacyMode: (bool)TestHelpers.getTestValue(typeof(bool)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,27 +63,26 @@ public void RecordUtteranceInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'ActionUrl' /// [Fact] public void ActionUrlTest() { - instance.ActionUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ActionUrl); } + /// /// Test the property 'SilenceTimeoutMs' /// [Fact] public void SilenceTimeoutMsTest() { - instance.SilenceTimeoutMs = 1; - Assert.Equal(1, (int) instance.SilenceTimeoutMs); + Assert.Equal(1, (int)instance.SilenceTimeoutMs); } + /// /// Test the property 'FinishOnKey' /// @@ -85,18 +91,18 @@ public void FinishOnKeyTest() { instance.FinishOnKey = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.FinishOnKey); - } + /// /// Test the property 'MaxLengthSec' /// [Fact] public void MaxLengthSecTest() { - instance.MaxLengthSec = 1; - Assert.Equal(1, (int) instance.MaxLengthSec); + Assert.Equal(1, (int)instance.MaxLengthSec); } + /// /// Test the property 'PlayBeep' /// @@ -104,9 +110,9 @@ public void MaxLengthSecTest() public void PlayBeepTest() { instance.PlayBeep = false; - Assert.Equal(false, instance.PlayBeep); - + Assert.False(instance.PlayBeep); } + /// /// Test the property 'AutoStart' /// @@ -114,9 +120,9 @@ public void PlayBeepTest() public void AutoStartTest() { instance.AutoStart = false; - Assert.Equal(false, instance.AutoStart); - + Assert.False(instance.AutoStart); } + /// /// Test the property 'PrivacyMode' /// @@ -124,191 +130,7 @@ public void AutoStartTest() public void PrivacyModeTest() { instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - RecordUtterance test1 = new RecordUtterance("TEST_STRING", 1, "TEST_STRING", 1, false, false, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.SilenceTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.MaxLengthSec = 1; - test1.PlayBeep = true; - test1.AutoStart = true; - test1.PrivacyMode = true; - - RecordUtterance test2 = new RecordUtterance("TEST_STRING", 1, "TEST_STRING", 1, false, false, false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.SilenceTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.MaxLengthSec = 1; - test2.PlayBeep = true; - test2.AutoStart = true; - test2.PrivacyMode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - RecordUtterance test1 = new RecordUtterance("TEST_STRING", 1, "TEST_STRING", 1, false, false, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.SilenceTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.MaxLengthSec = 1; - test1.PlayBeep = true; - test1.AutoStart = true; - test1.PrivacyMode = true; - - RecordUtterance test2 = new RecordUtterance("TEST_STRING", 1, "TEST_STRING", 1, false, false, false, "TEST_STRING"); - test2.ActionUrl = "ts"; - test2.SilenceTimeoutMs = 2; - test2.FinishOnKey = "ts"; - test2.MaxLengthSec = 2; - test2.PlayBeep = false; - test2.AutoStart = false; - test2.PrivacyMode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - RecordUtterance test1 = new RecordUtterance("TEST_STRING", 1, "TEST_STRING", 1, false, false, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.SilenceTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.MaxLengthSec = 1; - test1.PlayBeep = true; - test1.AutoStart = true; - test1.PrivacyMode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - RecordUtterance test1 = new RecordUtterance("TEST_STRING", 1, "TEST_STRING", 1, false, false, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.SilenceTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.MaxLengthSec = 1; - test1.PlayBeep = true; - test1.AutoStart = true; - test1.PrivacyMode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - RecordUtterance test1 = new RecordUtterance("TEST_STRING", 1, "TEST_STRING", 1, false, false, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.SilenceTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.MaxLengthSec = 1; - test1.PlayBeep = true; - test1.AutoStart = true; - test1.PrivacyMode = true; - - RecordUtterance test2 = new RecordUtterance("TEST_STRING", 1, "TEST_STRING", 1, false, false, false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.SilenceTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.MaxLengthSec = 1; - test2.PlayBeep = true; - test2.AutoStart = true; - test2.PrivacyMode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - RecordUtterance test1 = new RecordUtterance("TEST_STRING", 1, "TEST_STRING", 1, false, false, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.SilenceTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.MaxLengthSec = 1; - test1.PlayBeep = true; - test1.AutoStart = true; - test1.PrivacyMode = true; - - RecordUtterance test2 = new RecordUtterance("TEST_STRING", 1, "TEST_STRING", 1, false, false, false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.SilenceTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.MaxLengthSec = 1; - test2.PlayBeep = true; - test2.AutoStart = true; - test2.PrivacyMode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - RecordUtterance test1 = new RecordUtterance("TEST_STRING", 1, "TEST_STRING", 1, false, false, false, "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.SilenceTimeoutMs = 1; - test1.FinishOnKey = "TS"; - test1.MaxLengthSec = 1; - test1.PlayBeep = true; - test1.AutoStart = true; - test1.PrivacyMode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - RecordUtterance test2 = new RecordUtterance("TEST_STRING", 1, "TEST_STRING", 1, false, false, false, "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.SilenceTimeoutMs = 1; - test2.FinishOnKey = "TS"; - test2.MaxLengthSec = 1; - test2.PlayBeep = true; - test2.AutoStart = true; - test2.PrivacyMode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.False(instance.PrivacyMode); } } } diff --git a/src/freeclimb.Test/Model/RecordWebhookTests.cs b/src/freeclimb.Test/Model/RecordWebhookTests.cs new file mode 100644 index 00000000..3fd73f3b --- /dev/null +++ b/src/freeclimb.Test/Model/RecordWebhookTests.cs @@ -0,0 +1,276 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing RecordWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class RecordWebhookTests : IDisposable + { + private RecordWebhook instance; + + public RecordWebhookTests() + { + instance = new RecordWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + recordingId: (string)TestHelpers.getTestValue(typeof(string)), + recordingUrl: (string)TestHelpers.getTestValue(typeof(string)), + recordingSize: (string)TestHelpers.getTestValue(typeof(string)), + recordingFormat: (string)TestHelpers.getTestValue(typeof(string)), + recordingDurationSec: (int)TestHelpers.getTestValue(typeof(int)), + termReason: (RecordUtteranceTermReason) + TestHelpers.getTestValue(typeof(RecordUtteranceTermReason)), + parentCallId: (string)TestHelpers.getTestValue(typeof(string)), + privacyMode: (bool)TestHelpers.getTestValue(typeof(bool)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RecordWebhook + /// + [Fact] + public void RecordWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'RecordingId' + /// + [Fact] + public void RecordingIdTest() + { + instance.RecordingId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingId); + } + + /// + /// Test the property 'RecordingUrl' + /// + [Fact] + public void RecordingUrlTest() + { + instance.RecordingUrl = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingUrl); + } + + /// + /// Test the property 'RecordingSize' + /// + [Fact] + public void RecordingSizeTest() + { + instance.RecordingSize = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingSize); + } + + /// + /// Test the property 'RecordingFormat' + /// + [Fact] + public void RecordingFormatTest() + { + instance.RecordingFormat = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingFormat); + } + + /// + /// Test the property 'RecordingDurationSec' + /// + [Fact] + public void RecordingDurationSecTest() + { + instance.RecordingDurationSec = 1; + Assert.Equal(1, (int)instance.RecordingDurationSec); + } + + /// + /// Test the property 'TermReason' + /// + [Fact] + public void TermReasonTest() + { + instance.TermReason = RecordUtteranceTermReason.FINISH_KEY; + Assert.Equal(RecordUtteranceTermReason.FINISH_KEY, instance.TermReason); + instance.TermReason = RecordUtteranceTermReason.TIMEOUT; + Assert.Equal(RecordUtteranceTermReason.TIMEOUT, instance.TermReason); + instance.TermReason = RecordUtteranceTermReason.HANGUP; + Assert.Equal(RecordUtteranceTermReason.HANGUP, instance.TermReason); + instance.TermReason = RecordUtteranceTermReason.MAX_LENGTH; + Assert.Equal(RecordUtteranceTermReason.MAX_LENGTH, instance.TermReason); + } + + /// + /// Test the property 'ParentCallId' + /// + [Fact] + public void ParentCallIdTest() + { + instance.ParentCallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ParentCallId); + } + + /// + /// Test the property 'PrivacyMode' + /// + [Fact] + public void PrivacyModeTest() + { + instance.PrivacyMode = false; + Assert.False(instance.PrivacyMode); + } + + [Fact] + public void TestDeserializeJsonToRecordWebhook() + { + string payload = @"{ ""requestType"": ""record"" }"; + RecordWebhook deserialized = RecordWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("record", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/RecordingListAllOfTests.cs b/src/freeclimb.Test/Model/RecordingListAllOfTests.cs deleted file mode 100644 index c7b27c88..00000000 --- a/src/freeclimb.Test/Model/RecordingListAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing RecordingListAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class RecordingListAllOfTests - { - private RecordingListAllOf instance; - - public RecordingListAllOfTests() - { - - instance = new RecordingListAllOf(new List()); - - } - - /// - /// Test an instance of RecordingListAllOf - /// - [Fact] - public void RecordingListAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Recordings' - /// - [Fact] - public void RecordingsTest() - { - - List testList = new List(); - instance.Recordings = testList; - Assert.Equal(testList, instance.Recordings); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - RecordingListAllOf test1 = new RecordingListAllOf(new List()); - List testList = new List(); - test1.Recordings = testList; - - RecordingListAllOf test2 = new RecordingListAllOf(new List()); - List testList2 = new List(); - test2.Recordings = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - RecordingListAllOf test1 = new RecordingListAllOf(new List()); - List testList = new List(); - test1.Recordings = testList; - - RecordingListAllOf test2 = new RecordingListAllOf(new List()); - List testList2 = null; - test2.Recordings = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - RecordingListAllOf test1 = new RecordingListAllOf(new List()); - List testList = new List(); - test1.Recordings = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - RecordingListAllOf test1 = new RecordingListAllOf(new List()); - List testList = new List(); - test1.Recordings = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - RecordingListAllOf test1 = new RecordingListAllOf(new List()); - List testList = new List(); - test1.Recordings = testList; - - RecordingListAllOf test2 = new RecordingListAllOf(new List()); - List testList2 = new List(); - test2.Recordings = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - RecordingListAllOf test1 = new RecordingListAllOf(new List()); - List testList = new List(); - test1.Recordings = testList; - - RecordingListAllOf test2 = new RecordingListAllOf(new List()); - List testList2 = new List(); - test2.Recordings = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - RecordingListAllOf test1 = new RecordingListAllOf(new List()); - List testList = new List(); - test1.Recordings = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - RecordingListAllOf test2 = new RecordingListAllOf(new List()); - List testList2 = new List(); - test2.Recordings = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/RecordingListTests.cs b/src/freeclimb.Test/Model/RecordingListTests.cs index eb23d719..fa78a148 100644 --- a/src/freeclimb.Test/Model/RecordingListTests.cs +++ b/src/freeclimb.Test/Model/RecordingListTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,29 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class RecordingListTests + + public class RecordingListTests : IDisposable { private RecordingList instance; public RecordingListTests() { - - instance = new RecordingList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new RecordingList( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + recordings: (List) + TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +65,66 @@ public void RecordingListInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +133,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'Recordings' /// [Fact] public void RecordingsTest() { - List testList = new List(); instance.Recordings = testList; - Assert.Equal(testList, instance.Recordings); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - RecordingList test1 = new RecordingList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Recordings = testList; - - RecordingList test2 = new RecordingList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Recordings = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - RecordingList test1 = new RecordingList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Recordings = testList; - - RecordingList test2 = new RecordingList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.Recordings = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - RecordingList test1 = new RecordingList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Recordings = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - RecordingList test1 = new RecordingList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Recordings = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - RecordingList test1 = new RecordingList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Recordings = testList; - - RecordingList test2 = new RecordingList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Recordings = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - RecordingList test1 = new RecordingList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Recordings = testList; - - RecordingList test2 = new RecordingList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Recordings = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - RecordingList test1 = new RecordingList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Recordings = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - RecordingList test2 = new RecordingList(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Recordings = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.Recordings, testList); } } } diff --git a/src/freeclimb.Test/Model/RecordingResultAllOfTests.cs b/src/freeclimb.Test/Model/RecordingResultAllOfTests.cs deleted file mode 100644 index 59e40573..00000000 --- a/src/freeclimb.Test/Model/RecordingResultAllOfTests.cs +++ /dev/null @@ -1,270 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing RecordingResultAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class RecordingResultAllOfTests - { - private RecordingResultAllOf instance; - - public RecordingResultAllOfTests() - { - - instance = new RecordingResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - - } - - /// - /// Test an instance of RecordingResultAllOf - /// - [Fact] - public void RecordingResultAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'RecordingId' - /// - [Fact] - public void RecordingIdTest() - { - instance.RecordingId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.RecordingId); - - } - /// - /// Test the property 'AccountId' - /// - [Fact] - public void AccountIdTest() - { - instance.AccountId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.AccountId); - - } - /// - /// Test the property 'CallId' - /// - [Fact] - public void CallIdTest() - { - instance.CallId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.CallId); - - } - /// - /// Test the property 'DurationSec' - /// - [Fact] - public void DurationSecTest() - { - - instance.DurationSec = 1; - Assert.Equal(1, (int) instance.DurationSec); - } - /// - /// Test the property 'ConferenceId' - /// - [Fact] - public void ConferenceIdTest() - { - instance.ConferenceId = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ConferenceId); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - RecordingResultAllOf test1 = new RecordingResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test1.RecordingId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.DurationSec = 1; - test1.ConferenceId = "TS"; - - RecordingResultAllOf test2 = new RecordingResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test2.RecordingId = "TS"; - test2.AccountId = "TS"; - test2.CallId = "TS"; - test2.DurationSec = 1; - test2.ConferenceId = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - RecordingResultAllOf test1 = new RecordingResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test1.RecordingId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.DurationSec = 1; - test1.ConferenceId = "TS"; - - RecordingResultAllOf test2 = new RecordingResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test2.RecordingId = "ts"; - test2.AccountId = "ts"; - test2.CallId = "ts"; - test2.DurationSec = 2; - test2.ConferenceId = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - RecordingResultAllOf test1 = new RecordingResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test1.RecordingId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.DurationSec = 1; - test1.ConferenceId = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - RecordingResultAllOf test1 = new RecordingResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test1.RecordingId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.DurationSec = 1; - test1.ConferenceId = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - RecordingResultAllOf test1 = new RecordingResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test1.RecordingId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.DurationSec = 1; - test1.ConferenceId = "TS"; - - RecordingResultAllOf test2 = new RecordingResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test2.RecordingId = "TS"; - test2.AccountId = "TS"; - test2.CallId = "TS"; - test2.DurationSec = 1; - test2.ConferenceId = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - RecordingResultAllOf test1 = new RecordingResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test1.RecordingId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.DurationSec = 1; - test1.ConferenceId = "TS"; - - RecordingResultAllOf test2 = new RecordingResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test2.RecordingId = "TS"; - test2.AccountId = "TS"; - test2.CallId = "TS"; - test2.DurationSec = 1; - test2.ConferenceId = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - RecordingResultAllOf test1 = new RecordingResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test1.RecordingId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.DurationSec = 1; - test1.ConferenceId = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - RecordingResultAllOf test2 = new RecordingResultAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test2.RecordingId = "TS"; - test2.AccountId = "TS"; - test2.CallId = "TS"; - test2.DurationSec = 1; - test2.ConferenceId = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/RecordingResultTests.cs b/src/freeclimb.Test/Model/RecordingResultTests.cs index 455093db..b937c537 100644 --- a/src/freeclimb.Test/Model/RecordingResultTests.cs +++ b/src/freeclimb.Test/Model/RecordingResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,29 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class RecordingResultTests + + public class RecordingResultTests : IDisposable { private RecordingResult instance; public RecordingResultTests() { - - instance = new RecordingResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - + instance = new RecordingResult( + uri: (string)TestHelpers.getTestValue(typeof(string)), + dateCreated: (string)TestHelpers.getTestValue(typeof(string)), + dateUpdated: (string)TestHelpers.getTestValue(typeof(string)), + revision: (int)TestHelpers.getTestValue(typeof(int)), + recordingId: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + durationSec: (int?)TestHelpers.getTestValue(typeof(int?)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +65,6 @@ public void RecordingResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Uri' /// @@ -65,8 +73,8 @@ public void UriTest() { instance.Uri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Uri); - } + /// /// Test the property 'DateCreated' /// @@ -75,8 +83,8 @@ public void DateCreatedTest() { instance.DateCreated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateCreated); - } + /// /// Test the property 'DateUpdated' /// @@ -85,18 +93,18 @@ public void DateUpdatedTest() { instance.DateUpdated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateUpdated); - } + /// /// Test the property 'Revision' /// [Fact] public void RevisionTest() { - instance.Revision = 1; - Assert.Equal(1, (int) instance.Revision); + Assert.Equal(1, (int)instance.Revision); } + /// /// Test the property 'RecordingId' /// @@ -105,8 +113,8 @@ public void RecordingIdTest() { instance.RecordingId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.RecordingId); - } + /// /// Test the property 'AccountId' /// @@ -115,8 +123,8 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } + /// /// Test the property 'CallId' /// @@ -125,18 +133,18 @@ public void CallIdTest() { instance.CallId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CallId); - } + /// /// Test the property 'DurationSec' /// [Fact] public void DurationSecTest() { - instance.DurationSec = 1; - Assert.Equal(1, (int) instance.DurationSec); + Assert.Equal(1, (int)instance.DurationSec); } + /// /// Test the property 'ConferenceId' /// @@ -145,214 +153,6 @@ public void ConferenceIdTest() { instance.ConferenceId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ConferenceId); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - RecordingResult test1 = new RecordingResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.RecordingId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.DurationSec = 1; - test1.ConferenceId = "TS"; - - RecordingResult test2 = new RecordingResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.RecordingId = "TS"; - test2.AccountId = "TS"; - test2.CallId = "TS"; - test2.DurationSec = 1; - test2.ConferenceId = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - RecordingResult test1 = new RecordingResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.RecordingId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.DurationSec = 1; - test1.ConferenceId = "TS"; - - RecordingResult test2 = new RecordingResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test2.Uri = "ts"; - test2.DateCreated = "ts"; - test2.DateUpdated = "ts"; - test2.Revision = 2; - test2.RecordingId = "ts"; - test2.AccountId = "ts"; - test2.CallId = "ts"; - test2.DurationSec = 2; - test2.ConferenceId = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - RecordingResult test1 = new RecordingResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.RecordingId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.DurationSec = 1; - test1.ConferenceId = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - RecordingResult test1 = new RecordingResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.RecordingId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.DurationSec = 1; - test1.ConferenceId = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - RecordingResult test1 = new RecordingResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.RecordingId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.DurationSec = 1; - test1.ConferenceId = "TS"; - - RecordingResult test2 = new RecordingResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.RecordingId = "TS"; - test2.AccountId = "TS"; - test2.CallId = "TS"; - test2.DurationSec = 1; - test2.ConferenceId = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - RecordingResult test1 = new RecordingResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.RecordingId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.DurationSec = 1; - test1.ConferenceId = "TS"; - - RecordingResult test2 = new RecordingResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.RecordingId = "TS"; - test2.AccountId = "TS"; - test2.CallId = "TS"; - test2.DurationSec = 1; - test2.ConferenceId = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - RecordingResult test1 = new RecordingResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test1.Uri = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - test1.RecordingId = "TS"; - test1.AccountId = "TS"; - test1.CallId = "TS"; - test1.DurationSec = 1; - test1.ConferenceId = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - RecordingResult test2 = new RecordingResult("TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING", "TEST_STRING", "TEST_STRING", 1, "TEST_STRING"); - test2.Uri = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - test2.RecordingId = "TS"; - test2.AccountId = "TS"; - test2.CallId = "TS"; - test2.DurationSec = 1; - test2.ConferenceId = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/RedirectAllOfTests.cs b/src/freeclimb.Test/Model/RedirectAllOfTests.cs deleted file mode 100644 index 3f5c5536..00000000 --- a/src/freeclimb.Test/Model/RedirectAllOfTests.cs +++ /dev/null @@ -1,182 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing RedirectAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class RedirectAllOfTests - { - private RedirectAllOf instance; - - public RedirectAllOfTests() - { - - instance = new RedirectAllOf("TEST_STRING"); - - } - - /// - /// Test an instance of RedirectAllOf - /// - [Fact] - public void RedirectAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'ActionUrl' - /// - [Fact] - public void ActionUrlTest() - { - - instance.ActionUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ActionUrl); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - RedirectAllOf test1 = new RedirectAllOf("TEST_STRING"); - test1.ActionUrl = "TS"; - - RedirectAllOf test2 = new RedirectAllOf("TEST_STRING"); - test2.ActionUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - RedirectAllOf test1 = new RedirectAllOf("TEST_STRING"); - test1.ActionUrl = "TS"; - - RedirectAllOf test2 = new RedirectAllOf("TEST_STRING"); - test2.ActionUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - RedirectAllOf test1 = new RedirectAllOf("TEST_STRING"); - test1.ActionUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - RedirectAllOf test1 = new RedirectAllOf("TEST_STRING"); - test1.ActionUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - RedirectAllOf test1 = new RedirectAllOf("TEST_STRING"); - test1.ActionUrl = "TS"; - - RedirectAllOf test2 = new RedirectAllOf("TEST_STRING"); - test2.ActionUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - RedirectAllOf test1 = new RedirectAllOf("TEST_STRING"); - test1.ActionUrl = "TS"; - - RedirectAllOf test2 = new RedirectAllOf("TEST_STRING"); - test2.ActionUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - RedirectAllOf test1 = new RedirectAllOf("TEST_STRING"); - test1.ActionUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - RedirectAllOf test2 = new RedirectAllOf("TEST_STRING"); - test2.ActionUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/RedirectTests.cs b/src/freeclimb.Test/Model/RedirectTests.cs index 06e51b5c..d3500084 100644 --- a/src/freeclimb.Test/Model/RedirectTests.cs +++ b/src/freeclimb.Test/Model/RedirectTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,19 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class RedirectTests + + public class RedirectTests : IDisposable { private Redirect instance; public RedirectTests() { - - instance = new Redirect("TEST_STRING", "TEST_STRING"); - + instance = new Redirect(actionUrl: (string)TestHelpers.getTestValue(typeof(string))); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,127 +55,14 @@ public void RedirectInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'ActionUrl' /// [Fact] public void ActionUrlTest() { - instance.ActionUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ActionUrl); } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - Redirect test1 = new Redirect("TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - - Redirect test2 = new Redirect("TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - Redirect test1 = new Redirect("TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - - Redirect test2 = new Redirect("TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - Redirect test1 = new Redirect("TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - Redirect test1 = new Redirect("TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - Redirect test1 = new Redirect("TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - - Redirect test2 = new Redirect("TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - Redirect test1 = new Redirect("TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - - Redirect test2 = new Redirect("TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - Redirect test1 = new Redirect("TEST_STRING", "TEST_STRING"); - test1.ActionUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - Redirect test2 = new Redirect("TEST_STRING", "TEST_STRING"); - test2.ActionUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } } } diff --git a/src/freeclimb.Test/Model/RedirectWebhookTests.cs b/src/freeclimb.Test/Model/RedirectWebhookTests.cs new file mode 100644 index 00000000..b39cd621 --- /dev/null +++ b/src/freeclimb.Test/Model/RedirectWebhookTests.cs @@ -0,0 +1,192 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing RedirectWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class RedirectWebhookTests : IDisposable + { + private RedirectWebhook instance; + + public RedirectWebhookTests() + { + instance = new RedirectWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + parentCallId: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RedirectWebhook + /// + [Fact] + public void RedirectWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'ParentCallId' + /// + [Fact] + public void ParentCallIdTest() + { + instance.ParentCallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ParentCallId); + } + + [Fact] + public void TestDeserializeJsonToRedirectWebhook() + { + string payload = @"{ ""requestType"": ""redirect"" }"; + RedirectWebhook deserialized = RedirectWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("redirect", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/RejectAllOfTests.cs b/src/freeclimb.Test/Model/RejectAllOfTests.cs deleted file mode 100644 index 705ee61d..00000000 --- a/src/freeclimb.Test/Model/RejectAllOfTests.cs +++ /dev/null @@ -1,182 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing RejectAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class RejectAllOfTests - { - private RejectAllOf instance; - - public RejectAllOfTests() - { - - instance = new RejectAllOf("TEST_STRING"); - - } - - /// - /// Test an instance of RejectAllOf - /// - [Fact] - public void RejectAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Reason' - /// - [Fact] - public void ReasonTest() - { - instance.Reason = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Reason); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - RejectAllOf test1 = new RejectAllOf("TEST_STRING"); - test1.Reason = "TS"; - - RejectAllOf test2 = new RejectAllOf("TEST_STRING"); - test2.Reason = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - RejectAllOf test1 = new RejectAllOf("TEST_STRING"); - test1.Reason = "TS"; - - RejectAllOf test2 = new RejectAllOf("TEST_STRING"); - test2.Reason = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - RejectAllOf test1 = new RejectAllOf("TEST_STRING"); - test1.Reason = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - RejectAllOf test1 = new RejectAllOf("TEST_STRING"); - test1.Reason = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - RejectAllOf test1 = new RejectAllOf("TEST_STRING"); - test1.Reason = "TS"; - - RejectAllOf test2 = new RejectAllOf("TEST_STRING"); - test2.Reason = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - RejectAllOf test1 = new RejectAllOf("TEST_STRING"); - test1.Reason = "TS"; - - RejectAllOf test2 = new RejectAllOf("TEST_STRING"); - test2.Reason = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - RejectAllOf test1 = new RejectAllOf("TEST_STRING"); - test1.Reason = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - RejectAllOf test2 = new RejectAllOf("TEST_STRING"); - test2.Reason = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/RejectTests.cs b/src/freeclimb.Test/Model/RejectTests.cs index 2e1f9a78..f7c62963 100644 --- a/src/freeclimb.Test/Model/RejectTests.cs +++ b/src/freeclimb.Test/Model/RejectTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,19 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class RejectTests + + public class RejectTests : IDisposable { private Reject instance; public RejectTests() { - - instance = new Reject("TEST_STRING", "TEST_STRING"); - + instance = new Reject(reason: (string)TestHelpers.getTestValue(typeof(string))); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +55,6 @@ public void RejectInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Reason' /// @@ -65,118 +63,6 @@ public void ReasonTest() { instance.Reason = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Reason); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - Reject test1 = new Reject("TEST_STRING", "TEST_STRING"); - test1.Reason = "TS"; - - Reject test2 = new Reject("TEST_STRING", "TEST_STRING"); - test2.Reason = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - Reject test1 = new Reject("TEST_STRING", "TEST_STRING"); - test1.Reason = "TS"; - - Reject test2 = new Reject("TEST_STRING", "TEST_STRING"); - test2.Reason = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - Reject test1 = new Reject("TEST_STRING", "TEST_STRING"); - test1.Reason = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - Reject test1 = new Reject("TEST_STRING", "TEST_STRING"); - test1.Reason = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - Reject test1 = new Reject("TEST_STRING", "TEST_STRING"); - test1.Reason = "TS"; - - Reject test2 = new Reject("TEST_STRING", "TEST_STRING"); - test2.Reason = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - Reject test1 = new Reject("TEST_STRING", "TEST_STRING"); - test1.Reason = "TS"; - - Reject test2 = new Reject("TEST_STRING", "TEST_STRING"); - test2.Reason = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - Reject test1 = new Reject("TEST_STRING", "TEST_STRING"); - test1.Reason = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - Reject test2 = new Reject("TEST_STRING", "TEST_STRING"); - test2.Reason = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/RemoveFromConferenceTests.cs b/src/freeclimb.Test/Model/RemoveFromConferenceTests.cs index b7171a99..204f2732 100644 --- a/src/freeclimb.Test/Model/RemoveFromConferenceTests.cs +++ b/src/freeclimb.Test/Model/RemoveFromConferenceTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,19 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class RemoveFromConferenceTests + + public class RemoveFromConferenceTests : IDisposable { private RemoveFromConference instance; public RemoveFromConferenceTests() { - - instance = new RemoveFromConference("TEST_STRING"); - + instance = new RemoveFromConference(); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +54,5 @@ public void RemoveFromConferenceInstanceTest() { Assert.IsType(instance); } - - } } diff --git a/src/freeclimb.Test/Model/RemoveFromQueueNotificationWebhookTests.cs b/src/freeclimb.Test/Model/RemoveFromQueueNotificationWebhookTests.cs new file mode 100644 index 00000000..f5e26642 --- /dev/null +++ b/src/freeclimb.Test/Model/RemoveFromQueueNotificationWebhookTests.cs @@ -0,0 +1,210 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing RemoveFromQueueNotificationWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class RemoveFromQueueNotificationWebhookTests : IDisposable + { + private RemoveFromQueueNotificationWebhook instance; + + public RemoveFromQueueNotificationWebhookTests() + { + instance = new RemoveFromQueueNotificationWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + callStatus: (CallStatus)TestHelpers.getTestValue(typeof(CallStatus)), + direction: (CallDirection)TestHelpers.getTestValue(typeof(CallDirection)), + conferenceId: (string)TestHelpers.getTestValue(typeof(string)), + queueId: (string)TestHelpers.getTestValue(typeof(string)), + queueResult: (QueueResultStatus)TestHelpers.getTestValue(typeof(QueueResultStatus)), + queueTime: (int)TestHelpers.getTestValue(typeof(int)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RemoveFromQueueNotificationWebhook + /// + [Fact] + public void RemoveFromQueueNotificationWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'CallStatus' + /// + [Fact] + public void CallStatusTest() + { + instance.CallStatus = CallStatus.QUEUED; + Assert.Equal(CallStatus.QUEUED, instance.CallStatus); + instance.CallStatus = CallStatus.RINGING; + Assert.Equal(CallStatus.RINGING, instance.CallStatus); + instance.CallStatus = CallStatus.IN_PROGRESS; + Assert.Equal(CallStatus.IN_PROGRESS, instance.CallStatus); + instance.CallStatus = CallStatus.CANCELED; + Assert.Equal(CallStatus.CANCELED, instance.CallStatus); + instance.CallStatus = CallStatus.COMPLETED; + Assert.Equal(CallStatus.COMPLETED, instance.CallStatus); + instance.CallStatus = CallStatus.FAILED; + Assert.Equal(CallStatus.FAILED, instance.CallStatus); + instance.CallStatus = CallStatus.BUSY; + Assert.Equal(CallStatus.BUSY, instance.CallStatus); + instance.CallStatus = CallStatus.NO_ANSWER; + Assert.Equal(CallStatus.NO_ANSWER, instance.CallStatus); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + instance.Direction = CallDirection.INBOUND; + Assert.Equal(CallDirection.INBOUND, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_API; + Assert.Equal(CallDirection.OUTBOUND_API, instance.Direction); + instance.Direction = CallDirection.OUTBOUND_DIAL; + Assert.Equal(CallDirection.OUTBOUND_DIAL, instance.Direction); + } + + /// + /// Test the property 'ConferenceId' + /// + [Fact] + public void ConferenceIdTest() + { + instance.ConferenceId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.ConferenceId); + } + + /// + /// Test the property 'QueueId' + /// + [Fact] + public void QueueIdTest() + { + instance.QueueId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.QueueId); + } + + /// + /// Test the property 'QueueResult' + /// + [Fact] + public void QueueResultTest() + { + instance.QueueResult = QueueResultStatus.QUEUE_FULL; + Assert.Equal(QueueResultStatus.QUEUE_FULL, instance.QueueResult); + instance.QueueResult = QueueResultStatus.DEQUEUED; + Assert.Equal(QueueResultStatus.DEQUEUED, instance.QueueResult); + instance.QueueResult = QueueResultStatus.HANGUP; + Assert.Equal(QueueResultStatus.HANGUP, instance.QueueResult); + instance.QueueResult = QueueResultStatus.SYSTEM_ERROR; + Assert.Equal(QueueResultStatus.SYSTEM_ERROR, instance.QueueResult); + } + + /// + /// Test the property 'QueueTime' + /// + [Fact] + public void QueueTimeTest() + { + instance.QueueTime = 1; + Assert.Equal(1, (int)instance.QueueTime); + } + + [Fact] + public void TestDeserializeJsonToRemoveFromQueueNotificationWebhook() + { + string payload = @"{ ""requestType"": ""removeFromQueueNotification"" }"; + RemoveFromQueueNotificationWebhook deserialized = + RemoveFromQueueNotificationWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("removeFromQueueNotification", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/SMSTenDLCBrandTests.cs b/src/freeclimb.Test/Model/SMSTenDLCBrandTests.cs index d7e6d668..ad2be224 100644 --- a/src/freeclimb.Test/Model/SMSTenDLCBrandTests.cs +++ b/src/freeclimb.Test/Model/SMSTenDLCBrandTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,31 +31,54 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SMSTenDLCBrandTests + + public class SMSTenDLCBrandTests : IDisposable { private SMSTenDLCBrand instance; public SMSTenDLCBrandTests() { - string jsonData = @" - { - ""accountId"":""TEST_STRING"", - ""entityType"":""PRIVATE_PROFIT"", - ""cspId"": ""TEST_STRING"", - ""brandId"": ""TEST_STRING"", - ""universalEin"": ""TEST_STRING"", - ""brandRelationship"":""BASIC_ACCOUNT"", - ""identityStatus"":""SELF_DECLARED"", - ""displayName"":""TEST_STRING"", - ""phone"":""TEST_STRING"", - ""country"":""TEST_STRING"", - ""email"":""TEST_STRING"", - ""vertical"":""TEST_STRING"", - ""mock"":""false"", - } - "; - instance = JsonConvert.DeserializeObject(jsonData); - + instance = new SMSTenDLCBrand( + accountId: (string)TestHelpers.getTestValue(typeof(string)), + entityType: (SMSTenDLCBrandEntityType) + TestHelpers.getTestValue(typeof(SMSTenDLCBrandEntityType)), + firstName: (string)TestHelpers.getTestValue(typeof(string)), + lastName: (string)TestHelpers.getTestValue(typeof(string)), + displayName: (string)TestHelpers.getTestValue(typeof(string)), + companyName: (string)TestHelpers.getTestValue(typeof(string)), + ein: (string)TestHelpers.getTestValue(typeof(string)), + einIssuingCountry: (string)TestHelpers.getTestValue(typeof(string)), + phone: (string)TestHelpers.getTestValue(typeof(string)), + street: (string)TestHelpers.getTestValue(typeof(string)), + city: (string)TestHelpers.getTestValue(typeof(string)), + state: (string)TestHelpers.getTestValue(typeof(string)), + postalCode: (string)TestHelpers.getTestValue(typeof(string)), + country: (string)TestHelpers.getTestValue(typeof(string)), + email: (string)TestHelpers.getTestValue(typeof(string)), + stockSymbol: (string)TestHelpers.getTestValue(typeof(string)), + stockExchange: (SMSTenDLCBrandStockExchange) + TestHelpers.getTestValue(typeof(SMSTenDLCBrandStockExchange)), + ipAddress: (string)TestHelpers.getTestValue(typeof(string)), + website: (string)TestHelpers.getTestValue(typeof(string)), + brandRelationship: (SMSTenDLCBrandRelationship) + TestHelpers.getTestValue(typeof(SMSTenDLCBrandRelationship)), + vertical: (string)TestHelpers.getTestValue(typeof(string)), + altBusinessId: (string)TestHelpers.getTestValue(typeof(string)), + altBusinessIdType: (SMSTenDLCBrandAltBusinessIdType) + TestHelpers.getTestValue(typeof(SMSTenDLCBrandAltBusinessIdType)), + referenceId: (string)TestHelpers.getTestValue(typeof(string)), + optionalAttributes: (Dictionary) + TestHelpers.getTestValue(typeof(Dictionary)), + mock: (bool)TestHelpers.getTestValue(typeof(bool)), + identityStatus: (SMSTenDLCBrandIdentityStatus) + TestHelpers.getTestValue(typeof(SMSTenDLCBrandIdentityStatus)), + createDate: (DateTime)TestHelpers.getTestValue(typeof(DateTime)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -72,7 +90,6 @@ public void SMSTenDLCBrandInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'AccountId' /// @@ -81,51 +98,26 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } + /// /// Test the property 'EntityType' /// [Fact] public void EntityTypeTest() { - - instance.EntityType = SMSTenDLCBrand.EntityTypeEnum.PRIVATE_PROFIT; - Assert.Equal(instance.EntityType,SMSTenDLCBrand.EntityTypeEnum.PRIVATE_PROFIT); - - instance.EntityType = SMSTenDLCBrand.EntityTypeEnum.PUBLIC_PROFIT; - Assert.Equal(instance.EntityType,SMSTenDLCBrand.EntityTypeEnum.PUBLIC_PROFIT); - - instance.EntityType = SMSTenDLCBrand.EntityTypeEnum.NON_PROFIT; - Assert.Equal(instance.EntityType,SMSTenDLCBrand.EntityTypeEnum.NON_PROFIT); - - instance.EntityType = SMSTenDLCBrand.EntityTypeEnum.GOVERNMENT; - Assert.Equal(instance.EntityType,SMSTenDLCBrand.EntityTypeEnum.GOVERNMENT); - - instance.EntityType = SMSTenDLCBrand.EntityTypeEnum.SOLE_PROPRIETOR; - Assert.Equal(instance.EntityType,SMSTenDLCBrand.EntityTypeEnum.SOLE_PROPRIETOR); - - } - /// - /// Test the property 'CspId' - /// - [Fact] - public void CspIdTest() - { - - Assert.Equal("TEST_STRING", instance.CspId); - + instance.EntityType = SMSTenDLCBrandEntityType.PRIVATE_PROFIT; + Assert.Equal(SMSTenDLCBrandEntityType.PRIVATE_PROFIT, instance.EntityType); + instance.EntityType = SMSTenDLCBrandEntityType.PUBLIC_PROFIT; + Assert.Equal(SMSTenDLCBrandEntityType.PUBLIC_PROFIT, instance.EntityType); + instance.EntityType = SMSTenDLCBrandEntityType.NON_PROFIT; + Assert.Equal(SMSTenDLCBrandEntityType.NON_PROFIT, instance.EntityType); + instance.EntityType = SMSTenDLCBrandEntityType.GOVERNMENT; + Assert.Equal(SMSTenDLCBrandEntityType.GOVERNMENT, instance.EntityType); + instance.EntityType = SMSTenDLCBrandEntityType.SOLE_PROPRIETOR; + Assert.Equal(SMSTenDLCBrandEntityType.SOLE_PROPRIETOR, instance.EntityType); } - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - Assert.Equal("TEST_STRING", instance.BrandId); - - } /// /// Test the property 'FirstName' /// @@ -134,8 +126,8 @@ public void FirstNameTest() { instance.FirstName = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.FirstName); - } + /// /// Test the property 'LastName' /// @@ -144,8 +136,8 @@ public void LastNameTest() { instance.LastName = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.LastName); - } + /// /// Test the property 'DisplayName' /// @@ -154,8 +146,8 @@ public void DisplayNameTest() { instance.DisplayName = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DisplayName); - } + /// /// Test the property 'CompanyName' /// @@ -164,8 +156,8 @@ public void CompanyNameTest() { instance.CompanyName = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CompanyName); - } + /// /// Test the property 'Ein' /// @@ -174,8 +166,8 @@ public void EinTest() { instance.Ein = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Ein); - } + /// /// Test the property 'EinIssuingCountry' /// @@ -184,8 +176,8 @@ public void EinIssuingCountryTest() { instance.EinIssuingCountry = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.EinIssuingCountry); - } + /// /// Test the property 'Phone' /// @@ -194,8 +186,8 @@ public void PhoneTest() { instance.Phone = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Phone); - } + /// /// Test the property 'Street' /// @@ -204,8 +196,8 @@ public void StreetTest() { instance.Street = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Street); - } + /// /// Test the property 'City' /// @@ -214,8 +206,8 @@ public void CityTest() { instance.City = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.City); - } + /// /// Test the property 'State' /// @@ -224,8 +216,8 @@ public void StateTest() { instance.State = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.State); - } + /// /// Test the property 'PostalCode' /// @@ -234,8 +226,8 @@ public void PostalCodeTest() { instance.PostalCode = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.PostalCode); - } + /// /// Test the property 'Country' /// @@ -244,8 +236,8 @@ public void CountryTest() { instance.Country = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Country); - } + /// /// Test the property 'Email' /// @@ -254,8 +246,8 @@ public void EmailTest() { instance.Email = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Email); - } + /// /// Test the property 'StockSymbol' /// @@ -264,97 +256,70 @@ public void StockSymbolTest() { instance.StockSymbol = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.StockSymbol); - } + /// /// Test the property 'StockExchange' /// [Fact] public void StockExchangeTest() { - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.NONE; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.NONE); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.NASDAQ; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.NASDAQ); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.NYSE; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.NYSE); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.AMEX; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.AMEX); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.AMX; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.AMX); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.ASX; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.ASX); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.B3; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.B3); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.BME; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.BME); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.BSE; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.BSE); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.FRA; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.FRA); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.ICEX; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.ICEX); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.JPX; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.JPX); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.JSE; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.JSE); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.KRX; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.KRX); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.LON; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.LON); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.NSE; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.NSE); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.OMX; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.OMX); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.SEHK; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.SEHK); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.SGX; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.SGX); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.SSE; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.SSE); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.STO; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.STO); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.SWX; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.SWX); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.SZSE; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.SZSE); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.TSX; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.TSX); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.TWSE; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.TWSE); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.VSE; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.VSE); - - instance.StockExchange = SMSTenDLCBrand.StockExchangeEnum.OTHER; - Assert.Equal(instance.StockExchange,SMSTenDLCBrand.StockExchangeEnum.OTHER); - + instance.StockExchange = SMSTenDLCBrandStockExchange.NONE; + Assert.Equal(SMSTenDLCBrandStockExchange.NONE, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.NASDAQ; + Assert.Equal(SMSTenDLCBrandStockExchange.NASDAQ, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.NYSE; + Assert.Equal(SMSTenDLCBrandStockExchange.NYSE, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.AMEX; + Assert.Equal(SMSTenDLCBrandStockExchange.AMEX, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.AMX; + Assert.Equal(SMSTenDLCBrandStockExchange.AMX, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.ASX; + Assert.Equal(SMSTenDLCBrandStockExchange.ASX, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.B3; + Assert.Equal(SMSTenDLCBrandStockExchange.B3, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.BME; + Assert.Equal(SMSTenDLCBrandStockExchange.BME, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.BSE; + Assert.Equal(SMSTenDLCBrandStockExchange.BSE, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.FRA; + Assert.Equal(SMSTenDLCBrandStockExchange.FRA, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.ICEX; + Assert.Equal(SMSTenDLCBrandStockExchange.ICEX, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.JPX; + Assert.Equal(SMSTenDLCBrandStockExchange.JPX, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.JSE; + Assert.Equal(SMSTenDLCBrandStockExchange.JSE, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.KRX; + Assert.Equal(SMSTenDLCBrandStockExchange.KRX, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.LON; + Assert.Equal(SMSTenDLCBrandStockExchange.LON, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.NSE; + Assert.Equal(SMSTenDLCBrandStockExchange.NSE, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.OMX; + Assert.Equal(SMSTenDLCBrandStockExchange.OMX, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.SEHK; + Assert.Equal(SMSTenDLCBrandStockExchange.SEHK, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.SGX; + Assert.Equal(SMSTenDLCBrandStockExchange.SGX, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.SSE; + Assert.Equal(SMSTenDLCBrandStockExchange.SSE, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.STO; + Assert.Equal(SMSTenDLCBrandStockExchange.STO, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.SWX; + Assert.Equal(SMSTenDLCBrandStockExchange.SWX, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.SZSE; + Assert.Equal(SMSTenDLCBrandStockExchange.SZSE, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.TSX; + Assert.Equal(SMSTenDLCBrandStockExchange.TSX, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.TWSE; + Assert.Equal(SMSTenDLCBrandStockExchange.TWSE, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.VSE; + Assert.Equal(SMSTenDLCBrandStockExchange.VSE, instance.StockExchange); + instance.StockExchange = SMSTenDLCBrandStockExchange.OTHER; + Assert.Equal(SMSTenDLCBrandStockExchange.OTHER, instance.StockExchange); } + /// /// Test the property 'IpAddress' /// @@ -363,8 +328,8 @@ public void IpAddressTest() { instance.IpAddress = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.IpAddress); - } + /// /// Test the property 'Website' /// @@ -373,31 +338,26 @@ public void WebsiteTest() { instance.Website = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Website); - } + /// /// Test the property 'BrandRelationship' /// [Fact] public void BrandRelationshipTest() { - - instance.BrandRelationship = SMSTenDLCBrand.BrandRelationshipEnum.BASIC_ACCOUNT; - Assert.Equal(instance.BrandRelationship,SMSTenDLCBrand.BrandRelationshipEnum.BASIC_ACCOUNT); - - instance.BrandRelationship = SMSTenDLCBrand.BrandRelationshipEnum.SMALL_ACCOUNT; - Assert.Equal(instance.BrandRelationship,SMSTenDLCBrand.BrandRelationshipEnum.SMALL_ACCOUNT); - - instance.BrandRelationship = SMSTenDLCBrand.BrandRelationshipEnum.MEDIUM_ACCOUNT; - Assert.Equal(instance.BrandRelationship,SMSTenDLCBrand.BrandRelationshipEnum.MEDIUM_ACCOUNT); - - instance.BrandRelationship = SMSTenDLCBrand.BrandRelationshipEnum.LARGE_ACCOUNT; - Assert.Equal(instance.BrandRelationship,SMSTenDLCBrand.BrandRelationshipEnum.LARGE_ACCOUNT); - - instance.BrandRelationship = SMSTenDLCBrand.BrandRelationshipEnum.KEY_ACCOUNT; - Assert.Equal(instance.BrandRelationship,SMSTenDLCBrand.BrandRelationshipEnum.KEY_ACCOUNT); - + instance.BrandRelationship = SMSTenDLCBrandRelationship.BASIC_ACCOUNT; + Assert.Equal(SMSTenDLCBrandRelationship.BASIC_ACCOUNT, instance.BrandRelationship); + instance.BrandRelationship = SMSTenDLCBrandRelationship.SMALL_ACCOUNT; + Assert.Equal(SMSTenDLCBrandRelationship.SMALL_ACCOUNT, instance.BrandRelationship); + instance.BrandRelationship = SMSTenDLCBrandRelationship.MEDIUM_ACCOUNT; + Assert.Equal(SMSTenDLCBrandRelationship.MEDIUM_ACCOUNT, instance.BrandRelationship); + instance.BrandRelationship = SMSTenDLCBrandRelationship.LARGE_ACCOUNT; + Assert.Equal(SMSTenDLCBrandRelationship.LARGE_ACCOUNT, instance.BrandRelationship); + instance.BrandRelationship = SMSTenDLCBrandRelationship.KEY_ACCOUNT; + Assert.Equal(SMSTenDLCBrandRelationship.KEY_ACCOUNT, instance.BrandRelationship); } + /// /// Test the property 'Vertical' /// @@ -406,8 +366,8 @@ public void VerticalTest() { instance.Vertical = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Vertical); - } + /// /// Test the property 'AltBusinessId' /// @@ -416,38 +376,24 @@ public void AltBusinessIdTest() { instance.AltBusinessId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AltBusinessId); - } + /// /// Test the property 'AltBusinessIdType' /// [Fact] public void AltBusinessIdTypeTest() { - - instance.AltBusinessIdType = SMSTenDLCBrand.AltBusinessIdTypeEnum.NONE; - Assert.Equal(instance.AltBusinessIdType,SMSTenDLCBrand.AltBusinessIdTypeEnum.NONE); - - instance.AltBusinessIdType = SMSTenDLCBrand.AltBusinessIdTypeEnum.DUNS; - Assert.Equal(instance.AltBusinessIdType,SMSTenDLCBrand.AltBusinessIdTypeEnum.DUNS); - - instance.AltBusinessIdType = SMSTenDLCBrand.AltBusinessIdTypeEnum.GIIN; - Assert.Equal(instance.AltBusinessIdType,SMSTenDLCBrand.AltBusinessIdTypeEnum.GIIN); - - instance.AltBusinessIdType = SMSTenDLCBrand.AltBusinessIdTypeEnum.LEI; - Assert.Equal(instance.AltBusinessIdType,SMSTenDLCBrand.AltBusinessIdTypeEnum.LEI); - + instance.AltBusinessIdType = SMSTenDLCBrandAltBusinessIdType.NONE; + Assert.Equal(SMSTenDLCBrandAltBusinessIdType.NONE, instance.AltBusinessIdType); + instance.AltBusinessIdType = SMSTenDLCBrandAltBusinessIdType.DUNS; + Assert.Equal(SMSTenDLCBrandAltBusinessIdType.DUNS, instance.AltBusinessIdType); + instance.AltBusinessIdType = SMSTenDLCBrandAltBusinessIdType.GIIN; + Assert.Equal(SMSTenDLCBrandAltBusinessIdType.GIIN, instance.AltBusinessIdType); + instance.AltBusinessIdType = SMSTenDLCBrandAltBusinessIdType.LEI; + Assert.Equal(SMSTenDLCBrandAltBusinessIdType.LEI, instance.AltBusinessIdType); } - /// - /// Test the property 'UniversalEin' - /// - [Fact] - public void UniversalEinTest() - { - Assert.Equal("TEST_STRING", instance.UniversalEin); - - } /// /// Test the property 'ReferenceId' /// @@ -456,19 +402,19 @@ public void ReferenceIdTest() { instance.ReferenceId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ReferenceId); - } + /// /// Test the property 'OptionalAttributes' /// [Fact] public void OptionalAttributesTest() { - Dictionary testDictionary = new Dictionary(); instance.OptionalAttributes = testDictionary; - Assert.Equal(testDictionary, instance.OptionalAttributes); + Assert.Equal(testDictionary, instance.OptionalAttributes); } + /// /// Test the property 'Mock' /// @@ -476,29 +422,25 @@ public void OptionalAttributesTest() public void MockTest() { instance.Mock = false; - Assert.Equal(false, instance.Mock); - + Assert.False(instance.Mock); } + /// /// Test the property 'IdentityStatus' /// [Fact] public void IdentityStatusTest() { - - instance.IdentityStatus = SMSTenDLCBrand.IdentityStatusEnum.SELF_DECLARED; - Assert.Equal(instance.IdentityStatus,SMSTenDLCBrand.IdentityStatusEnum.SELF_DECLARED); - - instance.IdentityStatus = SMSTenDLCBrand.IdentityStatusEnum.UNVERIFIED; - Assert.Equal(instance.IdentityStatus,SMSTenDLCBrand.IdentityStatusEnum.UNVERIFIED); - - instance.IdentityStatus = SMSTenDLCBrand.IdentityStatusEnum.VERIFIED; - Assert.Equal(instance.IdentityStatus,SMSTenDLCBrand.IdentityStatusEnum.VERIFIED); - - instance.IdentityStatus = SMSTenDLCBrand.IdentityStatusEnum.VETTED_VERIFIED; - Assert.Equal(instance.IdentityStatus,SMSTenDLCBrand.IdentityStatusEnum.VETTED_VERIFIED); - + instance.IdentityStatus = SMSTenDLCBrandIdentityStatus.SELF_DECLARED; + Assert.Equal(SMSTenDLCBrandIdentityStatus.SELF_DECLARED, instance.IdentityStatus); + instance.IdentityStatus = SMSTenDLCBrandIdentityStatus.UNVERIFIED; + Assert.Equal(SMSTenDLCBrandIdentityStatus.UNVERIFIED, instance.IdentityStatus); + instance.IdentityStatus = SMSTenDLCBrandIdentityStatus.VERIFIED; + Assert.Equal(SMSTenDLCBrandIdentityStatus.VERIFIED, instance.IdentityStatus); + instance.IdentityStatus = SMSTenDLCBrandIdentityStatus.VETTED_VERIFIED; + Assert.Equal(SMSTenDLCBrandIdentityStatus.VETTED_VERIFIED, instance.IdentityStatus); } + /// /// Test the property 'CreateDate' /// @@ -507,430 +449,6 @@ public void CreateDateTest() { instance.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); Assert.Equal(DateTime.Parse("2022-07-05T15:17:05+00:00"), instance.CreateDate); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SMSTenDLCBrand test1 = new SMSTenDLCBrand("TEST_STRING", SMSTenDLCBrand.EntityTypeEnum.PRIVATE_PROFIT, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.StockExchangeEnum.NONE, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.BrandRelationshipEnum.BASIC_ACCOUNT, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.AltBusinessIdTypeEnum.NONE, "TEST_STRING", new Dictionary(), false, SMSTenDLCBrand.IdentityStatusEnum.SELF_DECLARED, DateTime.Parse("2022-07-05T15:17:05+00:00")); - test1.AccountId = "TS"; - - - test1.FirstName = "TS"; - test1.LastName = "TS"; - test1.DisplayName = "TS"; - test1.CompanyName = "TS"; - test1.Ein = "TS"; - test1.EinIssuingCountry = "TS"; - test1.Phone = "TS"; - test1.Street = "TS"; - test1.City = "TS"; - test1.State = "TS"; - test1.PostalCode = "TS"; - test1.Country = "TS"; - test1.Email = "TS"; - test1.StockSymbol = "TS"; - test1.IpAddress = "TS"; - test1.Website = "TS"; - test1.Vertical = "TS"; - test1.AltBusinessId = "TS"; - - test1.ReferenceId = "TS"; - Dictionary testDictionary = new Dictionary(); - test1.OptionalAttributes = testDictionary; - test1.Mock = true; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - - SMSTenDLCBrand test2 = new SMSTenDLCBrand("TEST_STRING", SMSTenDLCBrand.EntityTypeEnum.PRIVATE_PROFIT, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.StockExchangeEnum.NONE, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.BrandRelationshipEnum.BASIC_ACCOUNT, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.AltBusinessIdTypeEnum.NONE, "TEST_STRING", new Dictionary(), false, SMSTenDLCBrand.IdentityStatusEnum.SELF_DECLARED, DateTime.Parse("2022-07-05T15:17:05+00:00")); - test2.AccountId = "TS"; - - - test2.FirstName = "TS"; - test2.LastName = "TS"; - test2.DisplayName = "TS"; - test2.CompanyName = "TS"; - test2.Ein = "TS"; - test2.EinIssuingCountry = "TS"; - test2.Phone = "TS"; - test2.Street = "TS"; - test2.City = "TS"; - test2.State = "TS"; - test2.PostalCode = "TS"; - test2.Country = "TS"; - test2.Email = "TS"; - test2.StockSymbol = "TS"; - test2.IpAddress = "TS"; - test2.Website = "TS"; - test2.Vertical = "TS"; - test2.AltBusinessId = "TS"; - - test2.ReferenceId = "TS"; - Dictionary testDictionary2 = new Dictionary(); - test2.OptionalAttributes = testDictionary2; - test2.Mock = true; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SMSTenDLCBrand test1 = new SMSTenDLCBrand("TEST_STRING", SMSTenDLCBrand.EntityTypeEnum.PRIVATE_PROFIT, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.StockExchangeEnum.NONE, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.BrandRelationshipEnum.BASIC_ACCOUNT, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.AltBusinessIdTypeEnum.NONE, "TEST_STRING", new Dictionary(), false, SMSTenDLCBrand.IdentityStatusEnum.SELF_DECLARED, DateTime.Parse("2022-07-05T15:17:05+00:00")); - test1.AccountId = "TS"; - - - test1.FirstName = "TS"; - test1.LastName = "TS"; - test1.DisplayName = "TS"; - test1.CompanyName = "TS"; - test1.Ein = "TS"; - test1.EinIssuingCountry = "TS"; - test1.Phone = "TS"; - test1.Street = "TS"; - test1.City = "TS"; - test1.State = "TS"; - test1.PostalCode = "TS"; - test1.Country = "TS"; - test1.Email = "TS"; - test1.StockSymbol = "TS"; - test1.IpAddress = "TS"; - test1.Website = "TS"; - test1.Vertical = "TS"; - test1.AltBusinessId = "TS"; - - test1.ReferenceId = "TS"; - Dictionary testDictionary = new Dictionary(); - test1.OptionalAttributes = testDictionary; - test1.Mock = true; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - - SMSTenDLCBrand test2 = new SMSTenDLCBrand("TEST_STRING", SMSTenDLCBrand.EntityTypeEnum.PRIVATE_PROFIT, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.StockExchangeEnum.NONE, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.BrandRelationshipEnum.BASIC_ACCOUNT, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.AltBusinessIdTypeEnum.NONE, "TEST_STRING", new Dictionary(), false, SMSTenDLCBrand.IdentityStatusEnum.SELF_DECLARED, DateTime.Parse("2022-07-05T15:17:05+00:00")); - test2.AccountId = "ts"; - - - test2.FirstName = "ts"; - test2.LastName = "ts"; - test2.DisplayName = "ts"; - test2.CompanyName = "ts"; - test2.Ein = "ts"; - test2.EinIssuingCountry = "ts"; - test2.Phone = "ts"; - test2.Street = "ts"; - test2.City = "ts"; - test2.State = "ts"; - test2.PostalCode = "ts"; - test2.Country = "ts"; - test2.Email = "ts"; - test2.StockSymbol = "ts"; - test2.IpAddress = "ts"; - test2.Website = "ts"; - test2.Vertical = "ts"; - test2.AltBusinessId = "ts"; - - test2.ReferenceId = "ts"; - Dictionary testDictionary2 = new Dictionary(); - test2.OptionalAttributes = testDictionary2; - test2.Mock = false; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SMSTenDLCBrand test1 = new SMSTenDLCBrand("TEST_STRING", SMSTenDLCBrand.EntityTypeEnum.PRIVATE_PROFIT, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.StockExchangeEnum.NONE, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.BrandRelationshipEnum.BASIC_ACCOUNT, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.AltBusinessIdTypeEnum.NONE, "TEST_STRING", new Dictionary(), false, SMSTenDLCBrand.IdentityStatusEnum.SELF_DECLARED, DateTime.Parse("2022-07-05T15:17:05+00:00")); - test1.AccountId = "TS"; - - - test1.FirstName = "TS"; - test1.LastName = "TS"; - test1.DisplayName = "TS"; - test1.CompanyName = "TS"; - test1.Ein = "TS"; - test1.EinIssuingCountry = "TS"; - test1.Phone = "TS"; - test1.Street = "TS"; - test1.City = "TS"; - test1.State = "TS"; - test1.PostalCode = "TS"; - test1.Country = "TS"; - test1.Email = "TS"; - test1.StockSymbol = "TS"; - test1.IpAddress = "TS"; - test1.Website = "TS"; - test1.Vertical = "TS"; - test1.AltBusinessId = "TS"; - - test1.ReferenceId = "TS"; - Dictionary testDictionary = new Dictionary(); - test1.OptionalAttributes = testDictionary; - test1.Mock = true; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SMSTenDLCBrand test1 = new SMSTenDLCBrand("TEST_STRING", SMSTenDLCBrand.EntityTypeEnum.PRIVATE_PROFIT, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.StockExchangeEnum.NONE, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.BrandRelationshipEnum.BASIC_ACCOUNT, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.AltBusinessIdTypeEnum.NONE, "TEST_STRING", new Dictionary(), false, SMSTenDLCBrand.IdentityStatusEnum.SELF_DECLARED, DateTime.Parse("2022-07-05T15:17:05+00:00")); - test1.AccountId = "TS"; - - - test1.FirstName = "TS"; - test1.LastName = "TS"; - test1.DisplayName = "TS"; - test1.CompanyName = "TS"; - test1.Ein = "TS"; - test1.EinIssuingCountry = "TS"; - test1.Phone = "TS"; - test1.Street = "TS"; - test1.City = "TS"; - test1.State = "TS"; - test1.PostalCode = "TS"; - test1.Country = "TS"; - test1.Email = "TS"; - test1.StockSymbol = "TS"; - test1.IpAddress = "TS"; - test1.Website = "TS"; - test1.Vertical = "TS"; - test1.AltBusinessId = "TS"; - - test1.ReferenceId = "TS"; - Dictionary testDictionary = new Dictionary(); - test1.OptionalAttributes = testDictionary; - test1.Mock = true; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SMSTenDLCBrand test1 = new SMSTenDLCBrand("TEST_STRING", SMSTenDLCBrand.EntityTypeEnum.PRIVATE_PROFIT, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.StockExchangeEnum.NONE, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.BrandRelationshipEnum.BASIC_ACCOUNT, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.AltBusinessIdTypeEnum.NONE, "TEST_STRING", new Dictionary(), false, SMSTenDLCBrand.IdentityStatusEnum.SELF_DECLARED, DateTime.Parse("2022-07-05T15:17:05+00:00")); - test1.AccountId = "TS"; - - - test1.FirstName = "TS"; - test1.LastName = "TS"; - test1.DisplayName = "TS"; - test1.CompanyName = "TS"; - test1.Ein = "TS"; - test1.EinIssuingCountry = "TS"; - test1.Phone = "TS"; - test1.Street = "TS"; - test1.City = "TS"; - test1.State = "TS"; - test1.PostalCode = "TS"; - test1.Country = "TS"; - test1.Email = "TS"; - test1.StockSymbol = "TS"; - test1.IpAddress = "TS"; - test1.Website = "TS"; - test1.Vertical = "TS"; - test1.AltBusinessId = "TS"; - - test1.ReferenceId = "TS"; - Dictionary testDictionary = new Dictionary(); - test1.OptionalAttributes = testDictionary; - test1.Mock = true; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - - SMSTenDLCBrand test2 = new SMSTenDLCBrand("TEST_STRING", SMSTenDLCBrand.EntityTypeEnum.PRIVATE_PROFIT, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.StockExchangeEnum.NONE, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.BrandRelationshipEnum.BASIC_ACCOUNT, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.AltBusinessIdTypeEnum.NONE, "TEST_STRING", new Dictionary(), false, SMSTenDLCBrand.IdentityStatusEnum.SELF_DECLARED, DateTime.Parse("2022-07-05T15:17:05+00:00")); - test2.AccountId = "TS"; - - - test2.FirstName = "TS"; - test2.LastName = "TS"; - test2.DisplayName = "TS"; - test2.CompanyName = "TS"; - test2.Ein = "TS"; - test2.EinIssuingCountry = "TS"; - test2.Phone = "TS"; - test2.Street = "TS"; - test2.City = "TS"; - test2.State = "TS"; - test2.PostalCode = "TS"; - test2.Country = "TS"; - test2.Email = "TS"; - test2.StockSymbol = "TS"; - test2.IpAddress = "TS"; - test2.Website = "TS"; - test2.Vertical = "TS"; - test2.AltBusinessId = "TS"; - - test2.ReferenceId = "TS"; - Dictionary testDictionary2 = new Dictionary(); - test2.OptionalAttributes = testDictionary2; - test2.Mock = true; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SMSTenDLCBrand test1 = new SMSTenDLCBrand("TEST_STRING", SMSTenDLCBrand.EntityTypeEnum.PRIVATE_PROFIT, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.StockExchangeEnum.NONE, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.BrandRelationshipEnum.BASIC_ACCOUNT, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.AltBusinessIdTypeEnum.NONE, "TEST_STRING", new Dictionary(), false, SMSTenDLCBrand.IdentityStatusEnum.SELF_DECLARED, DateTime.Parse("2022-07-05T15:17:05+00:00")); - test1.AccountId = "TS"; - - - test1.FirstName = "TS"; - test1.LastName = "TS"; - test1.DisplayName = "TS"; - test1.CompanyName = "TS"; - test1.Ein = "TS"; - test1.EinIssuingCountry = "TS"; - test1.Phone = "TS"; - test1.Street = "TS"; - test1.City = "TS"; - test1.State = "TS"; - test1.PostalCode = "TS"; - test1.Country = "TS"; - test1.Email = "TS"; - test1.StockSymbol = "TS"; - test1.IpAddress = "TS"; - test1.Website = "TS"; - test1.Vertical = "TS"; - test1.AltBusinessId = "TS"; - - test1.ReferenceId = "TS"; - Dictionary testDictionary = new Dictionary(); - test1.OptionalAttributes = testDictionary; - test1.Mock = true; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - - SMSTenDLCBrand test2 = new SMSTenDLCBrand("TEST_STRING", SMSTenDLCBrand.EntityTypeEnum.PRIVATE_PROFIT, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.StockExchangeEnum.NONE, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.BrandRelationshipEnum.BASIC_ACCOUNT, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.AltBusinessIdTypeEnum.NONE, "TEST_STRING", new Dictionary(), false, SMSTenDLCBrand.IdentityStatusEnum.SELF_DECLARED, DateTime.Parse("2022-07-05T15:17:05+00:00")); - test2.AccountId = "TS"; - - - test2.FirstName = "TS"; - test2.LastName = "TS"; - test2.DisplayName = "TS"; - test2.CompanyName = "TS"; - test2.Ein = "TS"; - test2.EinIssuingCountry = "TS"; - test2.Phone = "TS"; - test2.Street = "TS"; - test2.City = "TS"; - test2.State = "TS"; - test2.PostalCode = "TS"; - test2.Country = "TS"; - test2.Email = "TS"; - test2.StockSymbol = "TS"; - test2.IpAddress = "TS"; - test2.Website = "TS"; - test2.Vertical = "TS"; - test2.AltBusinessId = "TS"; - - test2.ReferenceId = "TS"; - Dictionary testDictionary2 = new Dictionary(); - test2.OptionalAttributes = testDictionary2; - test2.Mock = true; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SMSTenDLCBrand test1 = new SMSTenDLCBrand("TEST_STRING", SMSTenDLCBrand.EntityTypeEnum.PRIVATE_PROFIT, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.StockExchangeEnum.NONE, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.BrandRelationshipEnum.BASIC_ACCOUNT, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.AltBusinessIdTypeEnum.NONE, "TEST_STRING", new Dictionary(), false, SMSTenDLCBrand.IdentityStatusEnum.SELF_DECLARED, DateTime.Parse("2022-07-05T15:17:05+00:00")); - test1.AccountId = "TS"; - - - test1.FirstName = "TS"; - test1.LastName = "TS"; - test1.DisplayName = "TS"; - test1.CompanyName = "TS"; - test1.Ein = "TS"; - test1.EinIssuingCountry = "TS"; - test1.Phone = "TS"; - test1.Street = "TS"; - test1.City = "TS"; - test1.State = "TS"; - test1.PostalCode = "TS"; - test1.Country = "TS"; - test1.Email = "TS"; - test1.StockSymbol = "TS"; - test1.IpAddress = "TS"; - test1.Website = "TS"; - test1.Vertical = "TS"; - test1.AltBusinessId = "TS"; - - test1.ReferenceId = "TS"; - Dictionary testDictionary = new Dictionary(); - test1.OptionalAttributes = testDictionary; - test1.Mock = true; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SMSTenDLCBrand test2 = new SMSTenDLCBrand("TEST_STRING", SMSTenDLCBrand.EntityTypeEnum.PRIVATE_PROFIT, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.StockExchangeEnum.NONE, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.BrandRelationshipEnum.BASIC_ACCOUNT, "TEST_STRING", "TEST_STRING", SMSTenDLCBrand.AltBusinessIdTypeEnum.NONE, "TEST_STRING", new Dictionary(), false, SMSTenDLCBrand.IdentityStatusEnum.SELF_DECLARED, DateTime.Parse("2022-07-05T15:17:05+00:00")); - test2.AccountId = "TS"; - - - test2.FirstName = "TS"; - test2.LastName = "TS"; - test2.DisplayName = "TS"; - test2.CompanyName = "TS"; - test2.Ein = "TS"; - test2.EinIssuingCountry = "TS"; - test2.Phone = "TS"; - test2.Street = "TS"; - test2.City = "TS"; - test2.State = "TS"; - test2.PostalCode = "TS"; - test2.Country = "TS"; - test2.Email = "TS"; - test2.StockSymbol = "TS"; - test2.IpAddress = "TS"; - test2.Website = "TS"; - test2.Vertical = "TS"; - test2.AltBusinessId = "TS"; - - test2.ReferenceId = "TS"; - Dictionary testDictionary2 = new Dictionary(); - test2.OptionalAttributes = testDictionary2; - test2.Mock = true; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/SMSTenDLCBrandsListResultAllOfTests.cs b/src/freeclimb.Test/Model/SMSTenDLCBrandsListResultAllOfTests.cs deleted file mode 100644 index 8f6e4aae..00000000 --- a/src/freeclimb.Test/Model/SMSTenDLCBrandsListResultAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing SMSTenDLCBrandsListResultAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SMSTenDLCBrandsListResultAllOfTests - { - private SMSTenDLCBrandsListResultAllOf instance; - - public SMSTenDLCBrandsListResultAllOfTests() - { - - instance = new SMSTenDLCBrandsListResultAllOf(new List()); - - } - - /// - /// Test an instance of SMSTenDLCBrandsListResultAllOf - /// - [Fact] - public void SMSTenDLCBrandsListResultAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Brands' - /// - [Fact] - public void BrandsTest() - { - - List testList = new List(); - instance.Brands = testList; - Assert.Equal(testList, instance.Brands); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SMSTenDLCBrandsListResultAllOf test1 = new SMSTenDLCBrandsListResultAllOf(new List()); - List testList = new List(); - test1.Brands = testList; - - SMSTenDLCBrandsListResultAllOf test2 = new SMSTenDLCBrandsListResultAllOf(new List()); - List testList2 = new List(); - test2.Brands = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SMSTenDLCBrandsListResultAllOf test1 = new SMSTenDLCBrandsListResultAllOf(new List()); - List testList = new List(); - test1.Brands = testList; - - SMSTenDLCBrandsListResultAllOf test2 = new SMSTenDLCBrandsListResultAllOf(new List()); - List testList2 = null; - test2.Brands = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SMSTenDLCBrandsListResultAllOf test1 = new SMSTenDLCBrandsListResultAllOf(new List()); - List testList = new List(); - test1.Brands = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SMSTenDLCBrandsListResultAllOf test1 = new SMSTenDLCBrandsListResultAllOf(new List()); - List testList = new List(); - test1.Brands = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SMSTenDLCBrandsListResultAllOf test1 = new SMSTenDLCBrandsListResultAllOf(new List()); - List testList = new List(); - test1.Brands = testList; - - SMSTenDLCBrandsListResultAllOf test2 = new SMSTenDLCBrandsListResultAllOf(new List()); - List testList2 = new List(); - test2.Brands = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SMSTenDLCBrandsListResultAllOf test1 = new SMSTenDLCBrandsListResultAllOf(new List()); - List testList = new List(); - test1.Brands = testList; - - SMSTenDLCBrandsListResultAllOf test2 = new SMSTenDLCBrandsListResultAllOf(new List()); - List testList2 = new List(); - test2.Brands = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SMSTenDLCBrandsListResultAllOf test1 = new SMSTenDLCBrandsListResultAllOf(new List()); - List testList = new List(); - test1.Brands = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SMSTenDLCBrandsListResultAllOf test2 = new SMSTenDLCBrandsListResultAllOf(new List()); - List testList2 = new List(); - test2.Brands = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/SMSTenDLCBrandsListResultTests.cs b/src/freeclimb.Test/Model/SMSTenDLCBrandsListResultTests.cs index f37c22e4..09c52aab 100644 --- a/src/freeclimb.Test/Model/SMSTenDLCBrandsListResultTests.cs +++ b/src/freeclimb.Test/Model/SMSTenDLCBrandsListResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,28 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SMSTenDLCBrandsListResultTests + + public class SMSTenDLCBrandsListResultTests : IDisposable { private SMSTenDLCBrandsListResult instance; public SMSTenDLCBrandsListResultTests() { - - instance = new SMSTenDLCBrandsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new SMSTenDLCBrandsListResult( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + brands: (List)TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +64,66 @@ public void SMSTenDLCBrandsListResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +132,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'Brands' /// [Fact] public void BrandsTest() { - List testList = new List(); instance.Brands = testList; - Assert.Equal(testList, instance.Brands); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SMSTenDLCBrandsListResult test1 = new SMSTenDLCBrandsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Brands = testList; - - SMSTenDLCBrandsListResult test2 = new SMSTenDLCBrandsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Brands = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SMSTenDLCBrandsListResult test1 = new SMSTenDLCBrandsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Brands = testList; - - SMSTenDLCBrandsListResult test2 = new SMSTenDLCBrandsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.Brands = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SMSTenDLCBrandsListResult test1 = new SMSTenDLCBrandsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Brands = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SMSTenDLCBrandsListResult test1 = new SMSTenDLCBrandsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Brands = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SMSTenDLCBrandsListResult test1 = new SMSTenDLCBrandsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Brands = testList; - - SMSTenDLCBrandsListResult test2 = new SMSTenDLCBrandsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Brands = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SMSTenDLCBrandsListResult test1 = new SMSTenDLCBrandsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Brands = testList; - - SMSTenDLCBrandsListResult test2 = new SMSTenDLCBrandsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Brands = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SMSTenDLCBrandsListResult test1 = new SMSTenDLCBrandsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Brands = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SMSTenDLCBrandsListResult test2 = new SMSTenDLCBrandsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Brands = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.Brands, testList); } } } diff --git a/src/freeclimb.Test/Model/SMSTenDLCCampaignTests.cs b/src/freeclimb.Test/Model/SMSTenDLCCampaignTests.cs index 37f7a558..9c97f546 100644 --- a/src/freeclimb.Test/Model/SMSTenDLCCampaignTests.cs +++ b/src/freeclimb.Test/Model/SMSTenDLCCampaignTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,57 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SMSTenDLCCampaignTests + + public class SMSTenDLCCampaignTests : IDisposable { private SMSTenDLCCampaign instance; public SMSTenDLCCampaignTests() { - - instance = new SMSTenDLCCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), false, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", new List(), "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, DateTime.Parse("2000-01-01")); - + instance = new SMSTenDLCCampaign( + accountId: (string)TestHelpers.getTestValue(typeof(string)), + campaignId: (string)TestHelpers.getTestValue(typeof(string)), + cspId: (string)TestHelpers.getTestValue(typeof(string)), + resellerId: (string)TestHelpers.getTestValue(typeof(string)), + status: (SMSTenDLCCampaignStatus) + TestHelpers.getTestValue(typeof(SMSTenDLCCampaignStatus)), + createDate: (DateTime)TestHelpers.getTestValue(typeof(DateTime)), + autoRenewal: (bool)TestHelpers.getTestValue(typeof(bool)), + billedDate: (DateTime?)TestHelpers.getTestValue(typeof(DateTime?)), + brandId: (string)TestHelpers.getTestValue(typeof(string)), + usecase: (string)TestHelpers.getTestValue(typeof(string)), + subUsecases: (List)TestHelpers.getTestValue(typeof(List)), + description: (string)TestHelpers.getTestValue(typeof(string)), + embeddedLink: (bool)TestHelpers.getTestValue(typeof(bool)), + embeddedPhone: (bool)TestHelpers.getTestValue(typeof(bool)), + affiliateMarketing: (bool)TestHelpers.getTestValue(typeof(bool)), + numberPool: (bool)TestHelpers.getTestValue(typeof(bool)), + ageGated: (bool)TestHelpers.getTestValue(typeof(bool)), + directLending: (bool)TestHelpers.getTestValue(typeof(bool)), + subscriberOptin: (bool)TestHelpers.getTestValue(typeof(bool)), + subscriberOptout: (bool)TestHelpers.getTestValue(typeof(bool)), + subscriberHelp: (bool)TestHelpers.getTestValue(typeof(bool)), + sample1: (string)TestHelpers.getTestValue(typeof(string)), + sample2: (string)TestHelpers.getTestValue(typeof(string)), + sample3: (string)TestHelpers.getTestValue(typeof(string)), + sample4: (string)TestHelpers.getTestValue(typeof(string)), + sample5: (string)TestHelpers.getTestValue(typeof(string)), + messageFlow: (string)TestHelpers.getTestValue(typeof(string)), + helpMessage: (string)TestHelpers.getTestValue(typeof(string)), + optinKeywords: (string)TestHelpers.getTestValue(typeof(string)), + optoutKeywords: (string)TestHelpers.getTestValue(typeof(string)), + helpKeywords: (string)TestHelpers.getTestValue(typeof(string)), + optinMessage: (string)TestHelpers.getTestValue(typeof(string)), + optoutMessage: (string)TestHelpers.getTestValue(typeof(string)), + referenceId: (string)TestHelpers.getTestValue(typeof(string)), + mock: (bool)TestHelpers.getTestValue(typeof(bool)), + nextRenewalOrExpirationDate: (DateOnly?)TestHelpers.getTestValue(typeof(DateOnly?)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +93,6 @@ public void SMSTenDLCCampaignInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'AccountId' /// @@ -65,8 +101,8 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } + /// /// Test the property 'CampaignId' /// @@ -75,8 +111,8 @@ public void CampaignIdTest() { instance.CampaignId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CampaignId); - } + /// /// Test the property 'CspId' /// @@ -85,8 +121,8 @@ public void CspIdTest() { instance.CspId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CspId); - } + /// /// Test the property 'ResellerId' /// @@ -95,22 +131,20 @@ public void ResellerIdTest() { instance.ResellerId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ResellerId); - } + /// /// Test the property 'Status' /// [Fact] public void StatusTest() { - - instance.Status = SMSTenDLCCampaign.StatusEnum.ACTIVE; - Assert.Equal(instance.Status,SMSTenDLCCampaign.StatusEnum.ACTIVE); - - instance.Status = SMSTenDLCCampaign.StatusEnum.EXPIRED; - Assert.Equal(instance.Status,SMSTenDLCCampaign.StatusEnum.EXPIRED); - + instance.Status = SMSTenDLCCampaignStatus.ACTIVE; + Assert.Equal(SMSTenDLCCampaignStatus.ACTIVE, instance.Status); + instance.Status = SMSTenDLCCampaignStatus.EXPIRED; + Assert.Equal(SMSTenDLCCampaignStatus.EXPIRED, instance.Status); } + /// /// Test the property 'CreateDate' /// @@ -119,8 +153,8 @@ public void CreateDateTest() { instance.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); Assert.Equal(DateTime.Parse("2022-07-05T15:17:05+00:00"), instance.CreateDate); - } + /// /// Test the property 'AutoRenewal' /// @@ -128,9 +162,9 @@ public void CreateDateTest() public void AutoRenewalTest() { instance.AutoRenewal = false; - Assert.Equal(false, instance.AutoRenewal); - + Assert.False(instance.AutoRenewal); } + /// /// Test the property 'BilledDate' /// @@ -139,8 +173,8 @@ public void BilledDateTest() { instance.BilledDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); Assert.Equal(DateTime.Parse("2022-07-05T15:17:05+00:00"), instance.BilledDate); - } + /// /// Test the property 'BrandId' /// @@ -149,8 +183,8 @@ public void BrandIdTest() { instance.BrandId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.BrandId); - } + /// /// Test the property 'Usecase' /// @@ -159,19 +193,19 @@ public void UsecaseTest() { instance.Usecase = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Usecase); - } + /// /// Test the property 'SubUsecases' /// [Fact] public void SubUsecasesTest() { - List testList = new List(); instance.SubUsecases = testList; - Assert.Equal(testList, instance.SubUsecases); + Assert.Equal(testList, instance.SubUsecases); } + /// /// Test the property 'Description' /// @@ -180,8 +214,8 @@ public void DescriptionTest() { instance.Description = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Description); - } + /// /// Test the property 'EmbeddedLink' /// @@ -189,9 +223,9 @@ public void DescriptionTest() public void EmbeddedLinkTest() { instance.EmbeddedLink = false; - Assert.Equal(false, instance.EmbeddedLink); - + Assert.False(instance.EmbeddedLink); } + /// /// Test the property 'EmbeddedPhone' /// @@ -199,9 +233,9 @@ public void EmbeddedLinkTest() public void EmbeddedPhoneTest() { instance.EmbeddedPhone = false; - Assert.Equal(false, instance.EmbeddedPhone); - + Assert.False(instance.EmbeddedPhone); } + /// /// Test the property 'AffiliateMarketing' /// @@ -209,9 +243,9 @@ public void EmbeddedPhoneTest() public void AffiliateMarketingTest() { instance.AffiliateMarketing = false; - Assert.Equal(false, instance.AffiliateMarketing); - + Assert.False(instance.AffiliateMarketing); } + /// /// Test the property 'NumberPool' /// @@ -219,9 +253,9 @@ public void AffiliateMarketingTest() public void NumberPoolTest() { instance.NumberPool = false; - Assert.Equal(false, instance.NumberPool); - + Assert.False(instance.NumberPool); } + /// /// Test the property 'AgeGated' /// @@ -229,9 +263,9 @@ public void NumberPoolTest() public void AgeGatedTest() { instance.AgeGated = false; - Assert.Equal(false, instance.AgeGated); - + Assert.False(instance.AgeGated); } + /// /// Test the property 'DirectLending' /// @@ -239,9 +273,9 @@ public void AgeGatedTest() public void DirectLendingTest() { instance.DirectLending = false; - Assert.Equal(false, instance.DirectLending); - + Assert.False(instance.DirectLending); } + /// /// Test the property 'SubscriberOptin' /// @@ -249,9 +283,9 @@ public void DirectLendingTest() public void SubscriberOptinTest() { instance.SubscriberOptin = false; - Assert.Equal(false, instance.SubscriberOptin); - + Assert.False(instance.SubscriberOptin); } + /// /// Test the property 'SubscriberOptout' /// @@ -259,9 +293,9 @@ public void SubscriberOptinTest() public void SubscriberOptoutTest() { instance.SubscriberOptout = false; - Assert.Equal(false, instance.SubscriberOptout); - + Assert.False(instance.SubscriberOptout); } + /// /// Test the property 'SubscriberHelp' /// @@ -269,9 +303,9 @@ public void SubscriberOptoutTest() public void SubscriberHelpTest() { instance.SubscriberHelp = false; - Assert.Equal(false, instance.SubscriberHelp); - + Assert.False(instance.SubscriberHelp); } + /// /// Test the property 'Sample1' /// @@ -280,8 +314,8 @@ public void Sample1Test() { instance.Sample1 = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Sample1); - } + /// /// Test the property 'Sample2' /// @@ -290,8 +324,8 @@ public void Sample2Test() { instance.Sample2 = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Sample2); - } + /// /// Test the property 'Sample3' /// @@ -300,8 +334,8 @@ public void Sample3Test() { instance.Sample3 = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Sample3); - } + /// /// Test the property 'Sample4' /// @@ -310,8 +344,8 @@ public void Sample4Test() { instance.Sample4 = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Sample4); - } + /// /// Test the property 'Sample5' /// @@ -320,8 +354,8 @@ public void Sample5Test() { instance.Sample5 = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Sample5); - } + /// /// Test the property 'MessageFlow' /// @@ -330,8 +364,8 @@ public void MessageFlowTest() { instance.MessageFlow = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.MessageFlow); - } + /// /// Test the property 'HelpMessage' /// @@ -340,8 +374,8 @@ public void HelpMessageTest() { instance.HelpMessage = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.HelpMessage); - } + /// /// Test the property 'OptinKeywords' /// @@ -350,8 +384,8 @@ public void OptinKeywordsTest() { instance.OptinKeywords = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.OptinKeywords); - } + /// /// Test the property 'OptoutKeywords' /// @@ -360,8 +394,8 @@ public void OptoutKeywordsTest() { instance.OptoutKeywords = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.OptoutKeywords); - } + /// /// Test the property 'HelpKeywords' /// @@ -370,8 +404,8 @@ public void HelpKeywordsTest() { instance.HelpKeywords = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.HelpKeywords); - } + /// /// Test the property 'OptinMessage' /// @@ -380,8 +414,8 @@ public void OptinMessageTest() { instance.OptinMessage = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.OptinMessage); - } + /// /// Test the property 'OptoutMessage' /// @@ -390,8 +424,8 @@ public void OptoutMessageTest() { instance.OptoutMessage = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.OptoutMessage); - } + /// /// Test the property 'ReferenceId' /// @@ -400,8 +434,8 @@ public void ReferenceIdTest() { instance.ReferenceId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ReferenceId); - } + /// /// Test the property 'Mock' /// @@ -409,549 +443,22 @@ public void ReferenceIdTest() public void MockTest() { instance.Mock = false; - Assert.Equal(false, instance.Mock); - + Assert.False(instance.Mock); } + /// /// Test the property 'NextRenewalOrExpirationDate' /// [Fact] public void NextRenewalOrExpirationDateTest() { - instance.NextRenewalOrExpirationDate = DateTime.Parse("2000-01-01"); - Assert.Equal(DateTime.Parse("2000-01-01"), instance.NextRenewalOrExpirationDate); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SMSTenDLCCampaign test1 = new SMSTenDLCCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), false, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", new List(), "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, DateTime.Parse("2000-01-01")); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.CspId = "TS"; - test1.ResellerId = "TS"; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.AutoRenewal = true; - test1.BilledDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.BrandId = "TS"; - test1.Usecase = "TS"; - List testList = new List(); - test1.SubUsecases = testList; - test1.Description = "TS"; - test1.EmbeddedLink = true; - test1.EmbeddedPhone = true; - test1.AffiliateMarketing = true; - test1.NumberPool = true; - test1.AgeGated = true; - test1.DirectLending = true; - test1.SubscriberOptin = true; - test1.SubscriberOptout = true; - test1.SubscriberHelp = true; - test1.Sample1 = "TS"; - test1.Sample2 = "TS"; - test1.Sample3 = "TS"; - test1.Sample4 = "TS"; - test1.Sample5 = "TS"; - test1.MessageFlow = "TS"; - test1.HelpMessage = "TS"; - test1.OptinKeywords = "TS"; - test1.OptoutKeywords = "TS"; - test1.HelpKeywords = "TS"; - test1.OptinMessage = "TS"; - test1.OptoutMessage = "TS"; - test1.ReferenceId = "TS"; - test1.Mock = true; - test1.NextRenewalOrExpirationDate = DateTime.Parse("2000-01-01"); - - SMSTenDLCCampaign test2 = new SMSTenDLCCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), false, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", new List(), "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, DateTime.Parse("2000-01-01")); - test2.AccountId = "TS"; - test2.CampaignId = "TS"; - test2.CspId = "TS"; - test2.ResellerId = "TS"; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.AutoRenewal = true; - test2.BilledDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.BrandId = "TS"; - test2.Usecase = "TS"; - List testList2 = new List(); - test2.SubUsecases = testList2; - test2.Description = "TS"; - test2.EmbeddedLink = true; - test2.EmbeddedPhone = true; - test2.AffiliateMarketing = true; - test2.NumberPool = true; - test2.AgeGated = true; - test2.DirectLending = true; - test2.SubscriberOptin = true; - test2.SubscriberOptout = true; - test2.SubscriberHelp = true; - test2.Sample1 = "TS"; - test2.Sample2 = "TS"; - test2.Sample3 = "TS"; - test2.Sample4 = "TS"; - test2.Sample5 = "TS"; - test2.MessageFlow = "TS"; - test2.HelpMessage = "TS"; - test2.OptinKeywords = "TS"; - test2.OptoutKeywords = "TS"; - test2.HelpKeywords = "TS"; - test2.OptinMessage = "TS"; - test2.OptoutMessage = "TS"; - test2.ReferenceId = "TS"; - test2.Mock = true; - test2.NextRenewalOrExpirationDate = DateTime.Parse("2000-01-01"); - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SMSTenDLCCampaign test1 = new SMSTenDLCCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), false, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", new List(), "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, DateTime.Parse("2000-01-01")); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.CspId = "TS"; - test1.ResellerId = "TS"; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.AutoRenewal = true; - test1.BilledDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.BrandId = "TS"; - test1.Usecase = "TS"; - List testList = new List(); - test1.SubUsecases = testList; - test1.Description = "TS"; - test1.EmbeddedLink = true; - test1.EmbeddedPhone = true; - test1.AffiliateMarketing = true; - test1.NumberPool = true; - test1.AgeGated = true; - test1.DirectLending = true; - test1.SubscriberOptin = true; - test1.SubscriberOptout = true; - test1.SubscriberHelp = true; - test1.Sample1 = "TS"; - test1.Sample2 = "TS"; - test1.Sample3 = "TS"; - test1.Sample4 = "TS"; - test1.Sample5 = "TS"; - test1.MessageFlow = "TS"; - test1.HelpMessage = "TS"; - test1.OptinKeywords = "TS"; - test1.OptoutKeywords = "TS"; - test1.HelpKeywords = "TS"; - test1.OptinMessage = "TS"; - test1.OptoutMessage = "TS"; - test1.ReferenceId = "TS"; - test1.Mock = true; - test1.NextRenewalOrExpirationDate = DateTime.Parse("2000-01-01"); - - SMSTenDLCCampaign test2 = new SMSTenDLCCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), false, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", new List(), "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, DateTime.Parse("2000-01-01")); - test2.AccountId = "ts"; - test2.CampaignId = "ts"; - test2.CspId = "ts"; - test2.ResellerId = "ts"; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.AutoRenewal = false; - test2.BilledDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.BrandId = "ts"; - test2.Usecase = "ts"; - List testList2 = new List(); - test2.SubUsecases = testList2; - test2.Description = "ts"; - test2.EmbeddedLink = false; - test2.EmbeddedPhone = false; - test2.AffiliateMarketing = false; - test2.NumberPool = false; - test2.AgeGated = false; - test2.DirectLending = false; - test2.SubscriberOptin = false; - test2.SubscriberOptout = false; - test2.SubscriberHelp = false; - test2.Sample1 = "ts"; - test2.Sample2 = "ts"; - test2.Sample3 = "ts"; - test2.Sample4 = "ts"; - test2.Sample5 = "ts"; - test2.MessageFlow = "ts"; - test2.HelpMessage = "ts"; - test2.OptinKeywords = "ts"; - test2.OptoutKeywords = "ts"; - test2.HelpKeywords = "ts"; - test2.OptinMessage = "ts"; - test2.OptoutMessage = "ts"; - test2.ReferenceId = "ts"; - test2.Mock = false; - test2.NextRenewalOrExpirationDate = DateTime.Parse("2000-01-01"); - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SMSTenDLCCampaign test1 = new SMSTenDLCCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), false, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", new List(), "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, DateTime.Parse("2000-01-01")); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.CspId = "TS"; - test1.ResellerId = "TS"; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.AutoRenewal = true; - test1.BilledDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.BrandId = "TS"; - test1.Usecase = "TS"; - List testList = new List(); - test1.SubUsecases = testList; - test1.Description = "TS"; - test1.EmbeddedLink = true; - test1.EmbeddedPhone = true; - test1.AffiliateMarketing = true; - test1.NumberPool = true; - test1.AgeGated = true; - test1.DirectLending = true; - test1.SubscriberOptin = true; - test1.SubscriberOptout = true; - test1.SubscriberHelp = true; - test1.Sample1 = "TS"; - test1.Sample2 = "TS"; - test1.Sample3 = "TS"; - test1.Sample4 = "TS"; - test1.Sample5 = "TS"; - test1.MessageFlow = "TS"; - test1.HelpMessage = "TS"; - test1.OptinKeywords = "TS"; - test1.OptoutKeywords = "TS"; - test1.HelpKeywords = "TS"; - test1.OptinMessage = "TS"; - test1.OptoutMessage = "TS"; - test1.ReferenceId = "TS"; - test1.Mock = true; - test1.NextRenewalOrExpirationDate = DateTime.Parse("2000-01-01"); - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SMSTenDLCCampaign test1 = new SMSTenDLCCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), false, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", new List(), "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, DateTime.Parse("2000-01-01")); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.CspId = "TS"; - test1.ResellerId = "TS"; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.AutoRenewal = true; - test1.BilledDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.BrandId = "TS"; - test1.Usecase = "TS"; - List testList = new List(); - test1.SubUsecases = testList; - test1.Description = "TS"; - test1.EmbeddedLink = true; - test1.EmbeddedPhone = true; - test1.AffiliateMarketing = true; - test1.NumberPool = true; - test1.AgeGated = true; - test1.DirectLending = true; - test1.SubscriberOptin = true; - test1.SubscriberOptout = true; - test1.SubscriberHelp = true; - test1.Sample1 = "TS"; - test1.Sample2 = "TS"; - test1.Sample3 = "TS"; - test1.Sample4 = "TS"; - test1.Sample5 = "TS"; - test1.MessageFlow = "TS"; - test1.HelpMessage = "TS"; - test1.OptinKeywords = "TS"; - test1.OptoutKeywords = "TS"; - test1.HelpKeywords = "TS"; - test1.OptinMessage = "TS"; - test1.OptoutMessage = "TS"; - test1.ReferenceId = "TS"; - test1.Mock = true; - test1.NextRenewalOrExpirationDate = DateTime.Parse("2000-01-01"); - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SMSTenDLCCampaign test1 = new SMSTenDLCCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), false, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", new List(), "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, DateTime.Parse("2000-01-01")); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.CspId = "TS"; - test1.ResellerId = "TS"; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.AutoRenewal = true; - test1.BilledDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.BrandId = "TS"; - test1.Usecase = "TS"; - List testList = new List(); - test1.SubUsecases = testList; - test1.Description = "TS"; - test1.EmbeddedLink = true; - test1.EmbeddedPhone = true; - test1.AffiliateMarketing = true; - test1.NumberPool = true; - test1.AgeGated = true; - test1.DirectLending = true; - test1.SubscriberOptin = true; - test1.SubscriberOptout = true; - test1.SubscriberHelp = true; - test1.Sample1 = "TS"; - test1.Sample2 = "TS"; - test1.Sample3 = "TS"; - test1.Sample4 = "TS"; - test1.Sample5 = "TS"; - test1.MessageFlow = "TS"; - test1.HelpMessage = "TS"; - test1.OptinKeywords = "TS"; - test1.OptoutKeywords = "TS"; - test1.HelpKeywords = "TS"; - test1.OptinMessage = "TS"; - test1.OptoutMessage = "TS"; - test1.ReferenceId = "TS"; - test1.Mock = true; - test1.NextRenewalOrExpirationDate = DateTime.Parse("2000-01-01"); - - SMSTenDLCCampaign test2 = new SMSTenDLCCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), false, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", new List(), "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, DateTime.Parse("2000-01-01")); - test2.AccountId = "TS"; - test2.CampaignId = "TS"; - test2.CspId = "TS"; - test2.ResellerId = "TS"; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.AutoRenewal = true; - test2.BilledDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.BrandId = "TS"; - test2.Usecase = "TS"; - List testList2 = new List(); - test2.SubUsecases = testList2; - test2.Description = "TS"; - test2.EmbeddedLink = true; - test2.EmbeddedPhone = true; - test2.AffiliateMarketing = true; - test2.NumberPool = true; - test2.AgeGated = true; - test2.DirectLending = true; - test2.SubscriberOptin = true; - test2.SubscriberOptout = true; - test2.SubscriberHelp = true; - test2.Sample1 = "TS"; - test2.Sample2 = "TS"; - test2.Sample3 = "TS"; - test2.Sample4 = "TS"; - test2.Sample5 = "TS"; - test2.MessageFlow = "TS"; - test2.HelpMessage = "TS"; - test2.OptinKeywords = "TS"; - test2.OptoutKeywords = "TS"; - test2.HelpKeywords = "TS"; - test2.OptinMessage = "TS"; - test2.OptoutMessage = "TS"; - test2.ReferenceId = "TS"; - test2.Mock = true; - test2.NextRenewalOrExpirationDate = DateTime.Parse("2000-01-01"); - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SMSTenDLCCampaign test1 = new SMSTenDLCCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), false, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", new List(), "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, DateTime.Parse("2000-01-01")); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.CspId = "TS"; - test1.ResellerId = "TS"; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.AutoRenewal = true; - test1.BilledDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.BrandId = "TS"; - test1.Usecase = "TS"; - List testList = new List(); - test1.SubUsecases = testList; - test1.Description = "TS"; - test1.EmbeddedLink = true; - test1.EmbeddedPhone = true; - test1.AffiliateMarketing = true; - test1.NumberPool = true; - test1.AgeGated = true; - test1.DirectLending = true; - test1.SubscriberOptin = true; - test1.SubscriberOptout = true; - test1.SubscriberHelp = true; - test1.Sample1 = "TS"; - test1.Sample2 = "TS"; - test1.Sample3 = "TS"; - test1.Sample4 = "TS"; - test1.Sample5 = "TS"; - test1.MessageFlow = "TS"; - test1.HelpMessage = "TS"; - test1.OptinKeywords = "TS"; - test1.OptoutKeywords = "TS"; - test1.HelpKeywords = "TS"; - test1.OptinMessage = "TS"; - test1.OptoutMessage = "TS"; - test1.ReferenceId = "TS"; - test1.Mock = true; - test1.NextRenewalOrExpirationDate = DateTime.Parse("2000-01-01"); - - SMSTenDLCCampaign test2 = new SMSTenDLCCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), false, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", new List(), "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, DateTime.Parse("2000-01-01")); - test2.AccountId = "TS"; - test2.CampaignId = "TS"; - test2.CspId = "TS"; - test2.ResellerId = "TS"; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.AutoRenewal = true; - test2.BilledDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.BrandId = "TS"; - test2.Usecase = "TS"; - List testList2 = new List(); - test2.SubUsecases = testList2; - test2.Description = "TS"; - test2.EmbeddedLink = true; - test2.EmbeddedPhone = true; - test2.AffiliateMarketing = true; - test2.NumberPool = true; - test2.AgeGated = true; - test2.DirectLending = true; - test2.SubscriberOptin = true; - test2.SubscriberOptout = true; - test2.SubscriberHelp = true; - test2.Sample1 = "TS"; - test2.Sample2 = "TS"; - test2.Sample3 = "TS"; - test2.Sample4 = "TS"; - test2.Sample5 = "TS"; - test2.MessageFlow = "TS"; - test2.HelpMessage = "TS"; - test2.OptinKeywords = "TS"; - test2.OptoutKeywords = "TS"; - test2.HelpKeywords = "TS"; - test2.OptinMessage = "TS"; - test2.OptoutMessage = "TS"; - test2.ReferenceId = "TS"; - test2.Mock = true; - test2.NextRenewalOrExpirationDate = DateTime.Parse("2000-01-01"); - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SMSTenDLCCampaign test1 = new SMSTenDLCCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), false, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", new List(), "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, DateTime.Parse("2000-01-01")); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.CspId = "TS"; - test1.ResellerId = "TS"; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.AutoRenewal = true; - test1.BilledDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.BrandId = "TS"; - test1.Usecase = "TS"; - List testList = new List(); - test1.SubUsecases = testList; - test1.Description = "TS"; - test1.EmbeddedLink = true; - test1.EmbeddedPhone = true; - test1.AffiliateMarketing = true; - test1.NumberPool = true; - test1.AgeGated = true; - test1.DirectLending = true; - test1.SubscriberOptin = true; - test1.SubscriberOptout = true; - test1.SubscriberHelp = true; - test1.Sample1 = "TS"; - test1.Sample2 = "TS"; - test1.Sample3 = "TS"; - test1.Sample4 = "TS"; - test1.Sample5 = "TS"; - test1.MessageFlow = "TS"; - test1.HelpMessage = "TS"; - test1.OptinKeywords = "TS"; - test1.OptoutKeywords = "TS"; - test1.HelpKeywords = "TS"; - test1.OptinMessage = "TS"; - test1.OptoutMessage = "TS"; - test1.ReferenceId = "TS"; - test1.Mock = true; - test1.NextRenewalOrExpirationDate = DateTime.Parse("2000-01-01"); - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SMSTenDLCCampaign test2 = new SMSTenDLCCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTenDLCCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), false, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", new List(), "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", false, DateTime.Parse("2000-01-01")); - test2.AccountId = "TS"; - test2.CampaignId = "TS"; - test2.CspId = "TS"; - test2.ResellerId = "TS"; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.AutoRenewal = true; - test2.BilledDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.BrandId = "TS"; - test2.Usecase = "TS"; - List testList2 = new List(); - test2.SubUsecases = testList2; - test2.Description = "TS"; - test2.EmbeddedLink = true; - test2.EmbeddedPhone = true; - test2.AffiliateMarketing = true; - test2.NumberPool = true; - test2.AgeGated = true; - test2.DirectLending = true; - test2.SubscriberOptin = true; - test2.SubscriberOptout = true; - test2.SubscriberHelp = true; - test2.Sample1 = "TS"; - test2.Sample2 = "TS"; - test2.Sample3 = "TS"; - test2.Sample4 = "TS"; - test2.Sample5 = "TS"; - test2.MessageFlow = "TS"; - test2.HelpMessage = "TS"; - test2.OptinKeywords = "TS"; - test2.OptoutKeywords = "TS"; - test2.HelpKeywords = "TS"; - test2.OptinMessage = "TS"; - test2.OptoutMessage = "TS"; - test2.ReferenceId = "TS"; - test2.Mock = true; - test2.NextRenewalOrExpirationDate = DateTime.Parse("2000-01-01"); - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + instance.NextRenewalOrExpirationDate = DateOnly.FromDateTime( + DateTime.Parse("2000-01-01") + ); + Assert.Equal( + DateOnly.FromDateTime(DateTime.Parse("2000-01-01")), + instance.NextRenewalOrExpirationDate + ); } } } diff --git a/src/freeclimb.Test/Model/SMSTenDLCCampaignsListResultAllOfTests.cs b/src/freeclimb.Test/Model/SMSTenDLCCampaignsListResultAllOfTests.cs deleted file mode 100644 index 1119f66b..00000000 --- a/src/freeclimb.Test/Model/SMSTenDLCCampaignsListResultAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing SMSTenDLCCampaignsListResultAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SMSTenDLCCampaignsListResultAllOfTests - { - private SMSTenDLCCampaignsListResultAllOf instance; - - public SMSTenDLCCampaignsListResultAllOfTests() - { - - instance = new SMSTenDLCCampaignsListResultAllOf(new List()); - - } - - /// - /// Test an instance of SMSTenDLCCampaignsListResultAllOf - /// - [Fact] - public void SMSTenDLCCampaignsListResultAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Campaigns' - /// - [Fact] - public void CampaignsTest() - { - - List testList = new List(); - instance.Campaigns = testList; - Assert.Equal(testList, instance.Campaigns); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SMSTenDLCCampaignsListResultAllOf test1 = new SMSTenDLCCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.Campaigns = testList; - - SMSTenDLCCampaignsListResultAllOf test2 = new SMSTenDLCCampaignsListResultAllOf(new List()); - List testList2 = new List(); - test2.Campaigns = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SMSTenDLCCampaignsListResultAllOf test1 = new SMSTenDLCCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.Campaigns = testList; - - SMSTenDLCCampaignsListResultAllOf test2 = new SMSTenDLCCampaignsListResultAllOf(new List()); - List testList2 = null; - test2.Campaigns = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SMSTenDLCCampaignsListResultAllOf test1 = new SMSTenDLCCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.Campaigns = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SMSTenDLCCampaignsListResultAllOf test1 = new SMSTenDLCCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.Campaigns = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SMSTenDLCCampaignsListResultAllOf test1 = new SMSTenDLCCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.Campaigns = testList; - - SMSTenDLCCampaignsListResultAllOf test2 = new SMSTenDLCCampaignsListResultAllOf(new List()); - List testList2 = new List(); - test2.Campaigns = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SMSTenDLCCampaignsListResultAllOf test1 = new SMSTenDLCCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.Campaigns = testList; - - SMSTenDLCCampaignsListResultAllOf test2 = new SMSTenDLCCampaignsListResultAllOf(new List()); - List testList2 = new List(); - test2.Campaigns = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SMSTenDLCCampaignsListResultAllOf test1 = new SMSTenDLCCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.Campaigns = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SMSTenDLCCampaignsListResultAllOf test2 = new SMSTenDLCCampaignsListResultAllOf(new List()); - List testList2 = new List(); - test2.Campaigns = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/SMSTenDLCCampaignsListResultTests.cs b/src/freeclimb.Test/Model/SMSTenDLCCampaignsListResultTests.cs index 30f01d25..166be046 100644 --- a/src/freeclimb.Test/Model/SMSTenDLCCampaignsListResultTests.cs +++ b/src/freeclimb.Test/Model/SMSTenDLCCampaignsListResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,29 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SMSTenDLCCampaignsListResultTests + + public class SMSTenDLCCampaignsListResultTests : IDisposable { private SMSTenDLCCampaignsListResult instance; public SMSTenDLCCampaignsListResultTests() { - - instance = new SMSTenDLCCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new SMSTenDLCCampaignsListResult( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + campaigns: (List) + TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +65,66 @@ public void SMSTenDLCCampaignsListResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +133,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'Campaigns' /// [Fact] public void CampaignsTest() { - List testList = new List(); instance.Campaigns = testList; - Assert.Equal(testList, instance.Campaigns); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SMSTenDLCCampaignsListResult test1 = new SMSTenDLCCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Campaigns = testList; - - SMSTenDLCCampaignsListResult test2 = new SMSTenDLCCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Campaigns = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SMSTenDLCCampaignsListResult test1 = new SMSTenDLCCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Campaigns = testList; - - SMSTenDLCCampaignsListResult test2 = new SMSTenDLCCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.Campaigns = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SMSTenDLCCampaignsListResult test1 = new SMSTenDLCCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Campaigns = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SMSTenDLCCampaignsListResult test1 = new SMSTenDLCCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Campaigns = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SMSTenDLCCampaignsListResult test1 = new SMSTenDLCCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Campaigns = testList; - - SMSTenDLCCampaignsListResult test2 = new SMSTenDLCCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Campaigns = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SMSTenDLCCampaignsListResult test1 = new SMSTenDLCCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Campaigns = testList; - - SMSTenDLCCampaignsListResult test2 = new SMSTenDLCCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Campaigns = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SMSTenDLCCampaignsListResult test1 = new SMSTenDLCCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Campaigns = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SMSTenDLCCampaignsListResult test2 = new SMSTenDLCCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Campaigns = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.Campaigns, testList); } } } diff --git a/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignBrandTests.cs b/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignBrandTests.cs index e805441a..13b76195 100644 --- a/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignBrandTests.cs +++ b/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignBrandTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,31 +31,31 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SMSTenDLCPartnerCampaignBrandTests + + public class SMSTenDLCPartnerCampaignBrandTests : IDisposable { private SMSTenDLCPartnerCampaignBrand instance; public SMSTenDLCPartnerCampaignBrandTests() { - string jsonData = @" - { - ""accountId"":""TEST_STRING"", - ""entityType"":""PRIVATE_PROFIT"", - ""cspId"": ""TEST_STRING"", - ""brandId"": ""TEST_STRING"", - ""universalEin"": ""TEST_STRING"", - ""brandRelationship"":""BASIC_ACCOUNT"", - ""identityStatus"":""SELF_DECLARED"", - ""displayName"":""TEST_STRING"", - ""phone"":""TEST_STRING"", - ""country"":""TEST_STRING"", - ""email"":""TEST_STRING"", - ""vertical"":""TEST_STRING"", - ""mock"":""false"", - } - "; - instance = JsonConvert.DeserializeObject(jsonData); - + instance = new SMSTenDLCPartnerCampaignBrand( + accountId: (string)TestHelpers.getTestValue(typeof(string)), + firstName: (string)TestHelpers.getTestValue(typeof(string)), + lastName: (string)TestHelpers.getTestValue(typeof(string)), + displayName: (string)TestHelpers.getTestValue(typeof(string)), + companyName: (string)TestHelpers.getTestValue(typeof(string)), + phone: (string)TestHelpers.getTestValue(typeof(string)), + email: (string)TestHelpers.getTestValue(typeof(string)), + website: (string)TestHelpers.getTestValue(typeof(string)), + optionalAttributes: (Dictionary) + TestHelpers.getTestValue(typeof(Dictionary)), + evpVettingScore: (int)TestHelpers.getTestValue(typeof(int)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -72,7 +67,6 @@ public void SMSTenDLCPartnerCampaignBrandInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'AccountId' /// @@ -81,18 +75,8 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } - /// - /// Test the property 'BrandId' - /// - [Fact] - public void BrandIdTest() - { - Assert.Equal("TEST_STRING", instance.BrandId); - - } /// /// Test the property 'FirstName' /// @@ -101,8 +85,8 @@ public void FirstNameTest() { instance.FirstName = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.FirstName); - } + /// /// Test the property 'LastName' /// @@ -111,8 +95,8 @@ public void LastNameTest() { instance.LastName = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.LastName); - } + /// /// Test the property 'DisplayName' /// @@ -121,8 +105,8 @@ public void DisplayNameTest() { instance.DisplayName = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DisplayName); - } + /// /// Test the property 'CompanyName' /// @@ -131,8 +115,8 @@ public void CompanyNameTest() { instance.CompanyName = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CompanyName); - } + /// /// Test the property 'Phone' /// @@ -141,8 +125,8 @@ public void PhoneTest() { instance.Phone = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Phone); - } + /// /// Test the property 'Email' /// @@ -151,8 +135,8 @@ public void EmailTest() { instance.Email = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Email); - } + /// /// Test the property 'Website' /// @@ -161,271 +145,27 @@ public void WebsiteTest() { instance.Website = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Website); - } + /// /// Test the property 'OptionalAttributes' /// [Fact] public void OptionalAttributesTest() { - Dictionary testDictionary = new Dictionary(); instance.OptionalAttributes = testDictionary; - Assert.Equal(testDictionary, instance.OptionalAttributes); + Assert.Equal(testDictionary, instance.OptionalAttributes); } + /// /// Test the property 'EvpVettingScore' /// [Fact] public void EvpVettingScoreTest() { - instance.EvpVettingScore = 1; - Assert.Equal(1, (int) instance.EvpVettingScore); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SMSTenDLCPartnerCampaignBrand test1 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test1.AccountId = "TS"; - - test1.FirstName = "TS"; - test1.LastName = "TS"; - test1.DisplayName = "TS"; - test1.CompanyName = "TS"; - test1.Phone = "TS"; - test1.Email = "TS"; - test1.Website = "TS"; - Dictionary testDictionary = new Dictionary(); - test1.OptionalAttributes = testDictionary; - test1.EvpVettingScore = 1; - - SMSTenDLCPartnerCampaignBrand test2 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test2.AccountId = "TS"; - - test2.FirstName = "TS"; - test2.LastName = "TS"; - test2.DisplayName = "TS"; - test2.CompanyName = "TS"; - test2.Phone = "TS"; - test2.Email = "TS"; - test2.Website = "TS"; - Dictionary testDictionary2 = new Dictionary(); - test2.OptionalAttributes = testDictionary2; - test2.EvpVettingScore = 1; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SMSTenDLCPartnerCampaignBrand test1 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test1.AccountId = "TS"; - - test1.FirstName = "TS"; - test1.LastName = "TS"; - test1.DisplayName = "TS"; - test1.CompanyName = "TS"; - test1.Phone = "TS"; - test1.Email = "TS"; - test1.Website = "TS"; - Dictionary testDictionary = new Dictionary(); - test1.OptionalAttributes = testDictionary; - test1.EvpVettingScore = 1; - - SMSTenDLCPartnerCampaignBrand test2 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test2.AccountId = "ts"; - - test2.FirstName = "ts"; - test2.LastName = "ts"; - test2.DisplayName = "ts"; - test2.CompanyName = "ts"; - test2.Phone = "ts"; - test2.Email = "ts"; - test2.Website = "ts"; - Dictionary testDictionary2 = new Dictionary(); - test2.OptionalAttributes = testDictionary2; - test2.EvpVettingScore = 2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SMSTenDLCPartnerCampaignBrand test1 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test1.AccountId = "TS"; - - test1.FirstName = "TS"; - test1.LastName = "TS"; - test1.DisplayName = "TS"; - test1.CompanyName = "TS"; - test1.Phone = "TS"; - test1.Email = "TS"; - test1.Website = "TS"; - Dictionary testDictionary = new Dictionary(); - test1.OptionalAttributes = testDictionary; - test1.EvpVettingScore = 1; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SMSTenDLCPartnerCampaignBrand test1 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test1.AccountId = "TS"; - - test1.FirstName = "TS"; - test1.LastName = "TS"; - test1.DisplayName = "TS"; - test1.CompanyName = "TS"; - test1.Phone = "TS"; - test1.Email = "TS"; - test1.Website = "TS"; - Dictionary testDictionary = new Dictionary(); - test1.OptionalAttributes = testDictionary; - test1.EvpVettingScore = 1; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SMSTenDLCPartnerCampaignBrand test1 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test1.AccountId = "TS"; - - test1.FirstName = "TS"; - test1.LastName = "TS"; - test1.DisplayName = "TS"; - test1.CompanyName = "TS"; - test1.Phone = "TS"; - test1.Email = "TS"; - test1.Website = "TS"; - Dictionary testDictionary = new Dictionary(); - test1.OptionalAttributes = testDictionary; - test1.EvpVettingScore = 1; - - SMSTenDLCPartnerCampaignBrand test2 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test2.AccountId = "TS"; - - test2.FirstName = "TS"; - test2.LastName = "TS"; - test2.DisplayName = "TS"; - test2.CompanyName = "TS"; - test2.Phone = "TS"; - test2.Email = "TS"; - test2.Website = "TS"; - Dictionary testDictionary2 = new Dictionary(); - test2.OptionalAttributes = testDictionary2; - test2.EvpVettingScore = 1; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SMSTenDLCPartnerCampaignBrand test1 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test1.AccountId = "TS"; - - test1.FirstName = "TS"; - test1.LastName = "TS"; - test1.DisplayName = "TS"; - test1.CompanyName = "TS"; - test1.Phone = "TS"; - test1.Email = "TS"; - test1.Website = "TS"; - Dictionary testDictionary = new Dictionary(); - test1.OptionalAttributes = testDictionary; - test1.EvpVettingScore = 1; - - SMSTenDLCPartnerCampaignBrand test2 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test2.AccountId = "TS"; - - test2.FirstName = "TS"; - test2.LastName = "TS"; - test2.DisplayName = "TS"; - test2.CompanyName = "TS"; - test2.Phone = "TS"; - test2.Email = "TS"; - test2.Website = "TS"; - Dictionary testDictionary2 = new Dictionary(); - test2.OptionalAttributes = testDictionary2; - test2.EvpVettingScore = 1; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SMSTenDLCPartnerCampaignBrand test1 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test1.AccountId = "TS"; - - test1.FirstName = "TS"; - test1.LastName = "TS"; - test1.DisplayName = "TS"; - test1.CompanyName = "TS"; - test1.Phone = "TS"; - test1.Email = "TS"; - test1.Website = "TS"; - Dictionary testDictionary = new Dictionary(); - test1.OptionalAttributes = testDictionary; - test1.EvpVettingScore = 1; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SMSTenDLCPartnerCampaignBrand test2 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test2.AccountId = "TS"; - - test2.FirstName = "TS"; - test2.LastName = "TS"; - test2.DisplayName = "TS"; - test2.CompanyName = "TS"; - test2.Phone = "TS"; - test2.Email = "TS"; - test2.Website = "TS"; - Dictionary testDictionary2 = new Dictionary(); - test2.OptionalAttributes = testDictionary2; - test2.EvpVettingScore = 1; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(1, (int)instance.EvpVettingScore); } } } diff --git a/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignTests.cs b/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignTests.cs index 4fb03929..13cb01c5 100644 --- a/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignTests.cs +++ b/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,51 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SMSTenDLCPartnerCampaignTests + + public class SMSTenDLCPartnerCampaignTests : IDisposable { private SMSTenDLCPartnerCampaign instance; public SMSTenDLCPartnerCampaignTests() { - - instance = new SMSTenDLCPartnerCampaign("TEST_STRING", "TEST_STRING", SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1)); - + instance = new SMSTenDLCPartnerCampaign( + accountId: (string)TestHelpers.getTestValue(typeof(string)), + campaignId: (string)TestHelpers.getTestValue(typeof(string)), + status: (SMSTenDLCPartnerCampaignStatus) + TestHelpers.getTestValue(typeof(SMSTenDLCPartnerCampaignStatus)), + createDate: (DateTime)TestHelpers.getTestValue(typeof(DateTime)), + brandId: (string)TestHelpers.getTestValue(typeof(string)), + usecase: (string)TestHelpers.getTestValue(typeof(string)), + description: (string)TestHelpers.getTestValue(typeof(string)), + embeddedLink: (bool)TestHelpers.getTestValue(typeof(bool)), + embeddedPhone: (bool)TestHelpers.getTestValue(typeof(bool)), + affiliateMarketing: (bool)TestHelpers.getTestValue(typeof(bool)), + numberPool: (bool)TestHelpers.getTestValue(typeof(bool)), + ageGated: (bool)TestHelpers.getTestValue(typeof(bool)), + directLending: (bool)TestHelpers.getTestValue(typeof(bool)), + subscriberOptin: (bool)TestHelpers.getTestValue(typeof(bool)), + subscriberOptout: (bool)TestHelpers.getTestValue(typeof(bool)), + subscriberHelp: (bool)TestHelpers.getTestValue(typeof(bool)), + sample1: (string)TestHelpers.getTestValue(typeof(string)), + sample2: (string)TestHelpers.getTestValue(typeof(string)), + sample3: (string)TestHelpers.getTestValue(typeof(string)), + sample4: (string)TestHelpers.getTestValue(typeof(string)), + sample5: (string)TestHelpers.getTestValue(typeof(string)), + messageFlow: (string)TestHelpers.getTestValue(typeof(string)), + helpMessage: (string)TestHelpers.getTestValue(typeof(string)), + optinKeywords: (string)TestHelpers.getTestValue(typeof(string)), + optoutKeywords: (string)TestHelpers.getTestValue(typeof(string)), + helpKeywords: (string)TestHelpers.getTestValue(typeof(string)), + optinMessage: (string)TestHelpers.getTestValue(typeof(string)), + optoutMessage: (string)TestHelpers.getTestValue(typeof(string)), + brand: (SMSTenDLCPartnerCampaignBrand) + TestHelpers.getTestValue(typeof(SMSTenDLCPartnerCampaignBrand)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +87,6 @@ public void SMSTenDLCPartnerCampaignInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'AccountId' /// @@ -65,8 +95,8 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } + /// /// Test the property 'CampaignId' /// @@ -75,22 +105,20 @@ public void CampaignIdTest() { instance.CampaignId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CampaignId); - } + /// /// Test the property 'Status' /// [Fact] public void StatusTest() { - - instance.Status = SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE; - Assert.Equal(instance.Status,SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE); - - instance.Status = SMSTenDLCPartnerCampaign.StatusEnum.EXPIRED; - Assert.Equal(instance.Status,SMSTenDLCPartnerCampaign.StatusEnum.EXPIRED); - + instance.Status = SMSTenDLCPartnerCampaignStatus.ACTIVE; + Assert.Equal(SMSTenDLCPartnerCampaignStatus.ACTIVE, instance.Status); + instance.Status = SMSTenDLCPartnerCampaignStatus.EXPIRED; + Assert.Equal(SMSTenDLCPartnerCampaignStatus.EXPIRED, instance.Status); } + /// /// Test the property 'CreateDate' /// @@ -99,8 +127,8 @@ public void CreateDateTest() { instance.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); Assert.Equal(DateTime.Parse("2022-07-05T15:17:05+00:00"), instance.CreateDate); - } + /// /// Test the property 'BrandId' /// @@ -109,8 +137,8 @@ public void BrandIdTest() { instance.BrandId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.BrandId); - } + /// /// Test the property 'Usecase' /// @@ -119,8 +147,8 @@ public void UsecaseTest() { instance.Usecase = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Usecase); - } + /// /// Test the property 'Description' /// @@ -129,8 +157,8 @@ public void DescriptionTest() { instance.Description = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Description); - } + /// /// Test the property 'EmbeddedLink' /// @@ -138,9 +166,9 @@ public void DescriptionTest() public void EmbeddedLinkTest() { instance.EmbeddedLink = false; - Assert.Equal(false, instance.EmbeddedLink); - + Assert.False(instance.EmbeddedLink); } + /// /// Test the property 'EmbeddedPhone' /// @@ -148,9 +176,9 @@ public void EmbeddedLinkTest() public void EmbeddedPhoneTest() { instance.EmbeddedPhone = false; - Assert.Equal(false, instance.EmbeddedPhone); - + Assert.False(instance.EmbeddedPhone); } + /// /// Test the property 'AffiliateMarketing' /// @@ -158,9 +186,9 @@ public void EmbeddedPhoneTest() public void AffiliateMarketingTest() { instance.AffiliateMarketing = false; - Assert.Equal(false, instance.AffiliateMarketing); - + Assert.False(instance.AffiliateMarketing); } + /// /// Test the property 'NumberPool' /// @@ -168,9 +196,9 @@ public void AffiliateMarketingTest() public void NumberPoolTest() { instance.NumberPool = false; - Assert.Equal(false, instance.NumberPool); - + Assert.False(instance.NumberPool); } + /// /// Test the property 'AgeGated' /// @@ -178,9 +206,9 @@ public void NumberPoolTest() public void AgeGatedTest() { instance.AgeGated = false; - Assert.Equal(false, instance.AgeGated); - + Assert.False(instance.AgeGated); } + /// /// Test the property 'DirectLending' /// @@ -188,9 +216,9 @@ public void AgeGatedTest() public void DirectLendingTest() { instance.DirectLending = false; - Assert.Equal(false, instance.DirectLending); - + Assert.False(instance.DirectLending); } + /// /// Test the property 'SubscriberOptin' /// @@ -198,9 +226,9 @@ public void DirectLendingTest() public void SubscriberOptinTest() { instance.SubscriberOptin = false; - Assert.Equal(false, instance.SubscriberOptin); - + Assert.False(instance.SubscriberOptin); } + /// /// Test the property 'SubscriberOptout' /// @@ -208,9 +236,9 @@ public void SubscriberOptinTest() public void SubscriberOptoutTest() { instance.SubscriberOptout = false; - Assert.Equal(false, instance.SubscriberOptout); - + Assert.False(instance.SubscriberOptout); } + /// /// Test the property 'SubscriberHelp' /// @@ -218,9 +246,9 @@ public void SubscriberOptoutTest() public void SubscriberHelpTest() { instance.SubscriberHelp = false; - Assert.Equal(false, instance.SubscriberHelp); - + Assert.False(instance.SubscriberHelp); } + /// /// Test the property 'Sample1' /// @@ -229,8 +257,8 @@ public void Sample1Test() { instance.Sample1 = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Sample1); - } + /// /// Test the property 'Sample2' /// @@ -239,8 +267,8 @@ public void Sample2Test() { instance.Sample2 = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Sample2); - } + /// /// Test the property 'Sample3' /// @@ -249,8 +277,8 @@ public void Sample3Test() { instance.Sample3 = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Sample3); - } + /// /// Test the property 'Sample4' /// @@ -259,8 +287,8 @@ public void Sample4Test() { instance.Sample4 = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Sample4); - } + /// /// Test the property 'Sample5' /// @@ -269,8 +297,8 @@ public void Sample5Test() { instance.Sample5 = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Sample5); - } + /// /// Test the property 'MessageFlow' /// @@ -279,8 +307,8 @@ public void MessageFlowTest() { instance.MessageFlow = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.MessageFlow); - } + /// /// Test the property 'HelpMessage' /// @@ -289,8 +317,8 @@ public void HelpMessageTest() { instance.HelpMessage = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.HelpMessage); - } + /// /// Test the property 'OptinKeywords' /// @@ -299,8 +327,8 @@ public void OptinKeywordsTest() { instance.OptinKeywords = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.OptinKeywords); - } + /// /// Test the property 'OptoutKeywords' /// @@ -309,8 +337,8 @@ public void OptoutKeywordsTest() { instance.OptoutKeywords = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.OptoutKeywords); - } + /// /// Test the property 'HelpKeywords' /// @@ -319,8 +347,8 @@ public void HelpKeywordsTest() { instance.HelpKeywords = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.HelpKeywords); - } + /// /// Test the property 'OptinMessage' /// @@ -329,8 +357,8 @@ public void OptinMessageTest() { instance.OptinMessage = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.OptinMessage); - } + /// /// Test the property 'OptoutMessage' /// @@ -339,465 +367,18 @@ public void OptoutMessageTest() { instance.OptoutMessage = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.OptoutMessage); - } + /// /// Test the property 'Brand' /// [Fact] public void BrandTest() { - SMSTenDLCPartnerCampaignBrand testObject = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); + SMSTenDLCPartnerCampaignBrand testObject = (SMSTenDLCPartnerCampaignBrand) + TestHelpers.getTestValue(typeof(SMSTenDLCPartnerCampaignBrand)); instance.Brand = testObject; Assert.Equal(testObject, instance.Brand); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SMSTenDLCPartnerCampaign test1 = new SMSTenDLCPartnerCampaign("TEST_STRING", "TEST_STRING", SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1)); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.BrandId = "TS"; - test1.Usecase = "TS"; - test1.Description = "TS"; - test1.EmbeddedLink = true; - test1.EmbeddedPhone = true; - test1.AffiliateMarketing = true; - test1.NumberPool = true; - test1.AgeGated = true; - test1.DirectLending = true; - test1.SubscriberOptin = true; - test1.SubscriberOptout = true; - test1.SubscriberHelp = true; - test1.Sample1 = "TS"; - test1.Sample2 = "TS"; - test1.Sample3 = "TS"; - test1.Sample4 = "TS"; - test1.Sample5 = "TS"; - test1.MessageFlow = "TS"; - test1.HelpMessage = "TS"; - test1.OptinKeywords = "TS"; - test1.OptoutKeywords = "TS"; - test1.HelpKeywords = "TS"; - test1.OptinMessage = "TS"; - test1.OptoutMessage = "TS"; - SMSTenDLCPartnerCampaignBrand BrandtestObject = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test1.Brand = BrandtestObject; - - SMSTenDLCPartnerCampaign test2 = new SMSTenDLCPartnerCampaign("TEST_STRING", "TEST_STRING", SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1)); - test2.AccountId = "TS"; - test2.CampaignId = "TS"; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.BrandId = "TS"; - test2.Usecase = "TS"; - test2.Description = "TS"; - test2.EmbeddedLink = true; - test2.EmbeddedPhone = true; - test2.AffiliateMarketing = true; - test2.NumberPool = true; - test2.AgeGated = true; - test2.DirectLending = true; - test2.SubscriberOptin = true; - test2.SubscriberOptout = true; - test2.SubscriberHelp = true; - test2.Sample1 = "TS"; - test2.Sample2 = "TS"; - test2.Sample3 = "TS"; - test2.Sample4 = "TS"; - test2.Sample5 = "TS"; - test2.MessageFlow = "TS"; - test2.HelpMessage = "TS"; - test2.OptinKeywords = "TS"; - test2.OptoutKeywords = "TS"; - test2.HelpKeywords = "TS"; - test2.OptinMessage = "TS"; - test2.OptoutMessage = "TS"; - SMSTenDLCPartnerCampaignBrand BrandtestObject2 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test2.Brand = BrandtestObject2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SMSTenDLCPartnerCampaign test1 = new SMSTenDLCPartnerCampaign("TEST_STRING", "TEST_STRING", SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1)); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.BrandId = "TS"; - test1.Usecase = "TS"; - test1.Description = "TS"; - test1.EmbeddedLink = true; - test1.EmbeddedPhone = true; - test1.AffiliateMarketing = true; - test1.NumberPool = true; - test1.AgeGated = true; - test1.DirectLending = true; - test1.SubscriberOptin = true; - test1.SubscriberOptout = true; - test1.SubscriberHelp = true; - test1.Sample1 = "TS"; - test1.Sample2 = "TS"; - test1.Sample3 = "TS"; - test1.Sample4 = "TS"; - test1.Sample5 = "TS"; - test1.MessageFlow = "TS"; - test1.HelpMessage = "TS"; - test1.OptinKeywords = "TS"; - test1.OptoutKeywords = "TS"; - test1.HelpKeywords = "TS"; - test1.OptinMessage = "TS"; - test1.OptoutMessage = "TS"; - SMSTenDLCPartnerCampaignBrand BrandtestObject = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test1.Brand = BrandtestObject; - - SMSTenDLCPartnerCampaign test2 = new SMSTenDLCPartnerCampaign("TEST_STRING", "TEST_STRING", SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1)); - test2.AccountId = "ts"; - test2.CampaignId = "ts"; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.BrandId = "ts"; - test2.Usecase = "ts"; - test2.Description = "ts"; - test2.EmbeddedLink = false; - test2.EmbeddedPhone = false; - test2.AffiliateMarketing = false; - test2.NumberPool = false; - test2.AgeGated = false; - test2.DirectLending = false; - test2.SubscriberOptin = false; - test2.SubscriberOptout = false; - test2.SubscriberHelp = false; - test2.Sample1 = "ts"; - test2.Sample2 = "ts"; - test2.Sample3 = "ts"; - test2.Sample4 = "ts"; - test2.Sample5 = "ts"; - test2.MessageFlow = "ts"; - test2.HelpMessage = "ts"; - test2.OptinKeywords = "ts"; - test2.OptoutKeywords = "ts"; - test2.HelpKeywords = "ts"; - test2.OptinMessage = "ts"; - test2.OptoutMessage = "ts"; - SMSTenDLCPartnerCampaignBrand BrandtestObject2 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test2.Brand = BrandtestObject2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SMSTenDLCPartnerCampaign test1 = new SMSTenDLCPartnerCampaign("TEST_STRING", "TEST_STRING", SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1)); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.BrandId = "TS"; - test1.Usecase = "TS"; - test1.Description = "TS"; - test1.EmbeddedLink = true; - test1.EmbeddedPhone = true; - test1.AffiliateMarketing = true; - test1.NumberPool = true; - test1.AgeGated = true; - test1.DirectLending = true; - test1.SubscriberOptin = true; - test1.SubscriberOptout = true; - test1.SubscriberHelp = true; - test1.Sample1 = "TS"; - test1.Sample2 = "TS"; - test1.Sample3 = "TS"; - test1.Sample4 = "TS"; - test1.Sample5 = "TS"; - test1.MessageFlow = "TS"; - test1.HelpMessage = "TS"; - test1.OptinKeywords = "TS"; - test1.OptoutKeywords = "TS"; - test1.HelpKeywords = "TS"; - test1.OptinMessage = "TS"; - test1.OptoutMessage = "TS"; - SMSTenDLCPartnerCampaignBrand BrandtestObject = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test1.Brand = BrandtestObject; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SMSTenDLCPartnerCampaign test1 = new SMSTenDLCPartnerCampaign("TEST_STRING", "TEST_STRING", SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1)); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.BrandId = "TS"; - test1.Usecase = "TS"; - test1.Description = "TS"; - test1.EmbeddedLink = true; - test1.EmbeddedPhone = true; - test1.AffiliateMarketing = true; - test1.NumberPool = true; - test1.AgeGated = true; - test1.DirectLending = true; - test1.SubscriberOptin = true; - test1.SubscriberOptout = true; - test1.SubscriberHelp = true; - test1.Sample1 = "TS"; - test1.Sample2 = "TS"; - test1.Sample3 = "TS"; - test1.Sample4 = "TS"; - test1.Sample5 = "TS"; - test1.MessageFlow = "TS"; - test1.HelpMessage = "TS"; - test1.OptinKeywords = "TS"; - test1.OptoutKeywords = "TS"; - test1.HelpKeywords = "TS"; - test1.OptinMessage = "TS"; - test1.OptoutMessage = "TS"; - SMSTenDLCPartnerCampaignBrand BrandtestObject = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test1.Brand = BrandtestObject; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SMSTenDLCPartnerCampaign test1 = new SMSTenDLCPartnerCampaign("TEST_STRING", "TEST_STRING", SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1)); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.BrandId = "TS"; - test1.Usecase = "TS"; - test1.Description = "TS"; - test1.EmbeddedLink = true; - test1.EmbeddedPhone = true; - test1.AffiliateMarketing = true; - test1.NumberPool = true; - test1.AgeGated = true; - test1.DirectLending = true; - test1.SubscriberOptin = true; - test1.SubscriberOptout = true; - test1.SubscriberHelp = true; - test1.Sample1 = "TS"; - test1.Sample2 = "TS"; - test1.Sample3 = "TS"; - test1.Sample4 = "TS"; - test1.Sample5 = "TS"; - test1.MessageFlow = "TS"; - test1.HelpMessage = "TS"; - test1.OptinKeywords = "TS"; - test1.OptoutKeywords = "TS"; - test1.HelpKeywords = "TS"; - test1.OptinMessage = "TS"; - test1.OptoutMessage = "TS"; - SMSTenDLCPartnerCampaignBrand BrandtestObject = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test1.Brand = BrandtestObject; - - SMSTenDLCPartnerCampaign test2 = new SMSTenDLCPartnerCampaign("TEST_STRING", "TEST_STRING", SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1)); - test2.AccountId = "TS"; - test2.CampaignId = "TS"; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.BrandId = "TS"; - test2.Usecase = "TS"; - test2.Description = "TS"; - test2.EmbeddedLink = true; - test2.EmbeddedPhone = true; - test2.AffiliateMarketing = true; - test2.NumberPool = true; - test2.AgeGated = true; - test2.DirectLending = true; - test2.SubscriberOptin = true; - test2.SubscriberOptout = true; - test2.SubscriberHelp = true; - test2.Sample1 = "TS"; - test2.Sample2 = "TS"; - test2.Sample3 = "TS"; - test2.Sample4 = "TS"; - test2.Sample5 = "TS"; - test2.MessageFlow = "TS"; - test2.HelpMessage = "TS"; - test2.OptinKeywords = "TS"; - test2.OptoutKeywords = "TS"; - test2.HelpKeywords = "TS"; - test2.OptinMessage = "TS"; - test2.OptoutMessage = "TS"; - SMSTenDLCPartnerCampaignBrand BrandtestObject2 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test2.Brand = BrandtestObject2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SMSTenDLCPartnerCampaign test1 = new SMSTenDLCPartnerCampaign("TEST_STRING", "TEST_STRING", SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1)); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.BrandId = "TS"; - test1.Usecase = "TS"; - test1.Description = "TS"; - test1.EmbeddedLink = true; - test1.EmbeddedPhone = true; - test1.AffiliateMarketing = true; - test1.NumberPool = true; - test1.AgeGated = true; - test1.DirectLending = true; - test1.SubscriberOptin = true; - test1.SubscriberOptout = true; - test1.SubscriberHelp = true; - test1.Sample1 = "TS"; - test1.Sample2 = "TS"; - test1.Sample3 = "TS"; - test1.Sample4 = "TS"; - test1.Sample5 = "TS"; - test1.MessageFlow = "TS"; - test1.HelpMessage = "TS"; - test1.OptinKeywords = "TS"; - test1.OptoutKeywords = "TS"; - test1.HelpKeywords = "TS"; - test1.OptinMessage = "TS"; - test1.OptoutMessage = "TS"; - SMSTenDLCPartnerCampaignBrand BrandtestObject = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test1.Brand = BrandtestObject; - - SMSTenDLCPartnerCampaign test2 = new SMSTenDLCPartnerCampaign("TEST_STRING", "TEST_STRING", SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1)); - test2.AccountId = "TS"; - test2.CampaignId = "TS"; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.BrandId = "TS"; - test2.Usecase = "TS"; - test2.Description = "TS"; - test2.EmbeddedLink = true; - test2.EmbeddedPhone = true; - test2.AffiliateMarketing = true; - test2.NumberPool = true; - test2.AgeGated = true; - test2.DirectLending = true; - test2.SubscriberOptin = true; - test2.SubscriberOptout = true; - test2.SubscriberHelp = true; - test2.Sample1 = "TS"; - test2.Sample2 = "TS"; - test2.Sample3 = "TS"; - test2.Sample4 = "TS"; - test2.Sample5 = "TS"; - test2.MessageFlow = "TS"; - test2.HelpMessage = "TS"; - test2.OptinKeywords = "TS"; - test2.OptoutKeywords = "TS"; - test2.HelpKeywords = "TS"; - test2.OptinMessage = "TS"; - test2.OptoutMessage = "TS"; - SMSTenDLCPartnerCampaignBrand BrandtestObject2 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test2.Brand = BrandtestObject2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SMSTenDLCPartnerCampaign test1 = new SMSTenDLCPartnerCampaign("TEST_STRING", "TEST_STRING", SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1)); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test1.BrandId = "TS"; - test1.Usecase = "TS"; - test1.Description = "TS"; - test1.EmbeddedLink = true; - test1.EmbeddedPhone = true; - test1.AffiliateMarketing = true; - test1.NumberPool = true; - test1.AgeGated = true; - test1.DirectLending = true; - test1.SubscriberOptin = true; - test1.SubscriberOptout = true; - test1.SubscriberHelp = true; - test1.Sample1 = "TS"; - test1.Sample2 = "TS"; - test1.Sample3 = "TS"; - test1.Sample4 = "TS"; - test1.Sample5 = "TS"; - test1.MessageFlow = "TS"; - test1.HelpMessage = "TS"; - test1.OptinKeywords = "TS"; - test1.OptoutKeywords = "TS"; - test1.HelpKeywords = "TS"; - test1.OptinMessage = "TS"; - test1.OptoutMessage = "TS"; - SMSTenDLCPartnerCampaignBrand BrandtestObject = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test1.Brand = BrandtestObject; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SMSTenDLCPartnerCampaign test2 = new SMSTenDLCPartnerCampaign("TEST_STRING", "TEST_STRING", SMSTenDLCPartnerCampaign.StatusEnum.ACTIVE, DateTime.Parse("2022-07-05T15:17:05+00:00"), "TEST_STRING", "TEST_STRING", "TEST_STRING", false, false, false, false, false, false, false, false, false, "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1)); - test2.AccountId = "TS"; - test2.CampaignId = "TS"; - test2.CreateDate = DateTime.Parse("2022-07-05T15:17:05+00:00"); - test2.BrandId = "TS"; - test2.Usecase = "TS"; - test2.Description = "TS"; - test2.EmbeddedLink = true; - test2.EmbeddedPhone = true; - test2.AffiliateMarketing = true; - test2.NumberPool = true; - test2.AgeGated = true; - test2.DirectLending = true; - test2.SubscriberOptin = true; - test2.SubscriberOptout = true; - test2.SubscriberHelp = true; - test2.Sample1 = "TS"; - test2.Sample2 = "TS"; - test2.Sample3 = "TS"; - test2.Sample4 = "TS"; - test2.Sample5 = "TS"; - test2.MessageFlow = "TS"; - test2.HelpMessage = "TS"; - test2.OptinKeywords = "TS"; - test2.OptoutKeywords = "TS"; - test2.HelpKeywords = "TS"; - test2.OptinMessage = "TS"; - test2.OptoutMessage = "TS"; - SMSTenDLCPartnerCampaignBrand BrandtestObject2 = new SMSTenDLCPartnerCampaignBrand("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", new Dictionary(), 1); - test2.Brand = BrandtestObject2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignsListResultAllOfTests.cs b/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignsListResultAllOfTests.cs deleted file mode 100644 index 7bac0cfa..00000000 --- a/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignsListResultAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing SMSTenDLCPartnerCampaignsListResultAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SMSTenDLCPartnerCampaignsListResultAllOfTests - { - private SMSTenDLCPartnerCampaignsListResultAllOf instance; - - public SMSTenDLCPartnerCampaignsListResultAllOfTests() - { - - instance = new SMSTenDLCPartnerCampaignsListResultAllOf(new List()); - - } - - /// - /// Test an instance of SMSTenDLCPartnerCampaignsListResultAllOf - /// - [Fact] - public void SMSTenDLCPartnerCampaignsListResultAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'PartnerCampaigns' - /// - [Fact] - public void PartnerCampaignsTest() - { - - List testList = new List(); - instance.PartnerCampaigns = testList; - Assert.Equal(testList, instance.PartnerCampaigns); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SMSTenDLCPartnerCampaignsListResultAllOf test1 = new SMSTenDLCPartnerCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.PartnerCampaigns = testList; - - SMSTenDLCPartnerCampaignsListResultAllOf test2 = new SMSTenDLCPartnerCampaignsListResultAllOf(new List()); - List testList2 = new List(); - test2.PartnerCampaigns = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SMSTenDLCPartnerCampaignsListResultAllOf test1 = new SMSTenDLCPartnerCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.PartnerCampaigns = testList; - - SMSTenDLCPartnerCampaignsListResultAllOf test2 = new SMSTenDLCPartnerCampaignsListResultAllOf(new List()); - List testList2 = null; - test2.PartnerCampaigns = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SMSTenDLCPartnerCampaignsListResultAllOf test1 = new SMSTenDLCPartnerCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.PartnerCampaigns = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SMSTenDLCPartnerCampaignsListResultAllOf test1 = new SMSTenDLCPartnerCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.PartnerCampaigns = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SMSTenDLCPartnerCampaignsListResultAllOf test1 = new SMSTenDLCPartnerCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.PartnerCampaigns = testList; - - SMSTenDLCPartnerCampaignsListResultAllOf test2 = new SMSTenDLCPartnerCampaignsListResultAllOf(new List()); - List testList2 = new List(); - test2.PartnerCampaigns = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SMSTenDLCPartnerCampaignsListResultAllOf test1 = new SMSTenDLCPartnerCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.PartnerCampaigns = testList; - - SMSTenDLCPartnerCampaignsListResultAllOf test2 = new SMSTenDLCPartnerCampaignsListResultAllOf(new List()); - List testList2 = new List(); - test2.PartnerCampaigns = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SMSTenDLCPartnerCampaignsListResultAllOf test1 = new SMSTenDLCPartnerCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.PartnerCampaigns = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SMSTenDLCPartnerCampaignsListResultAllOf test2 = new SMSTenDLCPartnerCampaignsListResultAllOf(new List()); - List testList2 = new List(); - test2.PartnerCampaigns = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignsListResultTests.cs b/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignsListResultTests.cs index 94fe22f6..3af5ef10 100644 --- a/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignsListResultTests.cs +++ b/src/freeclimb.Test/Model/SMSTenDLCPartnerCampaignsListResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,29 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SMSTenDLCPartnerCampaignsListResultTests + + public class SMSTenDLCPartnerCampaignsListResultTests : IDisposable { private SMSTenDLCPartnerCampaignsListResult instance; public SMSTenDLCPartnerCampaignsListResultTests() { - - instance = new SMSTenDLCPartnerCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new SMSTenDLCPartnerCampaignsListResult( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + partnerCampaigns: (List) + TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +65,66 @@ public void SMSTenDLCPartnerCampaignsListResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +133,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'PartnerCampaigns' /// [Fact] public void PartnerCampaignsTest() { - List testList = new List(); instance.PartnerCampaigns = testList; - Assert.Equal(testList, instance.PartnerCampaigns); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SMSTenDLCPartnerCampaignsListResult test1 = new SMSTenDLCPartnerCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.PartnerCampaigns = testList; - - SMSTenDLCPartnerCampaignsListResult test2 = new SMSTenDLCPartnerCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.PartnerCampaigns = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SMSTenDLCPartnerCampaignsListResult test1 = new SMSTenDLCPartnerCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.PartnerCampaigns = testList; - - SMSTenDLCPartnerCampaignsListResult test2 = new SMSTenDLCPartnerCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.PartnerCampaigns = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SMSTenDLCPartnerCampaignsListResult test1 = new SMSTenDLCPartnerCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.PartnerCampaigns = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SMSTenDLCPartnerCampaignsListResult test1 = new SMSTenDLCPartnerCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.PartnerCampaigns = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SMSTenDLCPartnerCampaignsListResult test1 = new SMSTenDLCPartnerCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.PartnerCampaigns = testList; - - SMSTenDLCPartnerCampaignsListResult test2 = new SMSTenDLCPartnerCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.PartnerCampaigns = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SMSTenDLCPartnerCampaignsListResult test1 = new SMSTenDLCPartnerCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.PartnerCampaigns = testList; - - SMSTenDLCPartnerCampaignsListResult test2 = new SMSTenDLCPartnerCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.PartnerCampaigns = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SMSTenDLCPartnerCampaignsListResult test1 = new SMSTenDLCPartnerCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.PartnerCampaigns = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SMSTenDLCPartnerCampaignsListResult test2 = new SMSTenDLCPartnerCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.PartnerCampaigns = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.PartnerCampaigns, testList); } } } diff --git a/src/freeclimb.Test/Model/SMSTollFreeCampaignTests.cs b/src/freeclimb.Test/Model/SMSTollFreeCampaignTests.cs index 3941405c..afb9bc40 100644 --- a/src/freeclimb.Test/Model/SMSTollFreeCampaignTests.cs +++ b/src/freeclimb.Test/Model/SMSTollFreeCampaignTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,28 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SMSTollFreeCampaignTests + + public class SMSTollFreeCampaignTests : IDisposable { private SMSTollFreeCampaign instance; public SMSTollFreeCampaignTests() { - - instance = new SMSTollFreeCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED, "TEST_STRING", "TEST_STRING", 1); - + instance = new SMSTollFreeCampaign( + accountId: (string)TestHelpers.getTestValue(typeof(string)), + campaignId: (string)TestHelpers.getTestValue(typeof(string)), + useCase: (string)TestHelpers.getTestValue(typeof(string)), + registrationStatus: (SMSTollFreeCampaignRegistrationStatus) + TestHelpers.getTestValue(typeof(SMSTollFreeCampaignRegistrationStatus)), + dateCreated: (string)TestHelpers.getTestValue(typeof(string)), + dateUpdated: (string)TestHelpers.getTestValue(typeof(string)), + revision: (int)TestHelpers.getTestValue(typeof(int)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +64,6 @@ public void SMSTollFreeCampaignInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'AccountId' /// @@ -65,8 +72,8 @@ public void AccountIdTest() { instance.AccountId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.AccountId); - } + /// /// Test the property 'CampaignId' /// @@ -75,8 +82,8 @@ public void CampaignIdTest() { instance.CampaignId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CampaignId); - } + /// /// Test the property 'UseCase' /// @@ -85,31 +92,41 @@ public void UseCaseTest() { instance.UseCase = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.UseCase); - } + /// /// Test the property 'RegistrationStatus' /// [Fact] public void RegistrationStatusTest() { - - instance.RegistrationStatus = SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED; - Assert.Equal(instance.RegistrationStatus,SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED); - - instance.RegistrationStatus = SMSTollFreeCampaign.RegistrationStatusEnum.INITIATED; - Assert.Equal(instance.RegistrationStatus,SMSTollFreeCampaign.RegistrationStatusEnum.INITIATED); - - instance.RegistrationStatus = SMSTollFreeCampaign.RegistrationStatusEnum.PENDING; - Assert.Equal(instance.RegistrationStatus,SMSTollFreeCampaign.RegistrationStatusEnum.PENDING); - - instance.RegistrationStatus = SMSTollFreeCampaign.RegistrationStatusEnum.DECLINED; - Assert.Equal(instance.RegistrationStatus,SMSTollFreeCampaign.RegistrationStatusEnum.DECLINED); - - instance.RegistrationStatus = SMSTollFreeCampaign.RegistrationStatusEnum.REGISTERED; - Assert.Equal(instance.RegistrationStatus,SMSTollFreeCampaign.RegistrationStatusEnum.REGISTERED); - + instance.RegistrationStatus = SMSTollFreeCampaignRegistrationStatus.UNREGISTERED; + Assert.Equal( + SMSTollFreeCampaignRegistrationStatus.UNREGISTERED, + instance.RegistrationStatus + ); + instance.RegistrationStatus = SMSTollFreeCampaignRegistrationStatus.INITIATED; + Assert.Equal( + SMSTollFreeCampaignRegistrationStatus.INITIATED, + instance.RegistrationStatus + ); + instance.RegistrationStatus = SMSTollFreeCampaignRegistrationStatus.PENDING; + Assert.Equal( + SMSTollFreeCampaignRegistrationStatus.PENDING, + instance.RegistrationStatus + ); + instance.RegistrationStatus = SMSTollFreeCampaignRegistrationStatus.DECLINED; + Assert.Equal( + SMSTollFreeCampaignRegistrationStatus.DECLINED, + instance.RegistrationStatus + ); + instance.RegistrationStatus = SMSTollFreeCampaignRegistrationStatus.REGISTERED; + Assert.Equal( + SMSTollFreeCampaignRegistrationStatus.REGISTERED, + instance.RegistrationStatus + ); } + /// /// Test the property 'DateCreated' /// @@ -118,8 +135,8 @@ public void DateCreatedTest() { instance.DateCreated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateCreated); - } + /// /// Test the property 'DateUpdated' /// @@ -128,188 +145,16 @@ public void DateUpdatedTest() { instance.DateUpdated = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.DateUpdated); - } + /// /// Test the property 'Revision' /// [Fact] public void RevisionTest() { - instance.Revision = 1; - Assert.Equal(1, (int) instance.Revision); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SMSTollFreeCampaign test1 = new SMSTollFreeCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED, "TEST_STRING", "TEST_STRING", 1); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.UseCase = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - - SMSTollFreeCampaign test2 = new SMSTollFreeCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED, "TEST_STRING", "TEST_STRING", 1); - test2.AccountId = "TS"; - test2.CampaignId = "TS"; - test2.UseCase = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SMSTollFreeCampaign test1 = new SMSTollFreeCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED, "TEST_STRING", "TEST_STRING", 1); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.UseCase = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - - SMSTollFreeCampaign test2 = new SMSTollFreeCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED, "TEST_STRING", "TEST_STRING", 1); - test2.AccountId = "ts"; - test2.CampaignId = "ts"; - test2.UseCase = "ts"; - test2.DateCreated = "ts"; - test2.DateUpdated = "ts"; - test2.Revision = 2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SMSTollFreeCampaign test1 = new SMSTollFreeCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED, "TEST_STRING", "TEST_STRING", 1); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.UseCase = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SMSTollFreeCampaign test1 = new SMSTollFreeCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED, "TEST_STRING", "TEST_STRING", 1); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.UseCase = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SMSTollFreeCampaign test1 = new SMSTollFreeCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED, "TEST_STRING", "TEST_STRING", 1); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.UseCase = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - - SMSTollFreeCampaign test2 = new SMSTollFreeCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED, "TEST_STRING", "TEST_STRING", 1); - test2.AccountId = "TS"; - test2.CampaignId = "TS"; - test2.UseCase = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SMSTollFreeCampaign test1 = new SMSTollFreeCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED, "TEST_STRING", "TEST_STRING", 1); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.UseCase = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - - SMSTollFreeCampaign test2 = new SMSTollFreeCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED, "TEST_STRING", "TEST_STRING", 1); - test2.AccountId = "TS"; - test2.CampaignId = "TS"; - test2.UseCase = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SMSTollFreeCampaign test1 = new SMSTollFreeCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED, "TEST_STRING", "TEST_STRING", 1); - test1.AccountId = "TS"; - test1.CampaignId = "TS"; - test1.UseCase = "TS"; - test1.DateCreated = "TS"; - test1.DateUpdated = "TS"; - test1.Revision = 1; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SMSTollFreeCampaign test2 = new SMSTollFreeCampaign("TEST_STRING", "TEST_STRING", "TEST_STRING", SMSTollFreeCampaign.RegistrationStatusEnum.UNREGISTERED, "TEST_STRING", "TEST_STRING", 1); - test2.AccountId = "TS"; - test2.CampaignId = "TS"; - test2.UseCase = "TS"; - test2.DateCreated = "TS"; - test2.DateUpdated = "TS"; - test2.Revision = 1; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(1, (int)instance.Revision); } } } diff --git a/src/freeclimb.Test/Model/SMSTollFreeCampaignsListResultAllOfTests.cs b/src/freeclimb.Test/Model/SMSTollFreeCampaignsListResultAllOfTests.cs deleted file mode 100644 index ef1e4830..00000000 --- a/src/freeclimb.Test/Model/SMSTollFreeCampaignsListResultAllOfTests.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing SMSTollFreeCampaignsListResultAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SMSTollFreeCampaignsListResultAllOfTests - { - private SMSTollFreeCampaignsListResultAllOf instance; - - public SMSTollFreeCampaignsListResultAllOfTests() - { - - instance = new SMSTollFreeCampaignsListResultAllOf(new List()); - - } - - /// - /// Test an instance of SMSTollFreeCampaignsListResultAllOf - /// - [Fact] - public void SMSTollFreeCampaignsListResultAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Brands' - /// - [Fact] - public void BrandsTest() - { - - List testList = new List(); - instance.Brands = testList; - Assert.Equal(testList, instance.Brands); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SMSTollFreeCampaignsListResultAllOf test1 = new SMSTollFreeCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.Brands = testList; - - SMSTollFreeCampaignsListResultAllOf test2 = new SMSTollFreeCampaignsListResultAllOf(new List()); - List testList2 = new List(); - test2.Brands = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SMSTollFreeCampaignsListResultAllOf test1 = new SMSTollFreeCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.Brands = testList; - - SMSTollFreeCampaignsListResultAllOf test2 = new SMSTollFreeCampaignsListResultAllOf(new List()); - List testList2 = null; - test2.Brands = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SMSTollFreeCampaignsListResultAllOf test1 = new SMSTollFreeCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.Brands = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SMSTollFreeCampaignsListResultAllOf test1 = new SMSTollFreeCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.Brands = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SMSTollFreeCampaignsListResultAllOf test1 = new SMSTollFreeCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.Brands = testList; - - SMSTollFreeCampaignsListResultAllOf test2 = new SMSTollFreeCampaignsListResultAllOf(new List()); - List testList2 = new List(); - test2.Brands = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SMSTollFreeCampaignsListResultAllOf test1 = new SMSTollFreeCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.Brands = testList; - - SMSTollFreeCampaignsListResultAllOf test2 = new SMSTollFreeCampaignsListResultAllOf(new List()); - List testList2 = new List(); - test2.Brands = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SMSTollFreeCampaignsListResultAllOf test1 = new SMSTollFreeCampaignsListResultAllOf(new List()); - List testList = new List(); - test1.Brands = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SMSTollFreeCampaignsListResultAllOf test2 = new SMSTollFreeCampaignsListResultAllOf(new List()); - List testList2 = new List(); - test2.Brands = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/SMSTollFreeCampaignsListResultTests.cs b/src/freeclimb.Test/Model/SMSTollFreeCampaignsListResultTests.cs index 266985e7..a36ab203 100644 --- a/src/freeclimb.Test/Model/SMSTollFreeCampaignsListResultTests.cs +++ b/src/freeclimb.Test/Model/SMSTollFreeCampaignsListResultTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,29 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SMSTollFreeCampaignsListResultTests + + public class SMSTollFreeCampaignsListResultTests : IDisposable { private SMSTollFreeCampaignsListResult instance; public SMSTollFreeCampaignsListResultTests() { - - instance = new SMSTollFreeCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - + instance = new SMSTollFreeCampaignsListResult( + total: (int?)TestHelpers.getTestValue(typeof(int?)), + start: (int?)TestHelpers.getTestValue(typeof(int?)), + end: (int?)TestHelpers.getTestValue(typeof(int?)), + page: (int?)TestHelpers.getTestValue(typeof(int?)), + numPages: (int?)TestHelpers.getTestValue(typeof(int?)), + pageSize: (int?)TestHelpers.getTestValue(typeof(int?)), + nextPageUri: (string)TestHelpers.getTestValue(typeof(string)), + brands: (List) + TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,67 +65,66 @@ public void SMSTollFreeCampaignsListResultInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Total' /// [Fact] public void TotalTest() { - instance.Total = 1; - Assert.Equal(1, (int) instance.Total); + Assert.Equal(1, (int)instance.Total); } + /// /// Test the property 'Start' /// [Fact] public void StartTest() { - instance.Start = 1; - Assert.Equal(1, (int) instance.Start); + Assert.Equal(1, (int)instance.Start); } + /// /// Test the property 'End' /// [Fact] public void EndTest() { - instance.End = 1; - Assert.Equal(1, (int) instance.End); + Assert.Equal(1, (int)instance.End); } + /// /// Test the property 'Page' /// [Fact] public void PageTest() { - instance.Page = 1; - Assert.Equal(1, (int) instance.Page); + Assert.Equal(1, (int)instance.Page); } + /// /// Test the property 'NumPages' /// [Fact] public void NumPagesTest() { - instance.NumPages = 1; - Assert.Equal(1, (int) instance.NumPages); + Assert.Equal(1, (int)instance.NumPages); } + /// /// Test the property 'PageSize' /// [Fact] public void PageSizeTest() { - instance.PageSize = 1; - Assert.Equal(1, (int) instance.PageSize); + Assert.Equal(1, (int)instance.PageSize); } + /// /// Test the property 'NextPageUri' /// @@ -125,225 +133,17 @@ public void NextPageUriTest() { instance.NextPageUri = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NextPageUri); - } + /// /// Test the property 'Brands' /// [Fact] public void BrandsTest() { - List testList = new List(); instance.Brands = testList; - Assert.Equal(testList, instance.Brands); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SMSTollFreeCampaignsListResult test1 = new SMSTollFreeCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Brands = testList; - - SMSTollFreeCampaignsListResult test2 = new SMSTollFreeCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Brands = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SMSTollFreeCampaignsListResult test1 = new SMSTollFreeCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Brands = testList; - - SMSTollFreeCampaignsListResult test2 = new SMSTollFreeCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 2; - test2.Start = 2; - test2.End = 2; - test2.Page = 2; - test2.NumPages = 2; - test2.PageSize = 2; - test2.NextPageUri = "ts"; - List testList2 = null; - test2.Brands = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SMSTollFreeCampaignsListResult test1 = new SMSTollFreeCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Brands = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SMSTollFreeCampaignsListResult test1 = new SMSTollFreeCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Brands = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SMSTollFreeCampaignsListResult test1 = new SMSTollFreeCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Brands = testList; - - SMSTollFreeCampaignsListResult test2 = new SMSTollFreeCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Brands = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SMSTollFreeCampaignsListResult test1 = new SMSTollFreeCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Brands = testList; - - SMSTollFreeCampaignsListResult test2 = new SMSTollFreeCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Brands = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SMSTollFreeCampaignsListResult test1 = new SMSTollFreeCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test1.Total = 1; - test1.Start = 1; - test1.End = 1; - test1.Page = 1; - test1.NumPages = 1; - test1.PageSize = 1; - test1.NextPageUri = "TS"; - List testList = new List(); - test1.Brands = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SMSTollFreeCampaignsListResult test2 = new SMSTollFreeCampaignsListResult(1, 1, 1, 1, 1, 1, "TEST_STRING", new List()); - test2.Total = 1; - test2.Start = 1; - test2.End = 1; - test2.Page = 1; - test2.NumPages = 1; - test2.PageSize = 1; - test2.NextPageUri = "TS"; - List testList2 = new List(); - test2.Brands = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.Brands, testList); } } } diff --git a/src/freeclimb.Test/Model/SayAllOfTests.cs b/src/freeclimb.Test/Model/SayAllOfTests.cs deleted file mode 100644 index fc3180e6..00000000 --- a/src/freeclimb.Test/Model/SayAllOfTests.cs +++ /dev/null @@ -1,248 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing SayAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SayAllOfTests - { - private SayAllOf instance; - - public SayAllOfTests() - { - - instance = new SayAllOf("TEST_STRING", "TEST_STRING", 1, false); - - } - - /// - /// Test an instance of SayAllOf - /// - [Fact] - public void SayAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Text' - /// - [Fact] - public void TextTest() - { - instance.Text = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Text); - - } - /// - /// Test the property 'Language' - /// - [Fact] - public void LanguageTest() - { - instance.Language = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Language); - - } - /// - /// Test the property 'Loop' - /// - [Fact] - public void LoopTest() - { - - instance.Loop = 1; - Assert.Equal(1, (int) instance.Loop); - } - /// - /// Test the property 'PrivacyMode' - /// - [Fact] - public void PrivacyModeTest() - { - instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SayAllOf test1 = new SayAllOf("TEST_STRING", "TEST_STRING", 1, false); - test1.Text = "TS"; - test1.Language = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - SayAllOf test2 = new SayAllOf("TEST_STRING", "TEST_STRING", 1, false); - test2.Text = "TS"; - test2.Language = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SayAllOf test1 = new SayAllOf("TEST_STRING", "TEST_STRING", 1, false); - test1.Text = "TS"; - test1.Language = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - SayAllOf test2 = new SayAllOf("TEST_STRING", "TEST_STRING", 1, false); - test2.Text = "ts"; - test2.Language = "ts"; - test2.Loop = 2; - test2.PrivacyMode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SayAllOf test1 = new SayAllOf("TEST_STRING", "TEST_STRING", 1, false); - test1.Text = "TS"; - test1.Language = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SayAllOf test1 = new SayAllOf("TEST_STRING", "TEST_STRING", 1, false); - test1.Text = "TS"; - test1.Language = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SayAllOf test1 = new SayAllOf("TEST_STRING", "TEST_STRING", 1, false); - test1.Text = "TS"; - test1.Language = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - SayAllOf test2 = new SayAllOf("TEST_STRING", "TEST_STRING", 1, false); - test2.Text = "TS"; - test2.Language = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SayAllOf test1 = new SayAllOf("TEST_STRING", "TEST_STRING", 1, false); - test1.Text = "TS"; - test1.Language = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - SayAllOf test2 = new SayAllOf("TEST_STRING", "TEST_STRING", 1, false); - test2.Text = "TS"; - test2.Language = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SayAllOf test1 = new SayAllOf("TEST_STRING", "TEST_STRING", 1, false); - test1.Text = "TS"; - test1.Language = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SayAllOf test2 = new SayAllOf("TEST_STRING", "TEST_STRING", 1, false); - test2.Text = "TS"; - test2.Language = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/SayTests.cs b/src/freeclimb.Test/Model/SayTests.cs index 8a6c8695..4c5bfecf 100644 --- a/src/freeclimb.Test/Model/SayTests.cs +++ b/src/freeclimb.Test/Model/SayTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,24 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SayTests + + public class SayTests : IDisposable { private Say instance; public SayTests() { - - instance = new Say("TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - + instance = new Say( + text: (string)TestHelpers.getTestValue(typeof(string)), + language: (string)TestHelpers.getTestValue(typeof(string)), + loop: (int)TestHelpers.getTestValue(typeof(int)), + privacyMode: (bool)TestHelpers.getTestValue(typeof(bool)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +60,6 @@ public void SayInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Text' /// @@ -65,8 +68,8 @@ public void TextTest() { instance.Text = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Text); - } + /// /// Test the property 'Language' /// @@ -75,18 +78,18 @@ public void LanguageTest() { instance.Language = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Language); - } + /// /// Test the property 'Loop' /// [Fact] public void LoopTest() { - instance.Loop = 1; - Assert.Equal(1, (int) instance.Loop); + Assert.Equal(1, (int)instance.Loop); } + /// /// Test the property 'PrivacyMode' /// @@ -94,155 +97,7 @@ public void LoopTest() public void PrivacyModeTest() { instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - Say test1 = new Say("TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test1.Text = "TS"; - test1.Language = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - Say test2 = new Say("TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test2.Text = "TS"; - test2.Language = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - Say test1 = new Say("TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test1.Text = "TS"; - test1.Language = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - Say test2 = new Say("TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test2.Text = "ts"; - test2.Language = "ts"; - test2.Loop = 2; - test2.PrivacyMode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - Say test1 = new Say("TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test1.Text = "TS"; - test1.Language = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - Say test1 = new Say("TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test1.Text = "TS"; - test1.Language = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - Say test1 = new Say("TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test1.Text = "TS"; - test1.Language = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - Say test2 = new Say("TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test2.Text = "TS"; - test2.Language = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - Say test1 = new Say("TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test1.Text = "TS"; - test1.Language = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - - Say test2 = new Say("TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test2.Text = "TS"; - test2.Language = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - Say test1 = new Say("TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test1.Text = "TS"; - test1.Language = "TS"; - test1.Loop = 1; - test1.PrivacyMode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - Say test2 = new Say("TEST_STRING", "TEST_STRING", 1, false, "TEST_STRING"); - test2.Text = "TS"; - test2.Language = "TS"; - test2.Loop = 1; - test2.PrivacyMode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.False(instance.PrivacyMode); } } } diff --git a/src/freeclimb.Test/Model/SendDigitsAllOfTests.cs b/src/freeclimb.Test/Model/SendDigitsAllOfTests.cs deleted file mode 100644 index a8a9504b..00000000 --- a/src/freeclimb.Test/Model/SendDigitsAllOfTests.cs +++ /dev/null @@ -1,226 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing SendDigitsAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SendDigitsAllOfTests - { - private SendDigitsAllOf instance; - - public SendDigitsAllOfTests() - { - - instance = new SendDigitsAllOf("TEST_STRING", 1, false); - - } - - /// - /// Test an instance of SendDigitsAllOf - /// - [Fact] - public void SendDigitsAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Digits' - /// - [Fact] - public void DigitsTest() - { - instance.Digits = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Digits); - - } - /// - /// Test the property 'PauseMs' - /// - [Fact] - public void PauseMsTest() - { - - instance.PauseMs = 1; - Assert.Equal(1, (int) instance.PauseMs); - } - /// - /// Test the property 'PrivacyMode' - /// - [Fact] - public void PrivacyModeTest() - { - instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SendDigitsAllOf test1 = new SendDigitsAllOf("TEST_STRING", 1, false); - test1.Digits = "TS"; - test1.PauseMs = 1; - test1.PrivacyMode = true; - - SendDigitsAllOf test2 = new SendDigitsAllOf("TEST_STRING", 1, false); - test2.Digits = "TS"; - test2.PauseMs = 1; - test2.PrivacyMode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SendDigitsAllOf test1 = new SendDigitsAllOf("TEST_STRING", 1, false); - test1.Digits = "TS"; - test1.PauseMs = 1; - test1.PrivacyMode = true; - - SendDigitsAllOf test2 = new SendDigitsAllOf("TEST_STRING", 1, false); - test2.Digits = "ts"; - test2.PauseMs = 2; - test2.PrivacyMode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SendDigitsAllOf test1 = new SendDigitsAllOf("TEST_STRING", 1, false); - test1.Digits = "TS"; - test1.PauseMs = 1; - test1.PrivacyMode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SendDigitsAllOf test1 = new SendDigitsAllOf("TEST_STRING", 1, false); - test1.Digits = "TS"; - test1.PauseMs = 1; - test1.PrivacyMode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SendDigitsAllOf test1 = new SendDigitsAllOf("TEST_STRING", 1, false); - test1.Digits = "TS"; - test1.PauseMs = 1; - test1.PrivacyMode = true; - - SendDigitsAllOf test2 = new SendDigitsAllOf("TEST_STRING", 1, false); - test2.Digits = "TS"; - test2.PauseMs = 1; - test2.PrivacyMode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SendDigitsAllOf test1 = new SendDigitsAllOf("TEST_STRING", 1, false); - test1.Digits = "TS"; - test1.PauseMs = 1; - test1.PrivacyMode = true; - - SendDigitsAllOf test2 = new SendDigitsAllOf("TEST_STRING", 1, false); - test2.Digits = "TS"; - test2.PauseMs = 1; - test2.PrivacyMode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SendDigitsAllOf test1 = new SendDigitsAllOf("TEST_STRING", 1, false); - test1.Digits = "TS"; - test1.PauseMs = 1; - test1.PrivacyMode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SendDigitsAllOf test2 = new SendDigitsAllOf("TEST_STRING", 1, false); - test2.Digits = "TS"; - test2.PauseMs = 1; - test2.PrivacyMode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/SendDigitsTests.cs b/src/freeclimb.Test/Model/SendDigitsTests.cs index 046f07f9..ee8da357 100644 --- a/src/freeclimb.Test/Model/SendDigitsTests.cs +++ b/src/freeclimb.Test/Model/SendDigitsTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,23 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SendDigitsTests + + public class SendDigitsTests : IDisposable { private SendDigits instance; public SendDigitsTests() { - - instance = new SendDigits("TEST_STRING", 1, false, "TEST_STRING"); - + instance = new SendDigits( + digits: (string)TestHelpers.getTestValue(typeof(string)), + pauseMs: (int)TestHelpers.getTestValue(typeof(int)), + privacyMode: (bool)TestHelpers.getTestValue(typeof(bool)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +59,6 @@ public void SendDigitsInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Digits' /// @@ -65,18 +67,18 @@ public void DigitsTest() { instance.Digits = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Digits); - } + /// /// Test the property 'PauseMs' /// [Fact] public void PauseMsTest() { - instance.PauseMs = 1; - Assert.Equal(1, (int) instance.PauseMs); + Assert.Equal(1, (int)instance.PauseMs); } + /// /// Test the property 'PrivacyMode' /// @@ -84,143 +86,7 @@ public void PauseMsTest() public void PrivacyModeTest() { instance.PrivacyMode = false; - Assert.Equal(false, instance.PrivacyMode); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SendDigits test1 = new SendDigits("TEST_STRING", 1, false, "TEST_STRING"); - test1.Digits = "TS"; - test1.PauseMs = 1; - test1.PrivacyMode = true; - - SendDigits test2 = new SendDigits("TEST_STRING", 1, false, "TEST_STRING"); - test2.Digits = "TS"; - test2.PauseMs = 1; - test2.PrivacyMode = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SendDigits test1 = new SendDigits("TEST_STRING", 1, false, "TEST_STRING"); - test1.Digits = "TS"; - test1.PauseMs = 1; - test1.PrivacyMode = true; - - SendDigits test2 = new SendDigits("TEST_STRING", 1, false, "TEST_STRING"); - test2.Digits = "ts"; - test2.PauseMs = 2; - test2.PrivacyMode = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SendDigits test1 = new SendDigits("TEST_STRING", 1, false, "TEST_STRING"); - test1.Digits = "TS"; - test1.PauseMs = 1; - test1.PrivacyMode = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SendDigits test1 = new SendDigits("TEST_STRING", 1, false, "TEST_STRING"); - test1.Digits = "TS"; - test1.PauseMs = 1; - test1.PrivacyMode = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SendDigits test1 = new SendDigits("TEST_STRING", 1, false, "TEST_STRING"); - test1.Digits = "TS"; - test1.PauseMs = 1; - test1.PrivacyMode = true; - - SendDigits test2 = new SendDigits("TEST_STRING", 1, false, "TEST_STRING"); - test2.Digits = "TS"; - test2.PauseMs = 1; - test2.PrivacyMode = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SendDigits test1 = new SendDigits("TEST_STRING", 1, false, "TEST_STRING"); - test1.Digits = "TS"; - test1.PauseMs = 1; - test1.PrivacyMode = true; - - SendDigits test2 = new SendDigits("TEST_STRING", 1, false, "TEST_STRING"); - test2.Digits = "TS"; - test2.PauseMs = 1; - test2.PrivacyMode = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SendDigits test1 = new SendDigits("TEST_STRING", 1, false, "TEST_STRING"); - test1.Digits = "TS"; - test1.PauseMs = 1; - test1.PrivacyMode = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SendDigits test2 = new SendDigits("TEST_STRING", 1, false, "TEST_STRING"); - test2.Digits = "TS"; - test2.PauseMs = 1; - test2.PrivacyMode = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.False(instance.PrivacyMode); } } } diff --git a/src/freeclimb.Test/Model/SetDTMFPassThroughAllOfTests.cs b/src/freeclimb.Test/Model/SetDTMFPassThroughAllOfTests.cs deleted file mode 100644 index a7008fab..00000000 --- a/src/freeclimb.Test/Model/SetDTMFPassThroughAllOfTests.cs +++ /dev/null @@ -1,182 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing SetDTMFPassThroughAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SetDTMFPassThroughAllOfTests - { - private SetDTMFPassThroughAllOf instance; - - public SetDTMFPassThroughAllOfTests() - { - - instance = new SetDTMFPassThroughAllOf(false); - - } - - /// - /// Test an instance of SetDTMFPassThroughAllOf - /// - [Fact] - public void SetDTMFPassThroughAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'DtmfPassThrough' - /// - [Fact] - public void DtmfPassThroughTest() - { - instance.DtmfPassThrough = false; - Assert.Equal(false, instance.DtmfPassThrough); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SetDTMFPassThroughAllOf test1 = new SetDTMFPassThroughAllOf(false); - test1.DtmfPassThrough = true; - - SetDTMFPassThroughAllOf test2 = new SetDTMFPassThroughAllOf(false); - test2.DtmfPassThrough = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SetDTMFPassThroughAllOf test1 = new SetDTMFPassThroughAllOf(false); - test1.DtmfPassThrough = true; - - SetDTMFPassThroughAllOf test2 = new SetDTMFPassThroughAllOf(false); - test2.DtmfPassThrough = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SetDTMFPassThroughAllOf test1 = new SetDTMFPassThroughAllOf(false); - test1.DtmfPassThrough = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SetDTMFPassThroughAllOf test1 = new SetDTMFPassThroughAllOf(false); - test1.DtmfPassThrough = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SetDTMFPassThroughAllOf test1 = new SetDTMFPassThroughAllOf(false); - test1.DtmfPassThrough = true; - - SetDTMFPassThroughAllOf test2 = new SetDTMFPassThroughAllOf(false); - test2.DtmfPassThrough = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SetDTMFPassThroughAllOf test1 = new SetDTMFPassThroughAllOf(false); - test1.DtmfPassThrough = true; - - SetDTMFPassThroughAllOf test2 = new SetDTMFPassThroughAllOf(false); - test2.DtmfPassThrough = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SetDTMFPassThroughAllOf test1 = new SetDTMFPassThroughAllOf(false); - test1.DtmfPassThrough = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SetDTMFPassThroughAllOf test2 = new SetDTMFPassThroughAllOf(false); - test2.DtmfPassThrough = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/SetDTMFPassThroughTests.cs b/src/freeclimb.Test/Model/SetDTMFPassThroughTests.cs index 336526c2..a5f42ea9 100644 --- a/src/freeclimb.Test/Model/SetDTMFPassThroughTests.cs +++ b/src/freeclimb.Test/Model/SetDTMFPassThroughTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,21 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SetDTMFPassThroughTests + + public class SetDTMFPassThroughTests : IDisposable { private SetDTMFPassThrough instance; public SetDTMFPassThroughTests() { - - instance = new SetDTMFPassThrough(false, "TEST_STRING"); - + instance = new SetDTMFPassThrough( + dtmfPassThrough: (bool)TestHelpers.getTestValue(typeof(bool)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +57,6 @@ public void SetDTMFPassThroughInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'DtmfPassThrough' /// @@ -64,119 +64,7 @@ public void SetDTMFPassThroughInstanceTest() public void DtmfPassThroughTest() { instance.DtmfPassThrough = false; - Assert.Equal(false, instance.DtmfPassThrough); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SetDTMFPassThrough test1 = new SetDTMFPassThrough(false, "TEST_STRING"); - test1.DtmfPassThrough = true; - - SetDTMFPassThrough test2 = new SetDTMFPassThrough(false, "TEST_STRING"); - test2.DtmfPassThrough = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SetDTMFPassThrough test1 = new SetDTMFPassThrough(false, "TEST_STRING"); - test1.DtmfPassThrough = true; - - SetDTMFPassThrough test2 = new SetDTMFPassThrough(false, "TEST_STRING"); - test2.DtmfPassThrough = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SetDTMFPassThrough test1 = new SetDTMFPassThrough(false, "TEST_STRING"); - test1.DtmfPassThrough = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SetDTMFPassThrough test1 = new SetDTMFPassThrough(false, "TEST_STRING"); - test1.DtmfPassThrough = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SetDTMFPassThrough test1 = new SetDTMFPassThrough(false, "TEST_STRING"); - test1.DtmfPassThrough = true; - - SetDTMFPassThrough test2 = new SetDTMFPassThrough(false, "TEST_STRING"); - test2.DtmfPassThrough = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SetDTMFPassThrough test1 = new SetDTMFPassThrough(false, "TEST_STRING"); - test1.DtmfPassThrough = true; - - SetDTMFPassThrough test2 = new SetDTMFPassThrough(false, "TEST_STRING"); - test2.DtmfPassThrough = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SetDTMFPassThrough test1 = new SetDTMFPassThrough(false, "TEST_STRING"); - test1.DtmfPassThrough = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SetDTMFPassThrough test2 = new SetDTMFPassThrough(false, "TEST_STRING"); - test2.DtmfPassThrough = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.False(instance.DtmfPassThrough); } } } diff --git a/src/freeclimb.Test/Model/SetListenAllOfTests.cs b/src/freeclimb.Test/Model/SetListenAllOfTests.cs deleted file mode 100644 index 01c9e64b..00000000 --- a/src/freeclimb.Test/Model/SetListenAllOfTests.cs +++ /dev/null @@ -1,182 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing SetListenAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SetListenAllOfTests - { - private SetListenAllOf instance; - - public SetListenAllOfTests() - { - - instance = new SetListenAllOf(false); - - } - - /// - /// Test an instance of SetListenAllOf - /// - [Fact] - public void SetListenAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Listen' - /// - [Fact] - public void ListenTest() - { - instance.Listen = false; - Assert.Equal(false, instance.Listen); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SetListenAllOf test1 = new SetListenAllOf(false); - test1.Listen = true; - - SetListenAllOf test2 = new SetListenAllOf(false); - test2.Listen = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SetListenAllOf test1 = new SetListenAllOf(false); - test1.Listen = true; - - SetListenAllOf test2 = new SetListenAllOf(false); - test2.Listen = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SetListenAllOf test1 = new SetListenAllOf(false); - test1.Listen = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SetListenAllOf test1 = new SetListenAllOf(false); - test1.Listen = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SetListenAllOf test1 = new SetListenAllOf(false); - test1.Listen = true; - - SetListenAllOf test2 = new SetListenAllOf(false); - test2.Listen = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SetListenAllOf test1 = new SetListenAllOf(false); - test1.Listen = true; - - SetListenAllOf test2 = new SetListenAllOf(false); - test2.Listen = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SetListenAllOf test1 = new SetListenAllOf(false); - test1.Listen = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SetListenAllOf test2 = new SetListenAllOf(false); - test2.Listen = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/SetListenTests.cs b/src/freeclimb.Test/Model/SetListenTests.cs index dfdaeb58..07cb5526 100644 --- a/src/freeclimb.Test/Model/SetListenTests.cs +++ b/src/freeclimb.Test/Model/SetListenTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,19 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SetListenTests + + public class SetListenTests : IDisposable { private SetListen instance; public SetListenTests() { - - instance = new SetListen(false, "TEST_STRING"); - + instance = new SetListen(listen: (bool)TestHelpers.getTestValue(typeof(bool))); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +55,6 @@ public void SetListenInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Listen' /// @@ -64,119 +62,7 @@ public void SetListenInstanceTest() public void ListenTest() { instance.Listen = false; - Assert.Equal(false, instance.Listen); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SetListen test1 = new SetListen(false, "TEST_STRING"); - test1.Listen = true; - - SetListen test2 = new SetListen(false, "TEST_STRING"); - test2.Listen = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SetListen test1 = new SetListen(false, "TEST_STRING"); - test1.Listen = true; - - SetListen test2 = new SetListen(false, "TEST_STRING"); - test2.Listen = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SetListen test1 = new SetListen(false, "TEST_STRING"); - test1.Listen = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SetListen test1 = new SetListen(false, "TEST_STRING"); - test1.Listen = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SetListen test1 = new SetListen(false, "TEST_STRING"); - test1.Listen = true; - - SetListen test2 = new SetListen(false, "TEST_STRING"); - test2.Listen = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SetListen test1 = new SetListen(false, "TEST_STRING"); - test1.Listen = true; - - SetListen test2 = new SetListen(false, "TEST_STRING"); - test2.Listen = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SetListen test1 = new SetListen(false, "TEST_STRING"); - test1.Listen = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SetListen test2 = new SetListen(false, "TEST_STRING"); - test2.Listen = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.False(instance.Listen); } } } diff --git a/src/freeclimb.Test/Model/SetTalkAllOfTests.cs b/src/freeclimb.Test/Model/SetTalkAllOfTests.cs deleted file mode 100644 index 349dc7c9..00000000 --- a/src/freeclimb.Test/Model/SetTalkAllOfTests.cs +++ /dev/null @@ -1,182 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing SetTalkAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SetTalkAllOfTests - { - private SetTalkAllOf instance; - - public SetTalkAllOfTests() - { - - instance = new SetTalkAllOf(false); - - } - - /// - /// Test an instance of SetTalkAllOf - /// - [Fact] - public void SetTalkAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Talk' - /// - [Fact] - public void TalkTest() - { - instance.Talk = false; - Assert.Equal(false, instance.Talk); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SetTalkAllOf test1 = new SetTalkAllOf(false); - test1.Talk = true; - - SetTalkAllOf test2 = new SetTalkAllOf(false); - test2.Talk = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SetTalkAllOf test1 = new SetTalkAllOf(false); - test1.Talk = true; - - SetTalkAllOf test2 = new SetTalkAllOf(false); - test2.Talk = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SetTalkAllOf test1 = new SetTalkAllOf(false); - test1.Talk = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SetTalkAllOf test1 = new SetTalkAllOf(false); - test1.Talk = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SetTalkAllOf test1 = new SetTalkAllOf(false); - test1.Talk = true; - - SetTalkAllOf test2 = new SetTalkAllOf(false); - test2.Talk = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SetTalkAllOf test1 = new SetTalkAllOf(false); - test1.Talk = true; - - SetTalkAllOf test2 = new SetTalkAllOf(false); - test2.Talk = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SetTalkAllOf test1 = new SetTalkAllOf(false); - test1.Talk = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SetTalkAllOf test2 = new SetTalkAllOf(false); - test2.Talk = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/SetTalkTests.cs b/src/freeclimb.Test/Model/SetTalkTests.cs index d85504d7..01b73dee 100644 --- a/src/freeclimb.Test/Model/SetTalkTests.cs +++ b/src/freeclimb.Test/Model/SetTalkTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,19 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SetTalkTests + + public class SetTalkTests : IDisposable { private SetTalk instance; public SetTalkTests() { - - instance = new SetTalk(false, "TEST_STRING"); - + instance = new SetTalk(talk: (bool)TestHelpers.getTestValue(typeof(bool))); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +55,6 @@ public void SetTalkInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Talk' /// @@ -64,119 +62,7 @@ public void SetTalkInstanceTest() public void TalkTest() { instance.Talk = false; - Assert.Equal(false, instance.Talk); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SetTalk test1 = new SetTalk(false, "TEST_STRING"); - test1.Talk = true; - - SetTalk test2 = new SetTalk(false, "TEST_STRING"); - test2.Talk = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SetTalk test1 = new SetTalk(false, "TEST_STRING"); - test1.Talk = true; - - SetTalk test2 = new SetTalk(false, "TEST_STRING"); - test2.Talk = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SetTalk test1 = new SetTalk(false, "TEST_STRING"); - test1.Talk = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SetTalk test1 = new SetTalk(false, "TEST_STRING"); - test1.Talk = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SetTalk test1 = new SetTalk(false, "TEST_STRING"); - test1.Talk = true; - - SetTalk test2 = new SetTalk(false, "TEST_STRING"); - test2.Talk = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SetTalk test1 = new SetTalk(false, "TEST_STRING"); - test1.Talk = true; - - SetTalk test2 = new SetTalk(false, "TEST_STRING"); - test2.Talk = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SetTalk test1 = new SetTalk(false, "TEST_STRING"); - test1.Talk = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SetTalk test2 = new SetTalk(false, "TEST_STRING"); - test2.Talk = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.False(instance.Talk); } } } diff --git a/src/freeclimb.Test/Model/SmsAllOfTests.cs b/src/freeclimb.Test/Model/SmsAllOfTests.cs deleted file mode 100644 index f9c0c4a7..00000000 --- a/src/freeclimb.Test/Model/SmsAllOfTests.cs +++ /dev/null @@ -1,248 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing SmsAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SmsAllOfTests - { - private SmsAllOf instance; - - public SmsAllOfTests() - { - - instance = new SmsAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - - } - - /// - /// Test an instance of SmsAllOf - /// - [Fact] - public void SmsAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'To' - /// - [Fact] - public void ToTest() - { - instance.To = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.To); - - } - /// - /// Test the property 'From' - /// - [Fact] - public void FromTest() - { - instance.From = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.From); - - } - /// - /// Test the property 'Text' - /// - [Fact] - public void TextTest() - { - instance.Text = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.Text); - - } - /// - /// Test the property 'NotificationUrl' - /// - [Fact] - public void NotificationUrlTest() - { - instance.NotificationUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.NotificationUrl); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - SmsAllOf test1 = new SmsAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.To = "TS"; - test1.From = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - - SmsAllOf test2 = new SmsAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.To = "TS"; - test2.From = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - SmsAllOf test1 = new SmsAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.To = "TS"; - test1.From = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - - SmsAllOf test2 = new SmsAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.To = "ts"; - test2.From = "ts"; - test2.Text = "ts"; - test2.NotificationUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - SmsAllOf test1 = new SmsAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.To = "TS"; - test1.From = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - SmsAllOf test1 = new SmsAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.To = "TS"; - test1.From = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - SmsAllOf test1 = new SmsAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.To = "TS"; - test1.From = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - - SmsAllOf test2 = new SmsAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.To = "TS"; - test2.From = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - SmsAllOf test1 = new SmsAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.To = "TS"; - test1.From = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - - SmsAllOf test2 = new SmsAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.To = "TS"; - test2.From = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - SmsAllOf test1 = new SmsAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.To = "TS"; - test1.From = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - SmsAllOf test2 = new SmsAllOf("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.To = "TS"; - test2.From = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/SmsTests.cs b/src/freeclimb.Test/Model/SmsTests.cs index 7610a457..60ce299e 100644 --- a/src/freeclimb.Test/Model/SmsTests.cs +++ b/src/freeclimb.Test/Model/SmsTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,24 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class SmsTests + + public class SmsTests : IDisposable { private Sms instance; public SmsTests() { - - instance = new Sms("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - + instance = new Sms( + to: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + text: (string)TestHelpers.getTestValue(typeof(string)), + notificationUrl: (string)TestHelpers.getTestValue(typeof(string)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +60,6 @@ public void SmsInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'To' /// @@ -65,8 +68,8 @@ public void ToTest() { instance.To = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.To); - } + /// /// Test the property 'From' /// @@ -75,8 +78,8 @@ public void FromTest() { instance.From = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.From); - } + /// /// Test the property 'Text' /// @@ -85,8 +88,8 @@ public void TextTest() { instance.Text = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Text); - } + /// /// Test the property 'NotificationUrl' /// @@ -95,154 +98,6 @@ public void NotificationUrlTest() { instance.NotificationUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.NotificationUrl); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - Sms test1 = new Sms("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.To = "TS"; - test1.From = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - - Sms test2 = new Sms("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.To = "TS"; - test2.From = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - Sms test1 = new Sms("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.To = "TS"; - test1.From = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - - Sms test2 = new Sms("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.To = "ts"; - test2.From = "ts"; - test2.Text = "ts"; - test2.NotificationUrl = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - Sms test1 = new Sms("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.To = "TS"; - test1.From = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - Sms test1 = new Sms("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.To = "TS"; - test1.From = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - Sms test1 = new Sms("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.To = "TS"; - test1.From = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - - Sms test2 = new Sms("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.To = "TS"; - test2.From = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - Sms test1 = new Sms("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.To = "TS"; - test1.From = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - - Sms test2 = new Sms("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.To = "TS"; - test2.From = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - Sms test1 = new Sms("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test1.To = "TS"; - test1.From = "TS"; - test1.Text = "TS"; - test1.NotificationUrl = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - Sms test2 = new Sms("TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING", "TEST_STRING"); - test2.To = "TS"; - test2.From = "TS"; - test2.Text = "TS"; - test2.NotificationUrl = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/StartRecordCallTests.cs b/src/freeclimb.Test/Model/StartRecordCallTests.cs index 8b302111..2b5161c7 100644 --- a/src/freeclimb.Test/Model/StartRecordCallTests.cs +++ b/src/freeclimb.Test/Model/StartRecordCallTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,19 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class StartRecordCallTests + + public class StartRecordCallTests : IDisposable { private StartRecordCall instance; public StartRecordCallTests() { - - instance = new StartRecordCall("TEST_STRING"); - + instance = new StartRecordCall(); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +54,5 @@ public void StartRecordCallInstanceTest() { Assert.IsType(instance); } - - } } diff --git a/src/freeclimb.Test/Model/TFNTests.cs b/src/freeclimb.Test/Model/TFNTests.cs index 121239b4..2704204d 100644 --- a/src/freeclimb.Test/Model/TFNTests.cs +++ b/src/freeclimb.Test/Model/TFNTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,19 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class TFNTests + + public class TFNTests : IDisposable { private TFN instance; public TFNTests() { - - instance = new TFN("TEST_STRING"); - + instance = new TFN(campaignId: (string)TestHelpers.getTestValue(typeof(string))); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +55,6 @@ public void TFNInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'CampaignId' /// @@ -65,118 +63,6 @@ public void CampaignIdTest() { instance.CampaignId = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.CampaignId); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - TFN test1 = new TFN("TEST_STRING"); - test1.CampaignId = "TS"; - - TFN test2 = new TFN("TEST_STRING"); - test2.CampaignId = "TS"; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - TFN test1 = new TFN("TEST_STRING"); - test1.CampaignId = "TS"; - - TFN test2 = new TFN("TEST_STRING"); - test2.CampaignId = "ts"; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - TFN test1 = new TFN("TEST_STRING"); - test1.CampaignId = "TS"; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - TFN test1 = new TFN("TEST_STRING"); - test1.CampaignId = "TS"; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - TFN test1 = new TFN("TEST_STRING"); - test1.CampaignId = "TS"; - - TFN test2 = new TFN("TEST_STRING"); - test2.CampaignId = "TS"; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - TFN test1 = new TFN("TEST_STRING"); - test1.CampaignId = "TS"; - - TFN test2 = new TFN("TEST_STRING"); - test2.CampaignId = "TS"; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - TFN test1 = new TFN("TEST_STRING"); - test1.CampaignId = "TS"; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - TFN test2 = new TFN("TEST_STRING"); - test2.CampaignId = "TS"; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); } } } diff --git a/src/freeclimb.Test/Model/TerminateConferenceTests.cs b/src/freeclimb.Test/Model/TerminateConferenceTests.cs index bbd33747..00bd7bb7 100644 --- a/src/freeclimb.Test/Model/TerminateConferenceTests.cs +++ b/src/freeclimb.Test/Model/TerminateConferenceTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,19 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class TerminateConferenceTests + + public class TerminateConferenceTests : IDisposable { private TerminateConference instance; public TerminateConferenceTests() { - - instance = new TerminateConference("TEST_STRING"); - + instance = new TerminateConference(); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +54,5 @@ public void TerminateConferenceInstanceTest() { Assert.IsType(instance); } - - } } diff --git a/src/freeclimb.Test/Model/TranscribeUtteranceAllOfRecordTests.cs b/src/freeclimb.Test/Model/TranscribeUtteranceAllOfRecordTests.cs deleted file mode 100644 index c706664c..00000000 --- a/src/freeclimb.Test/Model/TranscribeUtteranceAllOfRecordTests.cs +++ /dev/null @@ -1,226 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing TranscribeUtteranceAllOfRecord - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TranscribeUtteranceAllOfRecordTests - { - private TranscribeUtteranceAllOfRecord instance; - - public TranscribeUtteranceAllOfRecordTests() - { - - instance = new TranscribeUtteranceAllOfRecord(false, 1, 1); - - } - - /// - /// Test an instance of TranscribeUtteranceAllOfRecord - /// - [Fact] - public void TranscribeUtteranceAllOfRecordInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'SaveRecording' - /// - [Fact] - public void SaveRecordingTest() - { - instance.SaveRecording = false; - Assert.Equal(false, instance.SaveRecording); - - } - /// - /// Test the property 'MaxLengthSec' - /// - [Fact] - public void MaxLengthSecTest() - { - - instance.MaxLengthSec = 1; - Assert.Equal(1, (int) instance.MaxLengthSec); - } - /// - /// Test the property 'RcrdTerminationSilenceTimeMs' - /// - [Fact] - public void RcrdTerminationSilenceTimeMsTest() - { - - instance.RcrdTerminationSilenceTimeMs = 1; - Assert.Equal(1, (int) instance.RcrdTerminationSilenceTimeMs); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - TranscribeUtteranceAllOfRecord test1 = new TranscribeUtteranceAllOfRecord(false, 1, 1); - test1.SaveRecording = true; - test1.MaxLengthSec = 1; - test1.RcrdTerminationSilenceTimeMs = 1; - - TranscribeUtteranceAllOfRecord test2 = new TranscribeUtteranceAllOfRecord(false, 1, 1); - test2.SaveRecording = true; - test2.MaxLengthSec = 1; - test2.RcrdTerminationSilenceTimeMs = 1; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - TranscribeUtteranceAllOfRecord test1 = new TranscribeUtteranceAllOfRecord(false, 1, 1); - test1.SaveRecording = true; - test1.MaxLengthSec = 1; - test1.RcrdTerminationSilenceTimeMs = 1; - - TranscribeUtteranceAllOfRecord test2 = new TranscribeUtteranceAllOfRecord(false, 1, 1); - test2.SaveRecording = false; - test2.MaxLengthSec = 2; - test2.RcrdTerminationSilenceTimeMs = 2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - TranscribeUtteranceAllOfRecord test1 = new TranscribeUtteranceAllOfRecord(false, 1, 1); - test1.SaveRecording = true; - test1.MaxLengthSec = 1; - test1.RcrdTerminationSilenceTimeMs = 1; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - TranscribeUtteranceAllOfRecord test1 = new TranscribeUtteranceAllOfRecord(false, 1, 1); - test1.SaveRecording = true; - test1.MaxLengthSec = 1; - test1.RcrdTerminationSilenceTimeMs = 1; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - TranscribeUtteranceAllOfRecord test1 = new TranscribeUtteranceAllOfRecord(false, 1, 1); - test1.SaveRecording = true; - test1.MaxLengthSec = 1; - test1.RcrdTerminationSilenceTimeMs = 1; - - TranscribeUtteranceAllOfRecord test2 = new TranscribeUtteranceAllOfRecord(false, 1, 1); - test2.SaveRecording = true; - test2.MaxLengthSec = 1; - test2.RcrdTerminationSilenceTimeMs = 1; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - TranscribeUtteranceAllOfRecord test1 = new TranscribeUtteranceAllOfRecord(false, 1, 1); - test1.SaveRecording = true; - test1.MaxLengthSec = 1; - test1.RcrdTerminationSilenceTimeMs = 1; - - TranscribeUtteranceAllOfRecord test2 = new TranscribeUtteranceAllOfRecord(false, 1, 1); - test2.SaveRecording = true; - test2.MaxLengthSec = 1; - test2.RcrdTerminationSilenceTimeMs = 1; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - TranscribeUtteranceAllOfRecord test1 = new TranscribeUtteranceAllOfRecord(false, 1, 1); - test1.SaveRecording = true; - test1.MaxLengthSec = 1; - test1.RcrdTerminationSilenceTimeMs = 1; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - TranscribeUtteranceAllOfRecord test2 = new TranscribeUtteranceAllOfRecord(false, 1, 1); - test2.SaveRecording = true; - test2.MaxLengthSec = 1; - test2.RcrdTerminationSilenceTimeMs = 1; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/TranscribeUtteranceAllOfTests.cs b/src/freeclimb.Test/Model/TranscribeUtteranceAllOfTests.cs deleted file mode 100644 index e5f18b19..00000000 --- a/src/freeclimb.Test/Model/TranscribeUtteranceAllOfTests.cs +++ /dev/null @@ -1,318 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - - - -using Xunit; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; -using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; -using freeclimb.Enums; - - -namespace freeclimb.Test.Model -{ - /// - /// Class for testing TranscribeUtteranceAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TranscribeUtteranceAllOfTests - { - private TranscribeUtteranceAllOf instance; - - public TranscribeUtteranceAllOfTests() - { - - instance = new TranscribeUtteranceAllOf("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List()); - - } - - /// - /// Test an instance of TranscribeUtteranceAllOf - /// - [Fact] - public void TranscribeUtteranceAllOfInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'ActionUrl' - /// - [Fact] - public void ActionUrlTest() - { - instance.ActionUrl = "TEST_STRING"; - Assert.Equal("TEST_STRING", instance.ActionUrl); - - } - /// - /// Test the property 'PlayBeep' - /// - [Fact] - public void PlayBeepTest() - { - instance.PlayBeep = false; - Assert.Equal(false, instance.PlayBeep); - - } - /// - /// Test the property 'Record' - /// - [Fact] - public void RecordTest() - { - TranscribeUtteranceAllOfRecord testObject = new TranscribeUtteranceAllOfRecord(); - instance.Record = testObject; - Assert.Equal(testObject, instance.Record); - - } - /// - /// Test the property 'PrivacyForLogging' - /// - [Fact] - public void PrivacyForLoggingTest() - { - instance.PrivacyForLogging = false; - Assert.Equal(false, instance.PrivacyForLogging); - - } - /// - /// Test the property 'PrivacyForRecording' - /// - [Fact] - public void PrivacyForRecordingTest() - { - instance.PrivacyForRecording = false; - Assert.Equal(false, instance.PrivacyForRecording); - - } - /// - /// Test the property 'Prompts' - /// - [Fact] - public void PromptsTest() - { - - List testList = new List(); - instance.Prompts = testList; - Assert.Equal(testList, instance.Prompts); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - TranscribeUtteranceAllOf test1 = new TranscribeUtteranceAllOf("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List()); - test1.ActionUrl = "TS"; - test1.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject = new TranscribeUtteranceAllOfRecord(); - test1.Record = RecordtestObject; - test1.PrivacyForLogging = true; - test1.PrivacyForRecording = true; - List testList = new List(); - test1.Prompts = testList; - - TranscribeUtteranceAllOf test2 = new TranscribeUtteranceAllOf("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List()); - test2.ActionUrl = "TS"; - test2.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject2 = new TranscribeUtteranceAllOfRecord(); - test2.Record = RecordtestObject2; - test2.PrivacyForLogging = true; - test2.PrivacyForRecording = true; - List testList2 = new List(); - test2.Prompts = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - TranscribeUtteranceAllOf test1 = new TranscribeUtteranceAllOf("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List()); - test1.ActionUrl = "TS"; - test1.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject = new TranscribeUtteranceAllOfRecord(); - test1.Record = RecordtestObject; - test1.PrivacyForLogging = true; - test1.PrivacyForRecording = true; - List testList = new List(); - test1.Prompts = testList; - - TranscribeUtteranceAllOf test2 = new TranscribeUtteranceAllOf("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List()); - test2.ActionUrl = "ts"; - test2.PlayBeep = false; - TranscribeUtteranceAllOfRecord RecordtestObject2 = new TranscribeUtteranceAllOfRecord(); - test2.Record = RecordtestObject2; - test2.PrivacyForLogging = false; - test2.PrivacyForRecording = false; - List testList2 = null; - test2.Prompts = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - TranscribeUtteranceAllOf test1 = new TranscribeUtteranceAllOf("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List()); - test1.ActionUrl = "TS"; - test1.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject = new TranscribeUtteranceAllOfRecord(); - test1.Record = RecordtestObject; - test1.PrivacyForLogging = true; - test1.PrivacyForRecording = true; - List testList = new List(); - test1.Prompts = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - TranscribeUtteranceAllOf test1 = new TranscribeUtteranceAllOf("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List()); - test1.ActionUrl = "TS"; - test1.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject = new TranscribeUtteranceAllOfRecord(); - test1.Record = RecordtestObject; - test1.PrivacyForLogging = true; - test1.PrivacyForRecording = true; - List testList = new List(); - test1.Prompts = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - TranscribeUtteranceAllOf test1 = new TranscribeUtteranceAllOf("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List()); - test1.ActionUrl = "TS"; - test1.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject = new TranscribeUtteranceAllOfRecord(); - test1.Record = RecordtestObject; - test1.PrivacyForLogging = true; - test1.PrivacyForRecording = true; - List testList = new List(); - test1.Prompts = testList; - - TranscribeUtteranceAllOf test2 = new TranscribeUtteranceAllOf("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List()); - test2.ActionUrl = "TS"; - test2.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject2 = new TranscribeUtteranceAllOfRecord(); - test2.Record = RecordtestObject2; - test2.PrivacyForLogging = true; - test2.PrivacyForRecording = true; - List testList2 = new List(); - test2.Prompts = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - TranscribeUtteranceAllOf test1 = new TranscribeUtteranceAllOf("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List()); - test1.ActionUrl = "TS"; - test1.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject = new TranscribeUtteranceAllOfRecord(); - test1.Record = RecordtestObject; - test1.PrivacyForLogging = true; - test1.PrivacyForRecording = true; - List testList = new List(); - test1.Prompts = testList; - - TranscribeUtteranceAllOf test2 = new TranscribeUtteranceAllOf("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List()); - test2.ActionUrl = "TS"; - test2.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject2 = new TranscribeUtteranceAllOfRecord(); - test2.Record = RecordtestObject2; - test2.PrivacyForLogging = true; - test2.PrivacyForRecording = true; - List testList2 = new List(); - test2.Prompts = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - TranscribeUtteranceAllOf test1 = new TranscribeUtteranceAllOf("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List()); - test1.ActionUrl = "TS"; - test1.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject = new TranscribeUtteranceAllOfRecord(); - test1.Record = RecordtestObject; - test1.PrivacyForLogging = true; - test1.PrivacyForRecording = true; - List testList = new List(); - test1.Prompts = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - TranscribeUtteranceAllOf test2 = new TranscribeUtteranceAllOf("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List()); - test2.ActionUrl = "TS"; - test2.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject2 = new TranscribeUtteranceAllOfRecord(); - test2.Record = RecordtestObject2; - test2.PrivacyForLogging = true; - test2.PrivacyForRecording = true; - List testList2 = new List(); - test2.Prompts = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); - } - } -} diff --git a/src/freeclimb.Test/Model/TranscribeUtteranceRecordTests.cs b/src/freeclimb.Test/Model/TranscribeUtteranceRecordTests.cs new file mode 100644 index 00000000..aae1b2e6 --- /dev/null +++ b/src/freeclimb.Test/Model/TranscribeUtteranceRecordTests.cs @@ -0,0 +1,92 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing TranscribeUtteranceRecord + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class TranscribeUtteranceRecordTests : IDisposable + { + private TranscribeUtteranceRecord instance; + + public TranscribeUtteranceRecordTests() + { + instance = new TranscribeUtteranceRecord( + saveRecording: (bool)TestHelpers.getTestValue(typeof(bool)), + maxLengthSec: (int)TestHelpers.getTestValue(typeof(int)), + rcrdTerminationSilenceTimeMs: (int)TestHelpers.getTestValue(typeof(int)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TranscribeUtteranceRecord + /// + [Fact] + public void TranscribeUtteranceRecordInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'SaveRecording' + /// + [Fact] + public void SaveRecordingTest() + { + instance.SaveRecording = false; + Assert.False(instance.SaveRecording); + } + + /// + /// Test the property 'MaxLengthSec' + /// + [Fact] + public void MaxLengthSecTest() + { + instance.MaxLengthSec = 1; + Assert.Equal(1, (int)instance.MaxLengthSec); + } + + /// + /// Test the property 'RcrdTerminationSilenceTimeMs' + /// + [Fact] + public void RcrdTerminationSilenceTimeMsTest() + { + instance.RcrdTerminationSilenceTimeMs = 1; + Assert.Equal(1, (int)instance.RcrdTerminationSilenceTimeMs); + } + } +} diff --git a/src/freeclimb.Test/Model/TranscribeUtteranceTests.cs b/src/freeclimb.Test/Model/TranscribeUtteranceTests.cs index d4276e84..30e295a5 100644 --- a/src/freeclimb.Test/Model/TranscribeUtteranceTests.cs +++ b/src/freeclimb.Test/Model/TranscribeUtteranceTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,27 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class TranscribeUtteranceTests + + public class TranscribeUtteranceTests : IDisposable { private TranscribeUtterance instance; public TranscribeUtteranceTests() { - - instance = new TranscribeUtterance("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List(), "TEST_STRING"); - + instance = new TranscribeUtterance( + actionUrl: (string)TestHelpers.getTestValue(typeof(string)), + playBeep: (bool)TestHelpers.getTestValue(typeof(bool)), + record: (TranscribeUtteranceRecord) + TestHelpers.getTestValue(typeof(TranscribeUtteranceRecord)), + privacyForLogging: (bool)TestHelpers.getTestValue(typeof(bool)), + privacyForRecording: (bool)TestHelpers.getTestValue(typeof(bool)), + prompts: (List)TestHelpers.getTestValue(typeof(List)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +63,6 @@ public void TranscribeUtteranceInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'ActionUrl' /// @@ -65,8 +71,8 @@ public void ActionUrlTest() { instance.ActionUrl = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.ActionUrl); - } + /// /// Test the property 'PlayBeep' /// @@ -74,20 +80,21 @@ public void ActionUrlTest() public void PlayBeepTest() { instance.PlayBeep = false; - Assert.Equal(false, instance.PlayBeep); - + Assert.False(instance.PlayBeep); } + /// /// Test the property 'Record' /// [Fact] public void RecordTest() { - TranscribeUtteranceAllOfRecord testObject = new TranscribeUtteranceAllOfRecord(); + TranscribeUtteranceRecord testObject = (TranscribeUtteranceRecord) + TestHelpers.getTestValue(typeof(TranscribeUtteranceRecord)); instance.Record = testObject; Assert.Equal(testObject, instance.Record); - } + /// /// Test the property 'PrivacyForLogging' /// @@ -95,9 +102,9 @@ public void RecordTest() public void PrivacyForLoggingTest() { instance.PrivacyForLogging = false; - Assert.Equal(false, instance.PrivacyForLogging); - + Assert.False(instance.PrivacyForLogging); } + /// /// Test the property 'PrivacyForRecording' /// @@ -105,214 +112,18 @@ public void PrivacyForLoggingTest() public void PrivacyForRecordingTest() { instance.PrivacyForRecording = false; - Assert.Equal(false, instance.PrivacyForRecording); - + Assert.False(instance.PrivacyForRecording); } + /// /// Test the property 'Prompts' /// [Fact] public void PromptsTest() { - - List testList = new List(); + List testList = new List(); instance.Prompts = testList; - Assert.Equal(testList, instance.Prompts); - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - TranscribeUtterance test1 = new TranscribeUtterance("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List(), "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject = new TranscribeUtteranceAllOfRecord(); - test1.Record = RecordtestObject; - test1.PrivacyForLogging = true; - test1.PrivacyForRecording = true; - List testList = new List(); - test1.Prompts = testList; - - TranscribeUtterance test2 = new TranscribeUtterance("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List(), "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject2 = new TranscribeUtteranceAllOfRecord(); - test2.Record = RecordtestObject2; - test2.PrivacyForLogging = true; - test2.PrivacyForRecording = true; - List testList2 = new List(); - test2.Prompts = testList2; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - TranscribeUtterance test1 = new TranscribeUtterance("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List(), "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject = new TranscribeUtteranceAllOfRecord(); - test1.Record = RecordtestObject; - test1.PrivacyForLogging = true; - test1.PrivacyForRecording = true; - List testList = new List(); - test1.Prompts = testList; - - TranscribeUtterance test2 = new TranscribeUtterance("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List(), "TEST_STRING"); - test2.ActionUrl = "ts"; - test2.PlayBeep = false; - TranscribeUtteranceAllOfRecord RecordtestObject2 = new TranscribeUtteranceAllOfRecord(); - test2.Record = RecordtestObject2; - test2.PrivacyForLogging = false; - test2.PrivacyForRecording = false; - List testList2 = null; - test2.Prompts = testList2; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - TranscribeUtterance test1 = new TranscribeUtterance("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List(), "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject = new TranscribeUtteranceAllOfRecord(); - test1.Record = RecordtestObject; - test1.PrivacyForLogging = true; - test1.PrivacyForRecording = true; - List testList = new List(); - test1.Prompts = testList; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - TranscribeUtterance test1 = new TranscribeUtterance("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List(), "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject = new TranscribeUtteranceAllOfRecord(); - test1.Record = RecordtestObject; - test1.PrivacyForLogging = true; - test1.PrivacyForRecording = true; - List testList = new List(); - test1.Prompts = testList; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - TranscribeUtterance test1 = new TranscribeUtterance("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List(), "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject = new TranscribeUtteranceAllOfRecord(); - test1.Record = RecordtestObject; - test1.PrivacyForLogging = true; - test1.PrivacyForRecording = true; - List testList = new List(); - test1.Prompts = testList; - - TranscribeUtterance test2 = new TranscribeUtterance("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List(), "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject2 = new TranscribeUtteranceAllOfRecord(); - test2.Record = RecordtestObject2; - test2.PrivacyForLogging = true; - test2.PrivacyForRecording = true; - List testList2 = new List(); - test2.Prompts = testList2; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - TranscribeUtterance test1 = new TranscribeUtterance("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List(), "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject = new TranscribeUtteranceAllOfRecord(); - test1.Record = RecordtestObject; - test1.PrivacyForLogging = true; - test1.PrivacyForRecording = true; - List testList = new List(); - test1.Prompts = testList; - - TranscribeUtterance test2 = new TranscribeUtterance("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List(), "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject2 = new TranscribeUtteranceAllOfRecord(); - test2.Record = RecordtestObject2; - test2.PrivacyForLogging = true; - test2.PrivacyForRecording = true; - List testList2 = new List(); - test2.Prompts = testList2; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - TranscribeUtterance test1 = new TranscribeUtterance("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List(), "TEST_STRING"); - test1.ActionUrl = "TS"; - test1.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject = new TranscribeUtteranceAllOfRecord(); - test1.Record = RecordtestObject; - test1.PrivacyForLogging = true; - test1.PrivacyForRecording = true; - List testList = new List(); - test1.Prompts = testList; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - TranscribeUtterance test2 = new TranscribeUtterance("TEST_STRING", false, new TranscribeUtteranceAllOfRecord(), false, false, new List(), "TEST_STRING"); - test2.ActionUrl = "TS"; - test2.PlayBeep = true; - TranscribeUtteranceAllOfRecord RecordtestObject2 = new TranscribeUtteranceAllOfRecord(); - test2.Record = RecordtestObject2; - test2.PrivacyForLogging = true; - test2.PrivacyForRecording = true; - List testList2 = new List(); - test2.Prompts = testList2; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(instance.Prompts, testList); } } } diff --git a/src/freeclimb.Test/Model/TranscribeWebhookTests.cs b/src/freeclimb.Test/Model/TranscribeWebhookTests.cs new file mode 100644 index 00000000..1bf5ad24 --- /dev/null +++ b/src/freeclimb.Test/Model/TranscribeWebhookTests.cs @@ -0,0 +1,340 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing TranscribeWebhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class TranscribeWebhookTests : IDisposable + { + private TranscribeWebhook instance; + + public TranscribeWebhookTests() + { + instance = new TranscribeWebhook( + requestType: (string)TestHelpers.getTestValue(typeof(string)), + accountId: (string)TestHelpers.getTestValue(typeof(string)), + callId: (string)TestHelpers.getTestValue(typeof(string)), + from: (string)TestHelpers.getTestValue(typeof(string)), + to: (string)TestHelpers.getTestValue(typeof(string)), + recordingId: (string)TestHelpers.getTestValue(typeof(string)), + recordingUrl: (string)TestHelpers.getTestValue(typeof(string)), + recordingSize: (int)TestHelpers.getTestValue(typeof(int)), + recordingFormat: (string)TestHelpers.getTestValue(typeof(string)), + recordingDurationMs: (int)TestHelpers.getTestValue(typeof(int)), + termReason: (TranscribeTermReason) + TestHelpers.getTestValue(typeof(TranscribeTermReason)), + recordTermReason: (RecordUtteranceTermReason) + TestHelpers.getTestValue(typeof(RecordUtteranceTermReason)), + digit: (string)TestHelpers.getTestValue(typeof(string)), + privacyForLogging: (bool)TestHelpers.getTestValue(typeof(bool)), + privacyForRecording: (bool)TestHelpers.getTestValue(typeof(bool)), + bargeInReason: (BargeInReason)TestHelpers.getTestValue(typeof(BargeInReason)), + bargedInPromptNo: (int)TestHelpers.getTestValue(typeof(int)), + bargedInPromptMs: (int)TestHelpers.getTestValue(typeof(int)), + bargedInPromptLoopNo: (int)TestHelpers.getTestValue(typeof(int)), + bargeInTimeMs: (int)TestHelpers.getTestValue(typeof(int)), + transcript: (string)TestHelpers.getTestValue(typeof(string)), + transcribeReason: (TranscribeReason) + TestHelpers.getTestValue(typeof(TranscribeReason)), + transcriptionDurationMs: (int)TestHelpers.getTestValue(typeof(int)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of TranscribeWebhook + /// + [Fact] + public void TranscribeWebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + + /// + /// Test the property 'AccountId' + /// + [Fact] + public void AccountIdTest() + { + instance.AccountId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.AccountId); + } + + /// + /// Test the property 'CallId' + /// + [Fact] + public void CallIdTest() + { + instance.CallId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.CallId); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + instance.From = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.From); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + instance.To = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.To); + } + + /// + /// Test the property 'RecordingId' + /// + [Fact] + public void RecordingIdTest() + { + instance.RecordingId = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingId); + } + + /// + /// Test the property 'RecordingUrl' + /// + [Fact] + public void RecordingUrlTest() + { + instance.RecordingUrl = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingUrl); + } + + /// + /// Test the property 'RecordingSize' + /// + [Fact] + public void RecordingSizeTest() + { + instance.RecordingSize = 1; + Assert.Equal(1, (int)instance.RecordingSize); + } + + /// + /// Test the property 'RecordingFormat' + /// + [Fact] + public void RecordingFormatTest() + { + instance.RecordingFormat = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.RecordingFormat); + } + + /// + /// Test the property 'RecordingDurationMs' + /// + [Fact] + public void RecordingDurationMsTest() + { + instance.RecordingDurationMs = 1; + Assert.Equal(1, (int)instance.RecordingDurationMs); + } + + /// + /// Test the property 'TermReason' + /// + [Fact] + public void TermReasonTest() + { + instance.TermReason = TranscribeTermReason.ERROR; + Assert.Equal(TranscribeTermReason.ERROR, instance.TermReason); + instance.TermReason = TranscribeTermReason.COMPLETED; + Assert.Equal(TranscribeTermReason.COMPLETED, instance.TermReason); + } + + /// + /// Test the property 'RecordTermReason' + /// + [Fact] + public void RecordTermReasonTest() + { + instance.RecordTermReason = RecordUtteranceTermReason.FINISH_KEY; + Assert.Equal(RecordUtteranceTermReason.FINISH_KEY, instance.RecordTermReason); + instance.RecordTermReason = RecordUtteranceTermReason.TIMEOUT; + Assert.Equal(RecordUtteranceTermReason.TIMEOUT, instance.RecordTermReason); + instance.RecordTermReason = RecordUtteranceTermReason.HANGUP; + Assert.Equal(RecordUtteranceTermReason.HANGUP, instance.RecordTermReason); + instance.RecordTermReason = RecordUtteranceTermReason.MAX_LENGTH; + Assert.Equal(RecordUtteranceTermReason.MAX_LENGTH, instance.RecordTermReason); + } + + /// + /// Test the property 'Digit' + /// + [Fact] + public void DigitTest() + { + instance.Digit = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.Digit); + } + + /// + /// Test the property 'PrivacyForLogging' + /// + [Fact] + public void PrivacyForLoggingTest() + { + instance.PrivacyForLogging = false; + Assert.False(instance.PrivacyForLogging); + } + + /// + /// Test the property 'PrivacyForRecording' + /// + [Fact] + public void PrivacyForRecordingTest() + { + instance.PrivacyForRecording = false; + Assert.False(instance.PrivacyForRecording); + } + + /// + /// Test the property 'BargeInReason' + /// + [Fact] + public void BargeInReasonTest() + { + instance.BargeInReason = BargeInReason.NO_BARGE_IN; + Assert.Equal(BargeInReason.NO_BARGE_IN, instance.BargeInReason); + instance.BargeInReason = BargeInReason.BARGE_IN_BY_DTMF; + Assert.Equal(BargeInReason.BARGE_IN_BY_DTMF, instance.BargeInReason); + instance.BargeInReason = BargeInReason.BARGE_IN_BY_ENERGY; + Assert.Equal(BargeInReason.BARGE_IN_BY_ENERGY, instance.BargeInReason); + } + + /// + /// Test the property 'BargedInPromptNo' + /// + [Fact] + public void BargedInPromptNoTest() + { + instance.BargedInPromptNo = 1; + Assert.Equal(1, (int)instance.BargedInPromptNo); + } + + /// + /// Test the property 'BargedInPromptMs' + /// + [Fact] + public void BargedInPromptMsTest() + { + instance.BargedInPromptMs = 1; + Assert.Equal(1, (int)instance.BargedInPromptMs); + } + + /// + /// Test the property 'BargedInPromptLoopNo' + /// + [Fact] + public void BargedInPromptLoopNoTest() + { + instance.BargedInPromptLoopNo = 1; + Assert.Equal(1, (int)instance.BargedInPromptLoopNo); + } + + /// + /// Test the property 'BargeInTimeMs' + /// + [Fact] + public void BargeInTimeMsTest() + { + instance.BargeInTimeMs = 1; + Assert.Equal(1, (int)instance.BargeInTimeMs); + } + + /// + /// Test the property 'Transcript' + /// + [Fact] + public void TranscriptTest() + { + instance.Transcript = "TEST_STRING"; + Assert.Equal("TEST_STRING", instance.Transcript); + } + + /// + /// Test the property 'TranscribeReason' + /// + [Fact] + public void TranscribeReasonTest() + { + instance.TranscribeReason = TranscribeReason.INTERNAL_ERROR; + Assert.Equal(TranscribeReason.INTERNAL_ERROR, instance.TranscribeReason); + instance.TranscribeReason = TranscribeReason.HANGUP; + Assert.Equal(TranscribeReason.HANGUP, instance.TranscribeReason); + instance.TranscribeReason = TranscribeReason.MAX_LENGTH; + Assert.Equal(TranscribeReason.MAX_LENGTH, instance.TranscribeReason); + instance.TranscribeReason = TranscribeReason.DIGIT; + Assert.Equal(TranscribeReason.DIGIT, instance.TranscribeReason); + instance.TranscribeReason = TranscribeReason.NO_INPUT; + Assert.Equal(TranscribeReason.NO_INPUT, instance.TranscribeReason); + } + + /// + /// Test the property 'TranscriptionDurationMs' + /// + [Fact] + public void TranscriptionDurationMsTest() + { + instance.TranscriptionDurationMs = 1; + Assert.Equal(1, (int)instance.TranscriptionDurationMs); + } + + [Fact] + public void TestDeserializeJsonToTranscribeWebhook() + { + string payload = @"{ ""requestType"": ""transcribe"" }"; + TranscribeWebhook deserialized = TranscribeWebhook.Deserialize(payload); + Assert.IsType(deserialized); + Assert.Equal("transcribe", deserialized.RequestType); + } + } +} diff --git a/src/freeclimb.Test/Model/UnparkTests.cs b/src/freeclimb.Test/Model/UnparkTests.cs index 50b12b09..31539fb4 100644 --- a/src/freeclimb.Test/Model/UnparkTests.cs +++ b/src/freeclimb.Test/Model/UnparkTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,19 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class UnparkTests + + public class UnparkTests : IDisposable { private Unpark instance; public UnparkTests() { - - instance = new Unpark("TEST_STRING"); - + instance = new Unpark(); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -55,7 +54,5 @@ public void UnparkInstanceTest() { Assert.IsType(instance); } - - } } diff --git a/src/freeclimb.Test/Model/UpdateCallRequestTests.cs b/src/freeclimb.Test/Model/UpdateCallRequestTests.cs index 3c922d41..d85ef5f3 100644 --- a/src/freeclimb.Test/Model/UpdateCallRequestTests.cs +++ b/src/freeclimb.Test/Model/UpdateCallRequestTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,22 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class UpdateCallRequestTests + + public class UpdateCallRequestTests : IDisposable { private UpdateCallRequest instance; public UpdateCallRequestTests() { - - instance = new UpdateCallRequest(UpdateCallRequestStatus.CANCELED); - + instance = new UpdateCallRequest( + status: (UpdateCallRequestStatus) + TestHelpers.getTestValue(typeof(UpdateCallRequestStatus)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +58,6 @@ public void UpdateCallRequestInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Status' /// @@ -64,121 +65,9 @@ public void UpdateCallRequestInstanceTest() public void StatusTest() { instance.Status = UpdateCallRequestStatus.CANCELED; - Assert.Equal(instance.Status,UpdateCallRequestStatus.CANCELED); + Assert.Equal(UpdateCallRequestStatus.CANCELED, instance.Status); instance.Status = UpdateCallRequestStatus.COMPLETED; - Assert.Equal(instance.Status,UpdateCallRequestStatus.COMPLETED); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - UpdateCallRequest test1 = new UpdateCallRequest(UpdateCallRequestStatus.CANCELED); - test1.Status = UpdateCallRequestStatus.CANCELED; - - UpdateCallRequest test2 = new UpdateCallRequest(UpdateCallRequestStatus.CANCELED); - test2.Status = UpdateCallRequestStatus.CANCELED; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - UpdateCallRequest test1 = new UpdateCallRequest(UpdateCallRequestStatus.CANCELED); - test1.Status = UpdateCallRequestStatus.CANCELED; - - UpdateCallRequest test2 = new UpdateCallRequest(UpdateCallRequestStatus.CANCELED); - test2.Status = UpdateCallRequestStatus.COMPLETED; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - UpdateCallRequest test1 = new UpdateCallRequest(UpdateCallRequestStatus.CANCELED); - test1.Status = UpdateCallRequestStatus.CANCELED; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - UpdateCallRequest test1 = new UpdateCallRequest(UpdateCallRequestStatus.CANCELED); - test1.Status = UpdateCallRequestStatus.CANCELED; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - UpdateCallRequest test1 = new UpdateCallRequest(UpdateCallRequestStatus.CANCELED); - test1.Status = UpdateCallRequestStatus.CANCELED; - - UpdateCallRequest test2 = new UpdateCallRequest(UpdateCallRequestStatus.CANCELED); - test2.Status = UpdateCallRequestStatus.CANCELED; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - UpdateCallRequest test1 = new UpdateCallRequest(UpdateCallRequestStatus.CANCELED); - test1.Status = UpdateCallRequestStatus.CANCELED; - - UpdateCallRequest test2 = new UpdateCallRequest(UpdateCallRequestStatus.CANCELED); - test2.Status = UpdateCallRequestStatus.CANCELED; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - UpdateCallRequest test1 = new UpdateCallRequest(UpdateCallRequestStatus.CANCELED); - test1.Status = UpdateCallRequestStatus.CANCELED; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - UpdateCallRequest test2 = new UpdateCallRequest(UpdateCallRequestStatus.CANCELED); - test2.Status = UpdateCallRequestStatus.CANCELED; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(UpdateCallRequestStatus.COMPLETED, instance.Status); } } } diff --git a/src/freeclimb.Test/Model/UpdateConferenceParticipantRequestTests.cs b/src/freeclimb.Test/Model/UpdateConferenceParticipantRequestTests.cs index 60a86b79..4ea7b10f 100644 --- a/src/freeclimb.Test/Model/UpdateConferenceParticipantRequestTests.cs +++ b/src/freeclimb.Test/Model/UpdateConferenceParticipantRequestTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,23 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class UpdateConferenceParticipantRequestTests + + public class UpdateConferenceParticipantRequestTests : IDisposable { private UpdateConferenceParticipantRequest instance; public UpdateConferenceParticipantRequestTests() { - - instance = new UpdateConferenceParticipantRequest(false, false, false); - + instance = new UpdateConferenceParticipantRequest( + talk: (bool)TestHelpers.getTestValue(typeof(bool)), + listen: (bool)TestHelpers.getTestValue(typeof(bool)), + dtmfPassThrough: (bool)TestHelpers.getTestValue(typeof(bool)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +59,6 @@ public void UpdateConferenceParticipantRequestInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Talk' /// @@ -64,9 +66,9 @@ public void UpdateConferenceParticipantRequestInstanceTest() public void TalkTest() { instance.Talk = false; - Assert.Equal(false, instance.Talk); - + Assert.False(instance.Talk); } + /// /// Test the property 'Listen' /// @@ -74,9 +76,9 @@ public void TalkTest() public void ListenTest() { instance.Listen = false; - Assert.Equal(false, instance.Listen); - + Assert.False(instance.Listen); } + /// /// Test the property 'DtmfPassThrough' /// @@ -84,143 +86,7 @@ public void ListenTest() public void DtmfPassThroughTest() { instance.DtmfPassThrough = false; - Assert.Equal(false, instance.DtmfPassThrough); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - UpdateConferenceParticipantRequest test1 = new UpdateConferenceParticipantRequest(false, false, false); - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - - UpdateConferenceParticipantRequest test2 = new UpdateConferenceParticipantRequest(false, false, false); - test2.Talk = true; - test2.Listen = true; - test2.DtmfPassThrough = true; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - UpdateConferenceParticipantRequest test1 = new UpdateConferenceParticipantRequest(false, false, false); - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - - UpdateConferenceParticipantRequest test2 = new UpdateConferenceParticipantRequest(false, false, false); - test2.Talk = false; - test2.Listen = false; - test2.DtmfPassThrough = false; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - UpdateConferenceParticipantRequest test1 = new UpdateConferenceParticipantRequest(false, false, false); - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - UpdateConferenceParticipantRequest test1 = new UpdateConferenceParticipantRequest(false, false, false); - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - UpdateConferenceParticipantRequest test1 = new UpdateConferenceParticipantRequest(false, false, false); - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - - UpdateConferenceParticipantRequest test2 = new UpdateConferenceParticipantRequest(false, false, false); - test2.Talk = true; - test2.Listen = true; - test2.DtmfPassThrough = true; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - UpdateConferenceParticipantRequest test1 = new UpdateConferenceParticipantRequest(false, false, false); - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - - UpdateConferenceParticipantRequest test2 = new UpdateConferenceParticipantRequest(false, false, false); - test2.Talk = true; - test2.Listen = true; - test2.DtmfPassThrough = true; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - UpdateConferenceParticipantRequest test1 = new UpdateConferenceParticipantRequest(false, false, false); - test1.Talk = true; - test1.Listen = true; - test1.DtmfPassThrough = true; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - UpdateConferenceParticipantRequest test2 = new UpdateConferenceParticipantRequest(false, false, false); - test2.Talk = true; - test2.Listen = true; - test2.DtmfPassThrough = true; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.False(instance.DtmfPassThrough); } } } diff --git a/src/freeclimb.Test/Model/UpdateConferenceRequestTests.cs b/src/freeclimb.Test/Model/UpdateConferenceRequestTests.cs index 46d3dbfe..5468b25f 100644 --- a/src/freeclimb.Test/Model/UpdateConferenceRequestTests.cs +++ b/src/freeclimb.Test/Model/UpdateConferenceRequestTests.cs @@ -9,23 +9,18 @@ */ - - -using Xunit; - using System; -using System.Linq; -using System.IO; +using System.Collections; using System.Collections.Generic; -using System.Text; -using freeclimb.Api; -using freeclimb.Model; -using freeclimb.Client; +using System.IO; +using System.Linq; using System.Reflection; -using Newtonsoft.Json; -using System.Globalization; +using freeclimb.Client; using freeclimb.Enums; - +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; namespace freeclimb.Test.Model { @@ -36,15 +31,24 @@ namespace freeclimb.Test.Model /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class UpdateConferenceRequestTests + + public class UpdateConferenceRequestTests : IDisposable { private UpdateConferenceRequest instance; public UpdateConferenceRequestTests() { - - instance = new UpdateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, UpdateConferenceRequestStatus.EMPTY); - + instance = new UpdateConferenceRequest( + alias: (string)TestHelpers.getTestValue(typeof(string)), + playBeep: (PlayBeep)TestHelpers.getTestValue(typeof(PlayBeep)), + status: (UpdateConferenceRequestStatus) + TestHelpers.getTestValue(typeof(UpdateConferenceRequestStatus)) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. } /// @@ -56,7 +60,6 @@ public void UpdateConferenceRequestInstanceTest() Assert.IsType(instance); } - /// /// Test the property 'Alias' /// @@ -65,8 +68,8 @@ public void AliasTest() { instance.Alias = "TEST_STRING"; Assert.Equal("TEST_STRING", instance.Alias); - } + /// /// Test the property 'PlayBeep' /// @@ -74,15 +77,15 @@ public void AliasTest() public void PlayBeepTest() { instance.PlayBeep = PlayBeep.ALWAYS; - Assert.Equal(instance.PlayBeep,PlayBeep.ALWAYS); + Assert.Equal(PlayBeep.ALWAYS, instance.PlayBeep); instance.PlayBeep = PlayBeep.NEVER; - Assert.Equal(instance.PlayBeep,PlayBeep.NEVER); + Assert.Equal(PlayBeep.NEVER, instance.PlayBeep); instance.PlayBeep = PlayBeep.ENTRY_ONLY; - Assert.Equal(instance.PlayBeep,PlayBeep.ENTRY_ONLY); + Assert.Equal(PlayBeep.ENTRY_ONLY, instance.PlayBeep); instance.PlayBeep = PlayBeep.EXIT_ONLY; - Assert.Equal(instance.PlayBeep,PlayBeep.EXIT_ONLY); - + Assert.Equal(PlayBeep.EXIT_ONLY, instance.PlayBeep); } + /// /// Test the property 'Status' /// @@ -90,145 +93,9 @@ public void PlayBeepTest() public void StatusTest() { instance.Status = UpdateConferenceRequestStatus.EMPTY; - Assert.Equal(instance.Status,UpdateConferenceRequestStatus.EMPTY); + Assert.Equal(UpdateConferenceRequestStatus.EMPTY, instance.Status); instance.Status = UpdateConferenceRequestStatus.TERMINATED; - Assert.Equal(instance.Status,UpdateConferenceRequestStatus.TERMINATED); - - } - - - /// - /// Test the method 'equalsTrue' - /// - - [Fact] - public void equalsTrueTest() { - UpdateConferenceRequest test1 = new UpdateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, UpdateConferenceRequestStatus.EMPTY); - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Status = UpdateConferenceRequestStatus.EMPTY; - - UpdateConferenceRequest test2 = new UpdateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, UpdateConferenceRequestStatus.EMPTY); - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Status = UpdateConferenceRequestStatus.EMPTY; - - Assert.Equal(test1,test2); - } - - /// - /// Test the method 'equalsFalse' - /// - - [Fact] - public void equalsFalseTest() { - UpdateConferenceRequest test1 = new UpdateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, UpdateConferenceRequestStatus.EMPTY); - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Status = UpdateConferenceRequestStatus.EMPTY; - - UpdateConferenceRequest test2 = new UpdateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, UpdateConferenceRequestStatus.EMPTY); - test2.Alias = "ts"; - test2.PlayBeep = PlayBeep.NEVER; - test2.Status = UpdateConferenceRequestStatus.TERMINATED; - - Assert.NotEqual(test1,test2); - } - - /// - /// Test the method 'hashCodeType' - /// - - [Fact] - public void hashCodeTypeTest() { - UpdateConferenceRequest test1 = new UpdateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, UpdateConferenceRequestStatus.EMPTY); - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Status = UpdateConferenceRequestStatus.EMPTY; - - int hashCode1 = test1.GetHashCode(); - Assert.True(hashCode1.GetType() == typeof(int)); - - } - - /// - /// Test the method 'ToStringType' - /// - - [Fact] - public void ToStringTypeTest() { - UpdateConferenceRequest test1 = new UpdateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, UpdateConferenceRequestStatus.EMPTY); - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Status = UpdateConferenceRequestStatus.EMPTY; - - string toString1 = test1.ToString(); - Assert.True(toString1.GetType() == typeof(string)); - - } - - /// - /// Test the method 'ToStringEquals' - /// - - [Fact] - public void ToStringEqualsTest() { - UpdateConferenceRequest test1 = new UpdateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, UpdateConferenceRequestStatus.EMPTY); - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Status = UpdateConferenceRequestStatus.EMPTY; - - UpdateConferenceRequest test2 = new UpdateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, UpdateConferenceRequestStatus.EMPTY); - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Status = UpdateConferenceRequestStatus.EMPTY; - - string toString1 = test1.ToString(); - string toString2 = test2.ToString(); - Assert.Equal(toString1, toString2); - - } - - /// - /// Test the method 'equals' - /// - - [Fact] - public void equalsTest() { - UpdateConferenceRequest test1 = new UpdateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, UpdateConferenceRequestStatus.EMPTY); - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Status = UpdateConferenceRequestStatus.EMPTY; - - UpdateConferenceRequest test2 = new UpdateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, UpdateConferenceRequestStatus.EMPTY); - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Status = UpdateConferenceRequestStatus.EMPTY; - - Assert.True(test1.Equals(test2)); - } - - /// - /// Test the method 'ToJson' - /// - - [Fact] - public void ToJsonTest() { - UpdateConferenceRequest test1 = new UpdateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, UpdateConferenceRequestStatus.EMPTY); - test1.Alias = "TS"; - test1.PlayBeep = PlayBeep.ALWAYS; - test1.Status = UpdateConferenceRequestStatus.EMPTY; - JsonSerializer jsonSerializer = JsonSerializer.Create(); - jsonSerializer.NullValueHandling = NullValueHandling.Ignore; - StringBuilder strb = new StringBuilder(); - jsonSerializer.Serialize(new StringWriter(strb), test1); - - UpdateConferenceRequest test2 = new UpdateConferenceRequest("TEST_STRING", PlayBeep.ALWAYS, UpdateConferenceRequestStatus.EMPTY); - test2.Alias = "TS"; - test2.PlayBeep = PlayBeep.ALWAYS; - test2.Status = UpdateConferenceRequestStatus.EMPTY; - - Assert.True(strb.Equals(JsonConvert.SerializeObject(test2))); + Assert.Equal(UpdateConferenceRequestStatus.TERMINATED, instance.Status); } } } diff --git a/src/freeclimb.Test/Model/WebhookTests.cs b/src/freeclimb.Test/Model/WebhookTests.cs new file mode 100644 index 00000000..69e8eefd --- /dev/null +++ b/src/freeclimb.Test/Model/WebhookTests.cs @@ -0,0 +1,323 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using freeclimb.Test; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test.Model +{ + /// + /// Class for testing Webhook + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class WebhookTests : IDisposable + { + private Webhook instance; + + public WebhookTests() + { + instance = new Webhook(requestType: (string)TestHelpers.getTestValue(typeof(string))); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Webhook + /// + [Fact] + public void WebhookInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test deserialize a AddToConferenceNotificationWebhook from type Webhook + /// + [Fact] + public void AddToConferenceNotificationWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject( + new AddToConferenceNotificationWebhook().ToJson() + ) + ); + } + + /// + /// Test deserialize a AddToQueueNotificationWebhook from type Webhook + /// + [Fact] + public void AddToQueueNotificationWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new AddToQueueNotificationWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a CallControlWebhook from type Webhook + /// + [Fact] + public void CallControlWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new CallControlWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a CallStatusWebhook from type Webhook + /// + [Fact] + public void CallStatusWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new CallStatusWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a ConferenceRecordingStatusWebhook from type Webhook + /// + [Fact] + public void ConferenceRecordingStatusWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject( + new ConferenceRecordingStatusWebhook().ToJson() + ) + ); + } + + /// + /// Test deserialize a ConferenceStatusWebhook from type Webhook + /// + [Fact] + public void ConferenceStatusWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new ConferenceStatusWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a CreateConferenceWebhook from type Webhook + /// + [Fact] + public void CreateConferenceWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new CreateConferenceWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a DequeueWebhook from type Webhook + /// + [Fact] + public void DequeueWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new DequeueWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a GetDigitsWebhook from type Webhook + /// + [Fact] + public void GetDigitsWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new GetDigitsWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a GetSpeechWebhook from type Webhook + /// + [Fact] + public void GetSpeechWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new GetSpeechWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a InboundCallWebhook from type Webhook + /// + [Fact] + public void InboundCallWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new InboundCallWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a LeaveConferenceWebhook from type Webhook + /// + [Fact] + public void LeaveConferenceWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new LeaveConferenceWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a MachineDetectedWebhook from type Webhook + /// + [Fact] + public void MachineDetectedWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new MachineDetectedWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a MessageDeliveryWebhook from type Webhook + /// + [Fact] + public void MessageDeliveryWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new MessageDeliveryWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a MessageStatusWebhook from type Webhook + /// + [Fact] + public void MessageStatusWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new MessageStatusWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a OutDialApiConnectWebhook from type Webhook + /// + [Fact] + public void OutDialApiConnectWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new OutDialApiConnectWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a OutDialConnectWebhook from type Webhook + /// + [Fact] + public void OutDialConnectWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new OutDialConnectWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a OutDialStartWebhook from type Webhook + /// + [Fact] + public void OutDialStartWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new OutDialStartWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a QueueWaitWebhook from type Webhook + /// + [Fact] + public void QueueWaitWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new QueueWaitWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a RecordWebhook from type Webhook + /// + [Fact] + public void RecordWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new RecordWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a RedirectWebhook from type Webhook + /// + [Fact] + public void RedirectWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new RedirectWebhook().ToJson()) + ); + } + + /// + /// Test deserialize a RemoveFromQueueNotificationWebhook from type Webhook + /// + [Fact] + public void RemoveFromQueueNotificationWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject( + new RemoveFromQueueNotificationWebhook().ToJson() + ) + ); + } + + /// + /// Test deserialize a TranscribeWebhook from type Webhook + /// + [Fact] + public void TranscribeWebhookDeserializeFromWebhookTest() + { + Assert.IsType( + JsonConvert.DeserializeObject(new TranscribeWebhook().ToJson()) + ); + } + + /// + /// Test the property 'RequestType' + /// + [Fact] + public void RequestTypeTest() { } + } +} diff --git a/src/freeclimb.Test/TestHelpers.cs b/src/freeclimb.Test/TestHelpers.cs new file mode 100644 index 00000000..a02835f5 --- /dev/null +++ b/src/freeclimb.Test/TestHelpers.cs @@ -0,0 +1,316 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using freeclimb.Client; +using freeclimb.Enums; +using freeclimb.Model; +using Newtonsoft.Json; +using Xunit; + +namespace freeclimb.Test +{ + /// + /// Class for testing AccountStatus + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + + public class TestHelpers + { + public static object getTestValue(Type type) + { + if (type == typeof(int)) + { + return 1; + } + if (type == typeof(Nullable)) + { + return 1; + } + if (type == typeof(string)) + { + return "TEST_STRING"; + } + if (type == typeof(decimal)) + { + return new decimal(0.1); + } + if (type == typeof(Nullable)) + { + return new decimal(0.1); + } + if (type == typeof(bool)) + { + return true; + } + if (type == typeof(Nullable)) + { + return true; + } + if (type == typeof(CallStatus)) + { + return CallStatusValueConverter.FromString("completed"); + } + if (type == typeof(CallDirection)) + { + return CallDirectionValueConverter.FromString("inbound"); + } + if (type == typeof(GetDigitsReason)) + { + return GetDigitsReasonValueConverter.FromString("timeout"); + } + if (type == typeof(LogLevel)) + { + return LogLevelValueConverter.FromString("info"); + } + if (type == typeof(CallEndedReason)) + { + return CallEndedReasonValueConverter.FromString("busy"); + } + if (type == typeof(SMSTenDLCBrandEntityType)) + { + return SMSTenDLCBrandEntityTypeValueConverter.FromString("PUBLIC_PROFIT"); + } + if (type == typeof(SMSTenDLCBrandStockExchange)) + { + return SMSTenDLCBrandStockExchangeValueConverter.FromString("NONE"); + } + if (type == typeof(SMSTenDLCBrandRelationship)) + { + return SMSTenDLCBrandRelationshipValueConverter.FromString("BASIC_ACCOUNT"); + } + if (type == typeof(SMSTenDLCBrandAltBusinessIdType)) + { + return SMSTenDLCBrandAltBusinessIdTypeValueConverter.FromString("NONE"); + } + if (type == typeof(SMSTenDLCBrandIdentityStatus)) + { + return SMSTenDLCBrandIdentityStatusValueConverter.FromString("SELF_DECLARED"); + } + if (type == typeof(PlayBeep)) + { + return PlayBeepValueConverter.FromString("always"); + } + if (type == typeof(UpdateCallRequestStatus)) + { + return UpdateCallRequestStatusValueConverter.FromString("canceled"); + } + if (type == typeof(QueueResultStatus)) + { + return QueueResultStatusValueConverter.FromString("queueFull"); + } + if (type == typeof(ConferenceStatus)) + { + return ConferenceStatusValueConverter.FromString("empty"); + } + if (type == typeof(MachineType)) + { + return MachineTypeValueConverter.FromString("answering machine"); + } + if (type == typeof(SMSTenDLCCampaignStatus)) + { + return SMSTenDLCCampaignStatusValueConverter.FromString("ACTIVE"); + } + if (type == typeof(SMSTenDLCPartnerCampaignStatus)) + { + return SMSTenDLCPartnerCampaignStatusValueConverter.FromString("ACTIVE"); + } + if (type == typeof(SMSTollFreeCampaignRegistrationStatus)) + { + return SMSTollFreeCampaignRegistrationStatusValueConverter.FromString( + "UNREGISTERED" + ); + } + if (type == typeof(MessageStatus)) + { + return MessageStatusValueConverter.FromString("new"); + } + if (type == typeof(RecordUtteranceTermReason)) + { + return RecordUtteranceTermReasonValueConverter.FromString("finishKey"); + } + if (type == typeof(GrammarType)) + { + return GrammarTypeValueConverter.FromString("URL"); + } + if (type == typeof(CompletionResultStatus)) + { + return CompletionResultStatusValueConverter.FromString("success"); + } + if (type == typeof(AnsweredBy)) + { + return AnsweredByValueConverter.FromString("human"); + } + if (type == typeof(IfMachine)) + { + return IfMachineValueConverter.FromString("redirect"); + } + if (type == typeof(AccountType)) + { + return AccountTypeValueConverter.FromString("trial"); + } + if (type == typeof(AccountStatus)) + { + return AccountStatusValueConverter.FromString("closed"); + } + if (type == typeof(TranscribeTermReason)) + { + return TranscribeTermReasonValueConverter.FromString("error"); + } + if (type == typeof(TranscribeReason)) + { + return TranscribeReasonValueConverter.FromString("internalError"); + } + if (type == typeof(BargeInReason)) + { + return BargeInReasonValueConverter.FromString("noBargeIn"); + } + if (type == typeof(GetSpeechReason)) + { + return GetSpeechReasonValueConverter.FromString("error"); + } + if (type == typeof(UpdateConferenceRequestStatus)) + { + return UpdateConferenceRequestStatusValueConverter.FromString("empty"); + } + if (type == typeof(Capabilities)) + { + return new Capabilities(false, false, false, false, false); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(List)) + { + return new List(); + } + if (type == typeof(Capabilities)) + { + return new Capabilities( + voice: false, + sms: false, + tenDLC: false, + tollFree: false, + shortCode: false + ); + } + if (type == typeof(TFN)) + { + return new TFN(campaignId: "TEST_CAMPAIGN"); + } + if (type == typeof(Dictionary)) + { + return new Dictionary(); + } + if (type == typeof(TranscribeUtteranceRecord)) + { + return new TranscribeUtteranceRecord(); + } + if (type == typeof(SMSTenDLCPartnerCampaignBrand)) + { + return new SMSTenDLCPartnerCampaignBrand( + firstName: "TEST_FIRST_NAME", + lastName: "TEST_LAST_NAME", + displayName: "TEST_DISPLAY_NAME", + companyName: "TEST_COMPANY_NAME", + website: "TEST_WEBSITE", + evpVettingScore: 0, + accountId: "TEST_ACCOUNT_ID", + phone: "TEST_PHONE_NUMBER", + email: "TEST_EMAIL" + ); + } + if (type == typeof(DateTime)) + { + return DateTime.Today; + } + if (type == typeof(Nullable)) + { + return DateTime.Today; + } + if (type == typeof(DateOnly)) + { + return DateOnly.FromDateTime(DateTime.Now); + } + if (type == typeof(Nullable)) + { + return DateOnly.FromDateTime(DateTime.Now); + } + if (type == typeof(Object)) + { + return new Dictionary(); + } + throw new ArgumentException("Provided type has no test value", type.ToString()); + } + } +} diff --git a/src/freeclimb.Test/Utils/RequestVerifierTests.cs b/src/freeclimb.Test/Utils/RequestVerifierTests.cs index 487aa55f..6cdfa8ca 100644 --- a/src/freeclimb.Test/Utils/RequestVerifierTests.cs +++ b/src/freeclimb.Test/Utils/RequestVerifierTests.cs @@ -1,7 +1,6 @@ -using Xunit; - -using freeclimb.Utils; using System; +using freeclimb.Utils; +using Xunit; namespace freeclimb.Test.Utils { @@ -9,7 +8,6 @@ public class RequestVerifierTests : IDisposable { private RequestVerifier instance; - public RequestVerifierTests() { RequestVerifier instance = new RequestVerifier(); @@ -35,123 +33,237 @@ public void checkRequestBodyTest() { string requestBody = ""; string signingSecret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793"; - string requestHeader = "t=1679931346,v1=4945505e46930b6e31df721c069f10cd3a4cfb3c8e2ec67d2663fae49f95644f,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; + string requestHeader = + "t=1679931346,v1=4945505e46930b6e31df721c069f10cd3a4cfb3c8e2ec67d2663fae49f95644f,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; int tolerance = 5 * 60 * 1000; - Action act = () => RequestVerifier.verifyRequestSignature(requestBody, requestHeader, signingSecret, tolerance); + Action act = () => + RequestVerifier.verifyRequestSignature( + requestBody, + requestHeader, + signingSecret, + tolerance + ); Exception exception = Assert.Throws(act); Assert.Equal("Request Body cannot be empty or null", exception.Message); } + [Fact] public void checkRequestHeaderTest() { - string requestBody = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; + string requestBody = + "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; string signingSecret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793"; string requestHeader = "t=1679944186,"; int tolerance = 5 * 60 * 1000; - Action act = () => RequestVerifier.verifyRequestSignature(requestBody, requestHeader, signingSecret, tolerance); + Action act = () => + RequestVerifier.verifyRequestSignature( + requestBody, + requestHeader, + signingSecret, + tolerance + ); Exception exception = Assert.Throws(act); - Assert.Equal("Error with request header, signatures are not present", exception.Message); + Assert.Equal( + "Error with request header, signatures are not present", + exception.Message + ); } + [Fact] public void checkRequestHeaderTest2() { - string requestBody = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; + string requestBody = + "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; string signingSecret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793"; - string requestHeader = "v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; + string requestHeader = + "v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; int tolerance = 5 * 60 * 1000; - Action act = () => RequestVerifier.verifyRequestSignature(requestBody, requestHeader, signingSecret, tolerance); + Action act = () => + RequestVerifier.verifyRequestSignature( + requestBody, + requestHeader, + signingSecret, + tolerance + ); Exception exception = Assert.Throws(act); Assert.Equal("Error with request header, timestamp is not present", exception.Message); } + [Fact] public void checkRequestHeaderTest3() { - string requestBody = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; + string requestBody = + "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; string signingSecret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793"; string requestHeader = ""; int tolerance = 5 * 60; - Action act = () => RequestVerifier.verifyRequestSignature(requestBody, requestHeader, signingSecret, tolerance); + Action act = () => + RequestVerifier.verifyRequestSignature( + requestBody, + requestHeader, + signingSecret, + tolerance + ); Exception exception = Assert.Throws(act); Assert.Equal("Error with request header, Request header is empty", exception.Message); } + [Fact] public void checkSigningSecretTest() { - string requestBody = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; + string requestBody = + "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; string signingSecret = ""; - string requestHeader = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; + string requestHeader = + "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; int tolerance = 5 * 60; - Action act = () => RequestVerifier.verifyRequestSignature(requestBody, requestHeader, signingSecret, tolerance); + Action act = () => + RequestVerifier.verifyRequestSignature( + requestBody, + requestHeader, + signingSecret, + tolerance + ); Exception exception = Assert.Throws(act); Assert.Equal("Signing secret cannot be empty or null", exception.Message); } + [Fact] public void checkToleranceTest() { - string requestBody = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; + string requestBody = + "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; string signingSecret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793"; - string requestHeader = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; + string requestHeader = + "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; int tolerance = int.MaxValue; - Action act = () => RequestVerifier.verifyRequestSignature(requestBody, requestHeader, signingSecret, tolerance); + Action act = () => + RequestVerifier.verifyRequestSignature( + requestBody, + requestHeader, + signingSecret, + tolerance + ); Exception exception = Assert.Throws(act); Assert.Equal("Tolerance value must be a positive integer", exception.Message); } + [Fact] public void checkToleranceTest2() { - string requestBody = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; + string requestBody = + "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; string signingSecret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793"; - string requestHeader = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; + string requestHeader = + "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; int tolerance = -5; - Action act = () => RequestVerifier.verifyRequestSignature(requestBody, requestHeader, signingSecret, tolerance); + Action act = () => + RequestVerifier.verifyRequestSignature( + requestBody, + requestHeader, + signingSecret, + tolerance + ); Exception exception = Assert.Throws(act); Assert.Equal("Tolerance value must be a positive integer", exception.Message); } + [Fact] public void checkToleranceTest3() { - string requestBody = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; + string requestBody = + "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; string signingSecret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793"; - string requestHeader = "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; + string requestHeader = + "t=1679944186,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; int tolerance = 0; - Action act = () => RequestVerifier.verifyRequestSignature(requestBody, requestHeader, signingSecret, tolerance); + Action act = () => + RequestVerifier.verifyRequestSignature( + requestBody, + requestHeader, + signingSecret, + tolerance + ); Exception exception = Assert.Throws(act); Assert.Equal("Tolerance value must be a positive integer", exception.Message); } + [Fact] public void verifyToleranceTest() { - string requestBody = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; + string requestBody = + "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; string signingSecret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793"; int currentTime = (int)((DateTimeOffset)DateTime.UtcNow).ToUnixTimeSeconds(); string requestTime = (currentTime - (6 * 60)).ToString(); - string requestHeader = "t=" + requestTime + ",v1=1d798c86e977ff734dec3a8b8d67fe8621dcc1df46ef4212e0bfe2e122b01bfd,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; + string requestHeader = + "t=" + + requestTime + + ",v1=1d798c86e977ff734dec3a8b8d67fe8621dcc1df46ef4212e0bfe2e122b01bfd,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; int tolerance = 5 * 60; - Action act = () => RequestVerifier.verifyRequestSignature(requestBody, requestHeader, signingSecret, tolerance); + Action act = () => + RequestVerifier.verifyRequestSignature( + requestBody, + requestHeader, + signingSecret, + tolerance + ); Exception exception = Assert.Throws(act); - Assert.Equal("Request time exceeded tolerance threshold. Request: " + requestTime + ", CurrentTime: " + currentTime.ToString() + ", tolerance: 300", exception.Message); + Assert.Equal( + "Request time exceeded tolerance threshold. Request: " + + requestTime + + ", CurrentTime: " + + currentTime.ToString() + + ", tolerance: 300", + exception.Message + ); } + [Fact] public void verifySignatureTest() { - string requestBody = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; + string requestBody = + "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; string signingSecret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793"; int currentTime = (int)((DateTimeOffset)DateTime.UtcNow).ToUnixTimeSeconds(); - string requestHeader = "t=" + currentTime.ToString() + ",v1=1d798c86e977ff734dec3a8b8d67fe8621dcc1df46ef4212e0bfe2e122b01bfd,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; + string requestHeader = + "t=" + + currentTime.ToString() + + ",v1=1d798c86e977ff734dec3a8b8d67fe8621dcc1df46ef4212e0bfe2e122b01bfd,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; int tolerance = 5 * 60; - Action act = () => RequestVerifier.verifyRequestSignature(requestBody, requestHeader, signingSecret, tolerance); + Action act = () => + RequestVerifier.verifyRequestSignature( + requestBody, + requestHeader, + signingSecret, + tolerance + ); Exception exception = Assert.Throws(act); - Assert.Equal("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", exception.Message); + Assert.Equal( + "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", + exception.Message + ); } + [Fact] public void verifyRequestSignatureTest() { - string requestBody = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; + string requestBody = + "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; string signingSecret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793"; - string requestHeader = "t=2140000000,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=814978ae2603594cfc9310680625ea6cdb958d7c940f0695726048f1e4d7af9e"; + string requestHeader = + "t=2140000000,v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=814978ae2603594cfc9310680625ea6cdb958d7c940f0695726048f1e4d7af9e"; int tolerance = 5 * 60; - var exception = Record.Exception(() => RequestVerifier.verifyRequestSignature(requestBody, requestHeader, signingSecret, tolerance)); + var exception = Record.Exception( + () => + RequestVerifier.verifyRequestSignature( + requestBody, + requestHeader, + signingSecret, + tolerance + ) + ); Assert.Null(exception); } } -} \ No newline at end of file +} diff --git a/src/freeclimb.Test/Utils/SignatureInformationTests.cs b/src/freeclimb.Test/Utils/SignatureInformationTests.cs index a9bda114..a8706e7b 100644 --- a/src/freeclimb.Test/Utils/SignatureInformationTests.cs +++ b/src/freeclimb.Test/Utils/SignatureInformationTests.cs @@ -1,7 +1,6 @@ -using Xunit; - -using freeclimb.Utils; using System; +using freeclimb.Utils; +using Xunit; namespace freeclimb.Test.Utils { @@ -13,7 +12,10 @@ public class SignatureInformationTests : IDisposable public SignatureInformationTests() { - string requestHeader = "t=" + timestamp.ToString() + ",v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; + string requestHeader = + "t=" + + timestamp.ToString() + + ",v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; instance = new SignatureInformation(requestHeader); } @@ -32,7 +34,6 @@ public void SignatureInformationInstanceTests() //Assert.IsType(instance); } - /// /// Test the method 'isRequestTimeValid' /// @@ -40,40 +41,51 @@ public void SignatureInformationInstanceTests() public void isRequestTimeValidTest() { //For test purposes, this relates to three days, we also want to ensure that the signature header remains the same during tests - string requestHeader = "t=" + instance.getCurrentUnixTime().ToString() + ",v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; + string requestHeader = + "t=" + + instance.getCurrentUnixTime().ToString() + + ",v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; instance = new SignatureInformation(requestHeader); int tolerance = 5 * 60; Boolean isRequestTimeValid = instance.isRequestTimeValid(tolerance); Assert.Equal(isRequestTimeValid, true); } + [Fact] public void isRequestTimeValidTest2() { //For test purposes, this relates to three days, we also want to ensure that the signature header remains the same during tests - string requestHeader = "t=" + (instance.getCurrentUnixTime() - (600 * 60)).ToString() + ",v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; + string requestHeader = + "t=" + + (instance.getCurrentUnixTime() - (600 * 60)).ToString() + + ",v1=c3957749baf61df4b1506802579cc69a74c77a1ae21447b930e5a704f9ec4120,v1=1ba18712726898fbbe48cd862dd096a709f7ad761a5bab14bda9ac24d963a6a8"; instance = new SignatureInformation(requestHeader); int tolerance = 500 * 60; Boolean isRequestTimeValid = instance.isRequestTimeValid(tolerance); Assert.Equal(isRequestTimeValid, false); } + /// /// Test the method 'isSignatureSafe' /// [Fact] public void isSignatureSafeTest() { - string requestBody = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; + string requestBody = + "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; string signingSecret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7793"; Boolean isSignatureSafe = instance.isSignatureSafe(requestBody, signingSecret); Assert.Equal(isSignatureSafe, true); } + [Fact] public void isSignatureSafeTest2() { - string requestBody = "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; + string requestBody = + "{\"accountId\":\"AC1334ffb694cd8d969f51cddf5f7c9b478546d50c\",\"callId\":\"CAccb0b00506553cda09b51c5477f672a49e0b2213\",\"callStatus\":\"ringing\",\"conferenceId\":null,\"direction\":\"inbound\",\"from\":\"+13121000109\",\"parentCallId\":null,\"queueId\":null,\"requestType\":\"inboundCall\",\"to\":\"+13121000096\"}"; string signingSecret = "sigsec_ead6d3b6904196c60835d039e91b3341c77a7794"; Boolean isSignatureSafe = instance.isSignatureSafe(requestBody, signingSecret); Assert.Equal(isSignatureSafe, false); } } -} \ No newline at end of file +} diff --git a/src/freeclimb.Test/freeclimb.Test.csproj b/src/freeclimb.Test/freeclimb.Test.csproj index 4ae5c992..f236f7b1 100644 --- a/src/freeclimb.Test/freeclimb.Test.csproj +++ b/src/freeclimb.Test/freeclimb.Test.csproj @@ -3,18 +3,18 @@ freeclimb.Test freeclimb.Test - net6.0 + net8.0 false + annotations - - - + + + - diff --git a/src/freeclimb/Api/DefaultApi.cs b/src/freeclimb/Api/DefaultApi.cs index 9672252c..7173efab 100644 --- a/src/freeclimb/Api/DefaultApi.cs +++ b/src/freeclimb/Api/DefaultApi.cs @@ -17,12 +17,11 @@ using System.Net.Mime; using freeclimb.Client; using freeclimb.Enums; -using freeclimb.Utils; using freeclimb.Model; +using freeclimb.Utils; namespace freeclimb.Api { - /// /// Represents a collection of functions to interact with the API endpoints /// @@ -34,6 +33,7 @@ public interface IDefaultApiSync : IApiAccessor /// /// Thrown when fails to make API call /// Incoming Number transaction details + /// IncomingNumberResult IncomingNumberResult BuyAPhoneNumber(BuyIncomingNumberRequest buyIncomingNumberRequest); @@ -41,91 +41,124 @@ public interface IDefaultApiSync : IApiAccessor /// Buy a Phone Number /// /// - /// + /// /// /// Thrown when fails to make API call /// Incoming Number transaction details + /// ApiResponse of IncomingNumberResult - ApiResponse BuyAPhoneNumberWithHttpInfo(BuyIncomingNumberRequest buyIncomingNumberRequest); + ApiResponse BuyAPhoneNumberWithHttpInfo( + BuyIncomingNumberRequest buyIncomingNumberRequest + ); + /// /// Create a Conference /// /// Thrown when fails to make API call /// Conference to create (optional) + /// ConferenceResult - ConferenceResult CreateAConference(CreateConferenceRequest createConferenceRequest = default(CreateConferenceRequest)); + ConferenceResult CreateAConference( + CreateConferenceRequest? createConferenceRequest = default(CreateConferenceRequest?) + ); /// /// Create a Conference /// /// - /// + /// /// /// Thrown when fails to make API call /// Conference to create (optional) + /// ApiResponse of ConferenceResult - ApiResponse CreateAConferenceWithHttpInfo(CreateConferenceRequest createConferenceRequest = default(CreateConferenceRequest)); + ApiResponse CreateAConferenceWithHttpInfo( + CreateConferenceRequest? createConferenceRequest = default(CreateConferenceRequest?) + ); + /// /// Create a Queue /// /// Thrown when fails to make API call /// Queue details used to create a queue (optional) + /// QueueResult - QueueResult CreateAQueue(QueueRequest queueRequest = default(QueueRequest)); + QueueResult CreateAQueue(QueueRequest? queueRequest = default(QueueRequest?)); /// /// Create a Queue /// /// - /// + /// /// /// Thrown when fails to make API call /// Queue details used to create a queue (optional) + /// ApiResponse of QueueResult - ApiResponse CreateAQueueWithHttpInfo(QueueRequest queueRequest = default(QueueRequest)); + ApiResponse CreateAQueueWithHttpInfo( + QueueRequest? queueRequest = default(QueueRequest?) + ); + /// /// Create an application /// /// Thrown when fails to make API call /// Application Details (optional) + /// ApplicationResult - ApplicationResult CreateAnApplication(ApplicationRequest applicationRequest = default(ApplicationRequest)); + ApplicationResult CreateAnApplication( + ApplicationRequest? applicationRequest = default(ApplicationRequest?) + ); /// /// Create an application /// /// - /// + /// /// /// Thrown when fails to make API call /// Application Details (optional) + /// ApiResponse of ApplicationResult - ApiResponse CreateAnApplicationWithHttpInfo(ApplicationRequest applicationRequest = default(ApplicationRequest)); + ApiResponse CreateAnApplicationWithHttpInfo( + ApplicationRequest? applicationRequest = default(ApplicationRequest?) + ); + /// /// Query the knowledge base /// /// Thrown when fails to make API call /// A string that uniquely identifies the KnowledgeBase resource. /// Completion request details (optional) + /// CompletionResult - CompletionResult CreateKnowledgeBaseCompletion(string knowledgeBaseId, CompletionRequest completionRequest = default(CompletionRequest)); + CompletionResult CreateKnowledgeBaseCompletion( + string knowledgeBaseId, + CompletionRequest? completionRequest = default(CompletionRequest?) + ); /// /// Query the knowledge base /// /// - /// + /// /// /// Thrown when fails to make API call /// A string that uniquely identifies the KnowledgeBase resource. /// Completion request details (optional) + /// ApiResponse of CompletionResult - ApiResponse CreateKnowledgeBaseCompletionWithHttpInfo(string knowledgeBaseId, CompletionRequest completionRequest = default(CompletionRequest)); + ApiResponse CreateKnowledgeBaseCompletionWithHttpInfo( + string knowledgeBaseId, + CompletionRequest? completionRequest = default(CompletionRequest?) + ); + /// /// Delete a Recording /// /// Thrown when fails to make API call /// String that uniquely identifies this recording resource. + /// void DeleteARecording(string recordingId); @@ -133,17 +166,20 @@ public interface IDefaultApiSync : IApiAccessor /// Delete a Recording /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this recording resource. + /// ApiResponse of Object(void) ApiResponse DeleteARecordingWithHttpInfo(string recordingId); + /// /// Delete an application /// /// Thrown when fails to make API call /// String that uniquely identifies this application resource. + /// void DeleteAnApplication(string applicationId); @@ -151,17 +187,20 @@ public interface IDefaultApiSync : IApiAccessor /// Delete an application /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this application resource. + /// ApiResponse of Object(void) ApiResponse DeleteAnApplicationWithHttpInfo(string applicationId); + /// /// Delete an Incoming Number /// /// Thrown when fails to make API call /// String that uniquely identifies this phone number resource. + /// void DeleteAnIncomingNumber(string phoneNumberId); @@ -169,18 +208,21 @@ public interface IDefaultApiSync : IApiAccessor /// Delete an Incoming Number /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this phone number resource. + /// ApiResponse of Object(void) ApiResponse DeleteAnIncomingNumberWithHttpInfo(string phoneNumberId); + /// /// Dequeue a Member /// /// Thrown when fails to make API call /// String that uniquely identifies the Queue that the Member belongs to. /// ID if the Call that the Member belongs to + /// QueueMember QueueMember DequeueAMember(string queueId, string callId); @@ -188,18 +230,21 @@ public interface IDefaultApiSync : IApiAccessor /// Dequeue a Member /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies the Queue that the Member belongs to. /// ID if the Call that the Member belongs to + /// ApiResponse of QueueMember ApiResponse DequeueAMemberWithHttpInfo(string queueId, string callId); + /// /// Dequeue Head Member /// /// Thrown when fails to make API call /// String that uniquely identifies this queue resource. + /// QueueMember QueueMember DequeueHeadMember(string queueId); @@ -207,17 +252,20 @@ public interface IDefaultApiSync : IApiAccessor /// Dequeue Head Member /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this queue resource. + /// ApiResponse of QueueMember ApiResponse DequeueHeadMemberWithHttpInfo(string queueId); + /// /// Download a Recording File /// /// Thrown when fails to make API call /// String that uniquely identifies this recording resource. + /// System.IO.Stream System.IO.Stream DownloadARecordingFile(string recordingId); @@ -225,17 +273,20 @@ public interface IDefaultApiSync : IApiAccessor /// Download a Recording File /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this recording resource. + /// ApiResponse of System.IO.Stream ApiResponse DownloadARecordingFileWithHttpInfo(string recordingId); + /// /// Filter Logs /// /// Thrown when fails to make API call /// Filter logs request paramters + /// LogList LogList FilterLogs(FilterLogsRequest filterLogsRequest); @@ -243,17 +294,20 @@ public interface IDefaultApiSync : IApiAccessor /// Filter Logs /// /// - /// + /// /// /// Thrown when fails to make API call /// Filter logs request paramters + /// ApiResponse of LogList ApiResponse FilterLogsWithHttpInfo(FilterLogsRequest filterLogsRequest); + /// /// Get a Call /// /// Thrown when fails to make API call /// String that uniquely identifies this call resource. + /// CallResult CallResult GetACall(string callId); @@ -261,17 +315,20 @@ public interface IDefaultApiSync : IApiAccessor /// Get a Call /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this call resource. + /// ApiResponse of CallResult ApiResponse GetACallWithHttpInfo(string callId); + /// /// Get a Conference /// /// Thrown when fails to make API call /// A string that uniquely identifies this conference resource. + /// ConferenceResult ConferenceResult GetAConference(string conferenceId); @@ -279,18 +336,21 @@ public interface IDefaultApiSync : IApiAccessor /// Get a Conference /// /// - /// + /// /// /// Thrown when fails to make API call /// A string that uniquely identifies this conference resource. + /// ApiResponse of ConferenceResult ApiResponse GetAConferenceWithHttpInfo(string conferenceId); + /// /// Get a Member /// /// Thrown when fails to make API call /// String that uniquely identifies the Queue that the Member belongs to. /// ID of the Call that the Member belongs to + /// QueueMember QueueMember GetAMember(string queueId, string callId); @@ -298,19 +358,22 @@ public interface IDefaultApiSync : IApiAccessor /// Get a Member /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies the Queue that the Member belongs to. /// ID of the Call that the Member belongs to + /// ApiResponse of QueueMember ApiResponse GetAMemberWithHttpInfo(string queueId, string callId); + /// /// Get a Participant /// /// Thrown when fails to make API call /// ID of the conference this participant is in. /// ID of the Call associated with this participant. + /// ConferenceParticipantResult ConferenceParticipantResult GetAParticipant(string conferenceId, string callId); @@ -318,18 +381,24 @@ public interface IDefaultApiSync : IApiAccessor /// Get a Participant /// /// - /// + /// /// /// Thrown when fails to make API call /// ID of the conference this participant is in. /// ID of the Call associated with this participant. + /// ApiResponse of ConferenceParticipantResult - ApiResponse GetAParticipantWithHttpInfo(string conferenceId, string callId); + ApiResponse GetAParticipantWithHttpInfo( + string conferenceId, + string callId + ); + /// /// Get a Queue /// /// Thrown when fails to make API call /// A string that uniquely identifies this queue resource. + /// QueueResult QueueResult GetAQueue(string queueId); @@ -337,17 +406,20 @@ public interface IDefaultApiSync : IApiAccessor /// Get a Queue /// /// - /// + /// /// /// Thrown when fails to make API call /// A string that uniquely identifies this queue resource. + /// ApiResponse of QueueResult ApiResponse GetAQueueWithHttpInfo(string queueId); + /// /// Get a Recording /// /// Thrown when fails to make API call /// String that uniquely identifies this recording resource. + /// RecordingResult RecordingResult GetARecording(string recordingId); @@ -355,16 +427,19 @@ public interface IDefaultApiSync : IApiAccessor /// Get a Recording /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this recording resource. + /// ApiResponse of RecordingResult ApiResponse GetARecordingWithHttpInfo(string recordingId); + /// /// Get an Account /// /// Thrown when fails to make API call + /// AccountResult AccountResult GetAnAccount(); @@ -372,16 +447,19 @@ public interface IDefaultApiSync : IApiAccessor /// Get an Account /// /// - /// + /// /// /// Thrown when fails to make API call + /// ApiResponse of AccountResult ApiResponse GetAnAccountWithHttpInfo(); + /// /// Get an Application /// /// Thrown when fails to make API call /// A string that uniquely identifies this application resource. + /// ApplicationResult ApplicationResult GetAnApplication(string applicationId); @@ -389,17 +467,20 @@ public interface IDefaultApiSync : IApiAccessor /// Get an Application /// /// - /// + /// /// /// Thrown when fails to make API call /// A string that uniquely identifies this application resource. + /// ApiResponse of ApplicationResult ApiResponse GetAnApplicationWithHttpInfo(string applicationId); + /// /// Get an Incoming Number /// /// Thrown when fails to make API call /// String that uniquely identifies this phone number resource. + /// IncomingNumberResult IncomingNumberResult GetAnIncomingNumber(string phoneNumberId); @@ -407,17 +488,20 @@ public interface IDefaultApiSync : IApiAccessor /// Get an Incoming Number /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this phone number resource. + /// ApiResponse of IncomingNumberResult ApiResponse GetAnIncomingNumberWithHttpInfo(string phoneNumberId); + /// /// Get an SMS Message /// /// Thrown when fails to make API call /// String that uniquely identifies this Message resource. + /// MessageResult MessageResult GetAnSmsMessage(string messageId); @@ -425,17 +509,20 @@ public interface IDefaultApiSync : IApiAccessor /// Get an SMS Message /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this Message resource. + /// ApiResponse of MessageResult ApiResponse GetAnSmsMessageWithHttpInfo(string messageId); + /// /// Get Head Member /// /// Thrown when fails to make API call /// String that uniquely identifies the Queue that the Member belongs to. + /// QueueMember QueueMember GetHeadMember(string queueId); @@ -443,17 +530,20 @@ public interface IDefaultApiSync : IApiAccessor /// Get Head Member /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies the Queue that the Member belongs to. + /// ApiResponse of QueueMember ApiResponse GetHeadMemberWithHttpInfo(string queueId); + /// /// Get a 10DLC SMS Brand /// /// Thrown when fails to make API call /// String that uniquely identifies this brand resource. + /// SMSTenDLCBrand SMSTenDLCBrand GetTenDLCSmsBrand(string brandId); @@ -461,16 +551,19 @@ public interface IDefaultApiSync : IApiAccessor /// Get a 10DLC SMS Brand /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this brand resource. + /// ApiResponse of SMSTenDLCBrand ApiResponse GetTenDLCSmsBrandWithHttpInfo(string brandId); + /// /// Get list of SMS 10DLC Brands /// /// Thrown when fails to make API call + /// SMSTenDLCBrandsListResult SMSTenDLCBrandsListResult GetTenDLCSmsBrands(); @@ -478,16 +571,19 @@ public interface IDefaultApiSync : IApiAccessor /// Get list of SMS 10DLC Brands /// /// - /// + /// /// /// Thrown when fails to make API call + /// ApiResponse of SMSTenDLCBrandsListResult ApiResponse GetTenDLCSmsBrandsWithHttpInfo(); + /// /// Get a 10DLC SMS Campaign /// /// Thrown when fails to make API call /// String that uniquely identifies this campaign resource. + /// SMSTenDLCCampaign SMSTenDLCCampaign GetTenDLCSmsCampaign(string campaignId); @@ -495,35 +591,43 @@ public interface IDefaultApiSync : IApiAccessor /// Get a 10DLC SMS Campaign /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this campaign resource. + /// ApiResponse of SMSTenDLCCampaign ApiResponse GetTenDLCSmsCampaignWithHttpInfo(string campaignId); + /// /// Get list of SMS 10DLC Campaigns /// /// Thrown when fails to make API call /// The unique identifier for a brand (optional) + /// SMSTenDLCCampaignsListResult - SMSTenDLCCampaignsListResult GetTenDLCSmsCampaigns(string brandId = default(string)); + SMSTenDLCCampaignsListResult GetTenDLCSmsCampaigns(string? brandId = default(string?)); /// /// Get list of SMS 10DLC Campaigns /// /// - /// + /// /// /// Thrown when fails to make API call /// The unique identifier for a brand (optional) + /// ApiResponse of SMSTenDLCCampaignsListResult - ApiResponse GetTenDLCSmsCampaignsWithHttpInfo(string brandId = default(string)); + ApiResponse GetTenDLCSmsCampaignsWithHttpInfo( + string? brandId = default(string?) + ); + /// /// Get a 10DLC SMS Partner Campaign /// /// Thrown when fails to make API call /// String that uniquely identifies this campaign resource. + /// SMSTenDLCPartnerCampaign SMSTenDLCPartnerCampaign GetTenDLCSmsPartnerCampaign(string campaignId); @@ -531,35 +635,47 @@ public interface IDefaultApiSync : IApiAccessor /// Get a 10DLC SMS Partner Campaign /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this campaign resource. + /// ApiResponse of SMSTenDLCPartnerCampaign - ApiResponse GetTenDLCSmsPartnerCampaignWithHttpInfo(string campaignId); + ApiResponse GetTenDLCSmsPartnerCampaignWithHttpInfo( + string campaignId + ); + /// /// Get list of SMS 10DLC Partner Campaigns /// /// Thrown when fails to make API call /// The unique identifier for a brand (optional) + /// SMSTenDLCPartnerCampaignsListResult - SMSTenDLCPartnerCampaignsListResult GetTenDLCSmsPartnerCampaigns(string brandId = default(string)); + SMSTenDLCPartnerCampaignsListResult GetTenDLCSmsPartnerCampaigns( + string? brandId = default(string?) + ); /// /// Get list of SMS 10DLC Partner Campaigns /// /// - /// + /// /// /// Thrown when fails to make API call /// The unique identifier for a brand (optional) + /// ApiResponse of SMSTenDLCPartnerCampaignsListResult - ApiResponse GetTenDLCSmsPartnerCampaignsWithHttpInfo(string brandId = default(string)); + ApiResponse GetTenDLCSmsPartnerCampaignsWithHttpInfo( + string? brandId = default(string?) + ); + /// /// Get a TollFree SMS Campaign /// /// Thrown when fails to make API call /// String that uniquely identifies this TollFree Campaign resource. + /// SMSTollFreeCampaign SMSTollFreeCampaign GetTollFreeSmsCampaign(string campaignId); @@ -567,16 +683,19 @@ public interface IDefaultApiSync : IApiAccessor /// Get a TollFree SMS Campaign /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this TollFree Campaign resource. + /// ApiResponse of SMSTollFreeCampaign ApiResponse GetTollFreeSmsCampaignWithHttpInfo(string campaignId); + /// /// Get list of TollFree Campaigns /// /// Thrown when fails to make API call + /// SMSTollFreeCampaignsListResult SMSTollFreeCampaignsListResult GetTollFreeSmsCampaigns(); @@ -584,33 +703,39 @@ public interface IDefaultApiSync : IApiAccessor /// Get list of TollFree Campaigns /// /// - /// + /// /// /// Thrown when fails to make API call + /// ApiResponse of SMSTollFreeCampaignsListResult ApiResponse GetTollFreeSmsCampaignsWithHttpInfo(); + /// /// List Active Queues /// /// Thrown when fails to make API call /// Return only the Queue resources with aliases that exactly match this name. (optional) + /// QueueList - QueueList ListActiveQueues(string alias = default(string)); + QueueList ListActiveQueues(string? alias = default(string?)); /// /// List Active Queues /// /// - /// + /// /// /// Thrown when fails to make API call /// Return only the Queue resources with aliases that exactly match this name. (optional) + /// ApiResponse of QueueList - ApiResponse ListActiveQueuesWithHttpInfo(string alias = default(string)); + ApiResponse ListActiveQueuesWithHttpInfo(string? alias = default(string?)); + /// /// List All Account Logs /// /// Thrown when fails to make API call + /// LogList LogList ListAllAccountLogs(); @@ -618,29 +743,34 @@ public interface IDefaultApiSync : IApiAccessor /// List All Account Logs /// /// - /// + /// /// /// Thrown when fails to make API call + /// ApiResponse of LogList ApiResponse ListAllAccountLogsWithHttpInfo(); + /// /// List applications /// /// Thrown when fails to make API call /// Return only applications with aliases that exactly match this value. (optional) + /// ApplicationList - ApplicationList ListApplications(string alias = default(string)); + ApplicationList ListApplications(string? alias = default(string?)); /// /// List applications /// /// - /// + /// /// /// Thrown when fails to make API call /// Return only applications with aliases that exactly match this value. (optional) + /// ApiResponse of ApplicationList - ApiResponse ListApplicationsWithHttpInfo(string alias = default(string)); + ApiResponse ListApplicationsWithHttpInfo(string? alias = default(string?)); + /// /// List available numbers /// @@ -655,14 +785,26 @@ public interface IDefaultApiSync : IApiAccessor /// (optional) /// (optional) /// (optional) + /// AvailableNumberList - AvailableNumberList ListAvailableNumbers(string phoneNumber = default(string), string region = default(string), string country = default(string), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?)); + AvailableNumberList ListAvailableNumbers( + string? phoneNumber = default(string?), + string? region = default(string?), + string? country = default(string?), + bool? voiceEnabled = default(bool?), + bool? smsEnabled = default(bool?), + bool? capabilitiesVoice = default(bool?), + bool? capabilitiesSms = default(bool?), + bool? capabilitiesTollFree = default(bool?), + bool? capabilitiesTenDLC = default(bool?), + bool? capabilitiesShortCode = default(bool?) + ); /// /// List available numbers /// /// - /// + /// /// /// Thrown when fails to make API call /// PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. (optional) @@ -675,13 +817,27 @@ public interface IDefaultApiSync : IApiAccessor /// (optional) /// (optional) /// (optional) + /// ApiResponse of AvailableNumberList - ApiResponse ListAvailableNumbersWithHttpInfo(string phoneNumber = default(string), string region = default(string), string country = default(string), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?)); + ApiResponse ListAvailableNumbersWithHttpInfo( + string? phoneNumber = default(string?), + string? region = default(string?), + string? country = default(string?), + bool? voiceEnabled = default(bool?), + bool? smsEnabled = default(bool?), + bool? capabilitiesVoice = default(bool?), + bool? capabilitiesSms = default(bool?), + bool? capabilitiesTollFree = default(bool?), + bool? capabilitiesTenDLC = default(bool?), + bool? capabilitiesShortCode = default(bool?) + ); + /// /// List Call Logs /// /// Thrown when fails to make API call /// String that uniquely identifies this call resource. + /// LogList LogList ListCallLogs(string callId); @@ -689,32 +845,40 @@ public interface IDefaultApiSync : IApiAccessor /// List Call Logs /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this call resource. + /// ApiResponse of LogList ApiResponse ListCallLogsWithHttpInfo(string callId); + /// /// List Call Recordings /// /// Thrown when fails to make API call /// String that uniquely identifies this call resource. /// Only show recordings created on the specified date, in the form *YYYY-MM-DD*. (optional) + /// RecordingList - RecordingList ListCallRecordings(string callId, string dateCreated = default(string)); + RecordingList ListCallRecordings(string callId, string? dateCreated = default(string?)); /// /// List Call Recordings /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this call resource. /// Only show recordings created on the specified date, in the form *YYYY-MM-DD*. (optional) + /// ApiResponse of RecordingList - ApiResponse ListCallRecordingsWithHttpInfo(string callId, string dateCreated = default(string)); + ApiResponse ListCallRecordingsWithHttpInfo( + string callId, + string? dateCreated = default(string?) + ); + /// /// List Calls /// @@ -727,14 +891,24 @@ public interface IDefaultApiSync : IApiAccessor /// Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) /// Only show Calls spawned by the call with this ID. (optional) /// Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) + /// CallList - CallList ListCalls(bool? active = default(bool?), string to = default(string), string from = default(string), CallStatus? status = default(CallStatus?), string startTime = default(string), string endTime = default(string), string parentCallId = default(string), List applicationId = default(List)); + CallList ListCalls( + bool? active = default(bool?), + string? to = default(string?), + string? from = default(string?), + CallStatus? status = default(CallStatus?), + string? startTime = default(string?), + string? endTime = default(string?), + string? parentCallId = default(string?), + List? applicationId = default(List?) + ); /// /// List Calls /// /// - /// + /// /// /// Thrown when fails to make API call /// If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. (optional, default to false) @@ -745,8 +919,19 @@ public interface IDefaultApiSync : IApiAccessor /// Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) /// Only show Calls spawned by the call with this ID. (optional) /// Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) + /// ApiResponse of CallList - ApiResponse ListCallsWithHttpInfo(bool? active = default(bool?), string to = default(string), string from = default(string), CallStatus? status = default(CallStatus?), string startTime = default(string), string endTime = default(string), string parentCallId = default(string), List applicationId = default(List)); + ApiResponse ListCallsWithHttpInfo( + bool? active = default(bool?), + string? to = default(string?), + string? from = default(string?), + CallStatus? status = default(CallStatus?), + string? startTime = default(string?), + string? endTime = default(string?), + string? parentCallId = default(string?), + List? applicationId = default(List?) + ); + /// /// List Conference Recordings /// @@ -754,21 +939,32 @@ public interface IDefaultApiSync : IApiAccessor /// Show only Recordings made during the conference with this ID. /// Show only Recordings made during the Call with this ID. (optional) /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) + /// RecordingList - RecordingList ListConferenceRecordings(string conferenceId, string callId = default(string), string dateCreated = default(string)); + RecordingList ListConferenceRecordings( + string conferenceId, + string? callId = default(string?), + string? dateCreated = default(string?) + ); /// /// List Conference Recordings /// /// - /// + /// /// /// Thrown when fails to make API call /// Show only Recordings made during the conference with this ID. /// Show only Recordings made during the Call with this ID. (optional) /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) + /// ApiResponse of RecordingList - ApiResponse ListConferenceRecordingsWithHttpInfo(string conferenceId, string callId = default(string), string dateCreated = default(string)); + ApiResponse ListConferenceRecordingsWithHttpInfo( + string conferenceId, + string? callId = default(string?), + string? dateCreated = default(string?) + ); + /// /// List Conferences /// @@ -777,22 +973,35 @@ public interface IDefaultApiSync : IApiAccessor /// List Conferences whose alias exactly matches this string. (optional) /// Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. (optional) /// Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. (optional) + /// ConferenceList - ConferenceList ListConferences(string status = default(string), string alias = default(string), string dateCreated = default(string), string dateUpdated = default(string)); + ConferenceList ListConferences( + string? status = default(string?), + string? alias = default(string?), + string? dateCreated = default(string?), + string? dateUpdated = default(string?) + ); /// /// List Conferences /// /// - /// + /// /// /// Thrown when fails to make API call /// Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. (optional) /// List Conferences whose alias exactly matches this string. (optional) /// Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. (optional) /// Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. (optional) + /// ApiResponse of ConferenceList - ApiResponse ListConferencesWithHttpInfo(string status = default(string), string alias = default(string), string dateCreated = default(string), string dateUpdated = default(string)); + ApiResponse ListConferencesWithHttpInfo( + string? status = default(string?), + string? alias = default(string?), + string? dateCreated = default(string?), + string? dateUpdated = default(string?) + ); + /// /// List Incoming Numbers /// @@ -813,14 +1022,32 @@ public interface IDefaultApiSync : IApiAccessor /// (optional) /// Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. (optional) /// 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) + /// IncomingNumberList - IncomingNumberList ListIncomingNumbers(string phoneNumber = default(string), string alias = default(string), string region = default(string), string country = default(string), string applicationId = default(string), bool? hasApplication = default(bool?), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? hasCampaign = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?), string tfnCampaignId = default(string), bool? offnet = default(bool?)); + IncomingNumberList ListIncomingNumbers( + string? phoneNumber = default(string?), + string? alias = default(string?), + string? region = default(string?), + string? country = default(string?), + string? applicationId = default(string?), + bool? hasApplication = default(bool?), + bool? voiceEnabled = default(bool?), + bool? smsEnabled = default(bool?), + bool? hasCampaign = default(bool?), + bool? capabilitiesVoice = default(bool?), + bool? capabilitiesSms = default(bool?), + bool? capabilitiesTollFree = default(bool?), + bool? capabilitiesTenDLC = default(bool?), + bool? capabilitiesShortCode = default(bool?), + string? tfnCampaignId = default(string?), + bool? offnet = default(bool?) + ); /// /// List Incoming Numbers /// /// - /// + /// /// /// Thrown when fails to make API call /// Only show incoming phone number resources that match this PCRE-compatible regular expression. (optional) @@ -839,13 +1066,33 @@ public interface IDefaultApiSync : IApiAccessor /// (optional) /// Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. (optional) /// 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) + /// ApiResponse of IncomingNumberList - ApiResponse ListIncomingNumbersWithHttpInfo(string phoneNumber = default(string), string alias = default(string), string region = default(string), string country = default(string), string applicationId = default(string), bool? hasApplication = default(bool?), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? hasCampaign = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?), string tfnCampaignId = default(string), bool? offnet = default(bool?)); + ApiResponse ListIncomingNumbersWithHttpInfo( + string? phoneNumber = default(string?), + string? alias = default(string?), + string? region = default(string?), + string? country = default(string?), + string? applicationId = default(string?), + bool? hasApplication = default(bool?), + bool? voiceEnabled = default(bool?), + bool? smsEnabled = default(bool?), + bool? hasCampaign = default(bool?), + bool? capabilitiesVoice = default(bool?), + bool? capabilitiesSms = default(bool?), + bool? capabilitiesTollFree = default(bool?), + bool? capabilitiesTenDLC = default(bool?), + bool? capabilitiesShortCode = default(bool?), + string? tfnCampaignId = default(string?), + bool? offnet = default(bool?) + ); + /// /// List Members /// /// Thrown when fails to make API call /// String that uniquely identifies the Queue that the Member belongs to. + /// QueueMemberList QueueMemberList ListMembers(string queueId); @@ -853,12 +1100,14 @@ public interface IDefaultApiSync : IApiAccessor /// List Members /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies the Queue that the Member belongs to. + /// ApiResponse of QueueMemberList ApiResponse ListMembersWithHttpInfo(string queueId); + /// /// List Participants /// @@ -867,22 +1116,35 @@ public interface IDefaultApiSync : IApiAccessor /// Only show Participants with the talk privilege. (optional) /// Only show Participants with the listen privilege. (optional) /// Only show Participants with the dtmfPassThrough privilege. (optional) + /// ConferenceParticipantList - ConferenceParticipantList ListParticipants(string conferenceId, bool? talk = default(bool?), bool? listen = default(bool?), bool? dtmfPassThrough = default(bool?)); + ConferenceParticipantList ListParticipants( + string conferenceId, + bool? talk = default(bool?), + bool? listen = default(bool?), + bool? dtmfPassThrough = default(bool?) + ); /// /// List Participants /// /// - /// + /// /// /// Thrown when fails to make API call /// ID of the conference this participant is in. /// Only show Participants with the talk privilege. (optional) /// Only show Participants with the listen privilege. (optional) /// Only show Participants with the dtmfPassThrough privilege. (optional) + /// ApiResponse of ConferenceParticipantList - ApiResponse ListParticipantsWithHttpInfo(string conferenceId, bool? talk = default(bool?), bool? listen = default(bool?), bool? dtmfPassThrough = default(bool?)); + ApiResponse ListParticipantsWithHttpInfo( + string conferenceId, + bool? talk = default(bool?), + bool? listen = default(bool?), + bool? dtmfPassThrough = default(bool?) + ); + /// /// List Recordings /// @@ -890,21 +1152,32 @@ public interface IDefaultApiSync : IApiAccessor /// Show only Recordings made during the Call with this ID. (optional) /// Show only Recordings made during the conference with this ID. (optional) /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) + /// RecordingList - RecordingList ListRecordings(string callId = default(string), string conferenceId = default(string), string dateCreated = default(string)); + RecordingList ListRecordings( + string? callId = default(string?), + string? conferenceId = default(string?), + string? dateCreated = default(string?) + ); /// /// List Recordings /// /// - /// + /// /// /// Thrown when fails to make API call /// Show only Recordings made during the Call with this ID. (optional) /// Show only Recordings made during the conference with this ID. (optional) /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) + /// ApiResponse of RecordingList - ApiResponse ListRecordingsWithHttpInfo(string callId = default(string), string conferenceId = default(string), string dateCreated = default(string)); + ApiResponse ListRecordingsWithHttpInfo( + string? callId = default(string?), + string? conferenceId = default(string?), + string? dateCreated = default(string?) + ); + /// /// List SMS Messages /// @@ -917,14 +1190,24 @@ public interface IDefaultApiSync : IApiAccessor /// Only show messages associated with this campaign ID. (optional) /// Only show messages associated with this brand ID (optional) /// Only show messages that were sent as part of a 10DLC campaign. (optional) + /// MessagesList - MessagesList ListSmsMessages(string to = default(string), string from = default(string), string beginTime = default(string), string endTime = default(string), MessageDirection? direction = default(MessageDirection?), string campaignId = default(string), string brandId = default(string), bool? is10DLC = default(bool?)); + MessagesList ListSmsMessages( + string? to = default(string?), + string? from = default(string?), + string? beginTime = default(string?), + string? endTime = default(string?), + MessageDirection? direction = default(MessageDirection?), + string? campaignId = default(string?), + string? brandId = default(string?), + bool? is10DLC = default(bool?) + ); /// /// List SMS Messages /// /// - /// + /// /// /// Thrown when fails to make API call /// Only show Messages to this phone number. (optional) @@ -935,31 +1218,48 @@ public interface IDefaultApiSync : IApiAccessor /// Only show messages associated with this campaign ID. (optional) /// Only show messages associated with this brand ID (optional) /// Only show messages that were sent as part of a 10DLC campaign. (optional) + /// ApiResponse of MessagesList - ApiResponse ListSmsMessagesWithHttpInfo(string to = default(string), string from = default(string), string beginTime = default(string), string endTime = default(string), MessageDirection? direction = default(MessageDirection?), string campaignId = default(string), string brandId = default(string), bool? is10DLC = default(bool?)); + ApiResponse ListSmsMessagesWithHttpInfo( + string? to = default(string?), + string? from = default(string?), + string? beginTime = default(string?), + string? endTime = default(string?), + MessageDirection? direction = default(MessageDirection?), + string? campaignId = default(string?), + string? brandId = default(string?), + bool? is10DLC = default(bool?) + ); + /// /// Make a Call /// /// Thrown when fails to make API call /// Call details for making a call (optional) + /// CallResult - CallResult MakeACall(MakeCallRequest makeCallRequest = default(MakeCallRequest)); + CallResult MakeACall(MakeCallRequest? makeCallRequest = default(MakeCallRequest?)); /// /// Make a Call /// /// - /// + /// /// /// Thrown when fails to make API call /// Call details for making a call (optional) + /// ApiResponse of CallResult - ApiResponse MakeACallWithHttpInfo(MakeCallRequest makeCallRequest = default(MakeCallRequest)); + ApiResponse MakeACallWithHttpInfo( + MakeCallRequest? makeCallRequest = default(MakeCallRequest?) + ); + /// /// Make a JWT for WebRTC calling /// /// Thrown when fails to make API call /// Information needed to craft a JWT compatible with the platforms WebRTC APIs + /// string string MakeAWebrtcJwt(CreateWebRTCToken createWebRTCToken); @@ -967,18 +1267,21 @@ public interface IDefaultApiSync : IApiAccessor /// Make a JWT for WebRTC calling /// /// - /// + /// /// /// Thrown when fails to make API call /// Information needed to craft a JWT compatible with the platforms WebRTC APIs + /// ApiResponse of string ApiResponse MakeAWebrtcJwtWithHttpInfo(CreateWebRTCToken createWebRTCToken); + /// /// Remove a Participant /// /// Thrown when fails to make API call /// ID of the conference this participant is in. /// ID of the Call associated with this participant. + /// void RemoveAParticipant(string conferenceId, string callId); @@ -986,18 +1289,21 @@ public interface IDefaultApiSync : IApiAccessor /// Remove a Participant /// /// - /// + /// /// /// Thrown when fails to make API call /// ID of the conference this participant is in. /// ID of the Call associated with this participant. + /// ApiResponse of Object(void) ApiResponse RemoveAParticipantWithHttpInfo(string conferenceId, string callId); + /// /// Send an SMS Message /// /// Thrown when fails to make API call /// Details to create a message + /// MessageResult MessageResult SendAnSmsMessage(MessageRequest messageRequest); @@ -1005,17 +1311,20 @@ public interface IDefaultApiSync : IApiAccessor /// Send an SMS Message /// /// - /// + /// /// /// Thrown when fails to make API call /// Details to create a message + /// ApiResponse of MessageResult ApiResponse SendAnSmsMessageWithHttpInfo(MessageRequest messageRequest); + /// /// Stream a Recording File /// /// Thrown when fails to make API call /// String that uniquely identifies this recording resource. + /// System.IO.Stream System.IO.Stream StreamARecordingFile(string recordingId); @@ -1023,38 +1332,50 @@ public interface IDefaultApiSync : IApiAccessor /// Stream a Recording File /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this recording resource. + /// ApiResponse of System.IO.Stream ApiResponse StreamARecordingFileWithHttpInfo(string recordingId); + /// /// Update a Conference /// /// Thrown when fails to make API call /// String that uniquely identifies this conference resource. /// Conference Details to update (optional) + /// - void UpdateAConference(string conferenceId, UpdateConferenceRequest updateConferenceRequest = default(UpdateConferenceRequest)); + void UpdateAConference( + string conferenceId, + UpdateConferenceRequest? updateConferenceRequest = default(UpdateConferenceRequest?) + ); /// /// Update a Conference /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this conference resource. /// Conference Details to update (optional) + /// ApiResponse of Object(void) - ApiResponse UpdateAConferenceWithHttpInfo(string conferenceId, UpdateConferenceRequest updateConferenceRequest = default(UpdateConferenceRequest)); + ApiResponse UpdateAConferenceWithHttpInfo( + string conferenceId, + UpdateConferenceRequest? updateConferenceRequest = default(UpdateConferenceRequest?) + ); + /// /// Update a Live Call /// /// Thrown when fails to make API call /// String that uniquely identifies this call resource. /// Call details to update + /// void UpdateALiveCall(string callId, UpdateCallRequest updateCallRequest); @@ -1062,13 +1383,18 @@ public interface IDefaultApiSync : IApiAccessor /// Update a Live Call /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this call resource. /// Call details to update + /// ApiResponse of Object(void) - ApiResponse UpdateALiveCallWithHttpInfo(string callId, UpdateCallRequest updateCallRequest); + ApiResponse UpdateALiveCallWithHttpInfo( + string callId, + UpdateCallRequest updateCallRequest + ); + /// /// Update a Participant /// @@ -1076,6545 +1402,297 @@ public interface IDefaultApiSync : IApiAccessor /// ID of the conference this participant is in. /// ID of the Call associated with this participant. /// Conference participant details to update (optional) + /// ConferenceParticipantResult - ConferenceParticipantResult UpdateAParticipant(string conferenceId, string callId, UpdateConferenceParticipantRequest updateConferenceParticipantRequest = default(UpdateConferenceParticipantRequest)); + ConferenceParticipantResult UpdateAParticipant( + string conferenceId, + string callId, + UpdateConferenceParticipantRequest? updateConferenceParticipantRequest = + default(UpdateConferenceParticipantRequest?) + ); /// /// Update a Participant /// /// - /// + /// /// /// Thrown when fails to make API call /// ID of the conference this participant is in. /// ID of the Call associated with this participant. /// Conference participant details to update (optional) + /// ApiResponse of ConferenceParticipantResult - ApiResponse UpdateAParticipantWithHttpInfo(string conferenceId, string callId, UpdateConferenceParticipantRequest updateConferenceParticipantRequest = default(UpdateConferenceParticipantRequest)); + ApiResponse UpdateAParticipantWithHttpInfo( + string conferenceId, + string callId, + UpdateConferenceParticipantRequest? updateConferenceParticipantRequest = + default(UpdateConferenceParticipantRequest?) + ); + /// /// Update a Queue /// /// Thrown when fails to make API call /// A string that uniquely identifies this Queue resource. /// Queue Details to update (optional) + /// QueueResult - QueueResult UpdateAQueue(string queueId, QueueRequest queueRequest = default(QueueRequest)); + QueueResult UpdateAQueue( + string queueId, + QueueRequest? queueRequest = default(QueueRequest?) + ); /// /// Update a Queue /// /// - /// + /// /// /// Thrown when fails to make API call /// A string that uniquely identifies this Queue resource. /// Queue Details to update (optional) + /// ApiResponse of QueueResult - ApiResponse UpdateAQueueWithHttpInfo(string queueId, QueueRequest queueRequest = default(QueueRequest)); + ApiResponse UpdateAQueueWithHttpInfo( + string queueId, + QueueRequest? queueRequest = default(QueueRequest?) + ); + /// /// Manage an account /// /// Thrown when fails to make API call /// Account details to update (optional) + /// - void UpdateAnAccount(AccountRequest accountRequest = default(AccountRequest)); + void UpdateAnAccount(AccountRequest? accountRequest = default(AccountRequest?)); /// /// Manage an account /// /// - /// + /// /// /// Thrown when fails to make API call /// Account details to update (optional) + /// ApiResponse of Object(void) - ApiResponse UpdateAnAccountWithHttpInfo(AccountRequest accountRequest = default(AccountRequest)); + ApiResponse UpdateAnAccountWithHttpInfo( + AccountRequest? accountRequest = default(AccountRequest?) + ); + /// /// Update an application /// /// Thrown when fails to make API call /// A string that uniquely identifies this application resource. /// Application details to update. (optional) + /// ApplicationResult - ApplicationResult UpdateAnApplication(string applicationId, ApplicationRequest applicationRequest = default(ApplicationRequest)); + ApplicationResult UpdateAnApplication( + string applicationId, + ApplicationRequest? applicationRequest = default(ApplicationRequest?) + ); /// /// Update an application /// /// - /// + /// /// /// Thrown when fails to make API call /// A string that uniquely identifies this application resource. /// Application details to update. (optional) + /// ApiResponse of ApplicationResult - ApiResponse UpdateAnApplicationWithHttpInfo(string applicationId, ApplicationRequest applicationRequest = default(ApplicationRequest)); + ApiResponse UpdateAnApplicationWithHttpInfo( + string applicationId, + ApplicationRequest? applicationRequest = default(ApplicationRequest?) + ); + /// /// Update an Incoming Number /// /// Thrown when fails to make API call /// String that uniquely identifies this phone number resource. /// Incoming Number details to update (optional) + /// IncomingNumberResult - IncomingNumberResult UpdateAnIncomingNumber(string phoneNumberId, IncomingNumberRequest incomingNumberRequest = default(IncomingNumberRequest)); + IncomingNumberResult UpdateAnIncomingNumber( + string phoneNumberId, + IncomingNumberRequest? incomingNumberRequest = default(IncomingNumberRequest?) + ); /// /// Update an Incoming Number /// /// - /// + /// /// /// Thrown when fails to make API call /// String that uniquely identifies this phone number resource. /// Incoming Number details to update (optional) + /// ApiResponse of IncomingNumberResult - ApiResponse UpdateAnIncomingNumberWithHttpInfo(string phoneNumberId, IncomingNumberRequest incomingNumberRequest = default(IncomingNumberRequest)); + ApiResponse UpdateAnIncomingNumberWithHttpInfo( + string phoneNumberId, + IncomingNumberRequest? incomingNumberRequest = default(IncomingNumberRequest?) + ); #endregion Synchronous Operations } /// /// Represents a collection of functions to interact with the API endpoints /// - public interface IDefaultApiAsync : IApiAccessor + public interface IDefaultApi : IDefaultApiSync { } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class DefaultApi : IDefaultApi { - #region Asynchronous Operations + private string accountId; + private freeclimb.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + /// - /// Buy a Phone Number + /// Initializes a new instance of the class. /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Incoming Number transaction details - - /// Cancellation Token to cancel the request. - /// Task of IncomingNumberResult - System.Threading.Tasks.Task BuyAPhoneNumberAsync(BuyIncomingNumberRequest buyIncomingNumberRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + public DefaultApi() + : this((string)null) { } /// - /// Buy a Phone Number + /// Initializes a new instance of the class. /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Incoming Number transaction details - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (IncomingNumberResult) - System.Threading.Tasks.Task> BuyAPhoneNumberWithHttpInfoAsync(BuyIncomingNumberRequest buyIncomingNumberRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + public DefaultApi(string basePath) + { + this.Configuration = freeclimb.Client.Configuration.MergeConfigurations( + freeclimb.Client.GlobalConfiguration.Instance, + new freeclimb.Client.Configuration { BasePath = basePath } + ); + this.Client = new freeclimb.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = freeclimb.Client.Configuration.DefaultExceptionFactory; + this.accountId = this.Configuration.Username; + } + /// - /// Create a Conference + /// Initializes a new instance of the class + /// using Configuration object /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Conference to create (optional) - - /// Cancellation Token to cancel the request. - /// Task of ConferenceResult - System.Threading.Tasks.Task CreateAConferenceAsync(CreateConferenceRequest createConferenceRequest = default(CreateConferenceRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// An instance of Configuration + /// + public DefaultApi(freeclimb.Client.Configuration configuration) + { + if (configuration == null) + throw new ArgumentNullException("configuration"); + + this.Configuration = freeclimb.Client.Configuration.MergeConfigurations( + freeclimb.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new freeclimb.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = freeclimb.Client.Configuration.DefaultExceptionFactory; + this.accountId = this.Configuration.Username; + } /// - /// Create a Conference + /// Initializes a new instance of the class + /// using a Configuration object and client instance. /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Conference to create (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ConferenceResult) - System.Threading.Tasks.Task> CreateAConferenceWithHttpInfoAsync(CreateConferenceRequest createConferenceRequest = default(CreateConferenceRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// The client interface for synchronous API access. + /// The configuration object. + public DefaultApi( + freeclimb.Client.ISynchronousClient client, + freeclimb.Client.IReadableConfiguration configuration + ) + { + if (client == null) + throw new ArgumentNullException("client"); + if (configuration == null) + throw new ArgumentNullException("configuration"); + + this.Client = client; + this.Configuration = configuration; + this.ExceptionFactory = freeclimb.Client.Configuration.DefaultExceptionFactory; + this.accountId = this.Configuration.Username; + } + /// - /// Create a Queue + /// The client for accessing this underlying API synchronously. /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Queue details used to create a queue (optional) - - /// Cancellation Token to cancel the request. - /// Task of QueueResult - System.Threading.Tasks.Task CreateAQueueAsync(QueueRequest queueRequest = default(QueueRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public freeclimb.Client.ISynchronousClient Client { get; set; } /// - /// Create a Queue + /// Gets the base path of the API client. /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Queue details used to create a queue (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueResult) - System.Threading.Tasks.Task> CreateAQueueWithHttpInfoAsync(QueueRequest queueRequest = default(QueueRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Create an application - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Application Details (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApplicationResult - System.Threading.Tasks.Task CreateAnApplicationAsync(ApplicationRequest applicationRequest = default(ApplicationRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Create an application - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Application Details (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ApplicationResult) - System.Threading.Tasks.Task> CreateAnApplicationWithHttpInfoAsync(ApplicationRequest applicationRequest = default(ApplicationRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Query the knowledge base - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies the KnowledgeBase resource. - - /// Completion request details (optional) - - /// Cancellation Token to cancel the request. - /// Task of CompletionResult - System.Threading.Tasks.Task CreateKnowledgeBaseCompletionAsync(string knowledgeBaseId, CompletionRequest completionRequest = default(CompletionRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Query the knowledge base - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies the KnowledgeBase resource. - - /// Completion request details (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CompletionResult) - System.Threading.Tasks.Task> CreateKnowledgeBaseCompletionWithHttpInfoAsync(string knowledgeBaseId, CompletionRequest completionRequest = default(CompletionRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Delete a Recording - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DeleteARecordingAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Delete a Recording - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteARecordingWithHttpInfoAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Delete an application - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this application resource. - - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DeleteAnApplicationAsync(string applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Delete an application - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this application resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteAnApplicationWithHttpInfoAsync(string applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Delete an Incoming Number - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this phone number resource. - - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DeleteAnIncomingNumberAsync(string phoneNumberId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Delete an Incoming Number - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this phone number resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteAnIncomingNumberWithHttpInfoAsync(string phoneNumberId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Dequeue a Member - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// ID if the Call that the Member belongs to - - /// Cancellation Token to cancel the request. - /// Task of QueueMember - System.Threading.Tasks.Task DequeueAMemberAsync(string queueId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Dequeue a Member - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// ID if the Call that the Member belongs to - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueMember) - System.Threading.Tasks.Task> DequeueAMemberWithHttpInfoAsync(string queueId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Dequeue Head Member - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this queue resource. - - /// Cancellation Token to cancel the request. - /// Task of QueueMember - System.Threading.Tasks.Task DequeueHeadMemberAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Dequeue Head Member - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this queue resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueMember) - System.Threading.Tasks.Task> DequeueHeadMemberWithHttpInfoAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Download a Recording File - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of System.IO.Stream - System.Threading.Tasks.Task DownloadARecordingFileAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Download a Recording File - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (System.IO.Stream) - System.Threading.Tasks.Task> DownloadARecordingFileWithHttpInfoAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Filter Logs - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Filter logs request paramters - - /// Cancellation Token to cancel the request. - /// Task of LogList - System.Threading.Tasks.Task FilterLogsAsync(FilterLogsRequest filterLogsRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Filter Logs - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Filter logs request paramters - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (LogList) - System.Threading.Tasks.Task> FilterLogsWithHttpInfoAsync(FilterLogsRequest filterLogsRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get a Call - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this call resource. - - /// Cancellation Token to cancel the request. - /// Task of CallResult - System.Threading.Tasks.Task GetACallAsync(string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get a Call - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this call resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CallResult) - System.Threading.Tasks.Task> GetACallWithHttpInfoAsync(string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get a Conference - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this conference resource. - - /// Cancellation Token to cancel the request. - /// Task of ConferenceResult - System.Threading.Tasks.Task GetAConferenceAsync(string conferenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get a Conference - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this conference resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ConferenceResult) - System.Threading.Tasks.Task> GetAConferenceWithHttpInfoAsync(string conferenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get a Member - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// ID of the Call that the Member belongs to - - /// Cancellation Token to cancel the request. - /// Task of QueueMember - System.Threading.Tasks.Task GetAMemberAsync(string queueId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get a Member - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// ID of the Call that the Member belongs to - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueMember) - System.Threading.Tasks.Task> GetAMemberWithHttpInfoAsync(string queueId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get a Participant - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// ID of the Call associated with this participant. - - /// Cancellation Token to cancel the request. - /// Task of ConferenceParticipantResult - System.Threading.Tasks.Task GetAParticipantAsync(string conferenceId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get a Participant - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// ID of the Call associated with this participant. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ConferenceParticipantResult) - System.Threading.Tasks.Task> GetAParticipantWithHttpInfoAsync(string conferenceId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get a Queue - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this queue resource. - - /// Cancellation Token to cancel the request. - /// Task of QueueResult - System.Threading.Tasks.Task GetAQueueAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get a Queue - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this queue resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueResult) - System.Threading.Tasks.Task> GetAQueueWithHttpInfoAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get a Recording - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of RecordingResult - System.Threading.Tasks.Task GetARecordingAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get a Recording - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (RecordingResult) - System.Threading.Tasks.Task> GetARecordingWithHttpInfoAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get an Account - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of AccountResult - System.Threading.Tasks.Task GetAnAccountAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get an Account - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (AccountResult) - System.Threading.Tasks.Task> GetAnAccountWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get an Application - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this application resource. - - /// Cancellation Token to cancel the request. - /// Task of ApplicationResult - System.Threading.Tasks.Task GetAnApplicationAsync(string applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get an Application - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this application resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ApplicationResult) - System.Threading.Tasks.Task> GetAnApplicationWithHttpInfoAsync(string applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get an Incoming Number - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this phone number resource. - - /// Cancellation Token to cancel the request. - /// Task of IncomingNumberResult - System.Threading.Tasks.Task GetAnIncomingNumberAsync(string phoneNumberId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get an Incoming Number - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this phone number resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (IncomingNumberResult) - System.Threading.Tasks.Task> GetAnIncomingNumberWithHttpInfoAsync(string phoneNumberId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get an SMS Message - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this Message resource. - - /// Cancellation Token to cancel the request. - /// Task of MessageResult - System.Threading.Tasks.Task GetAnSmsMessageAsync(string messageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get an SMS Message - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this Message resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (MessageResult) - System.Threading.Tasks.Task> GetAnSmsMessageWithHttpInfoAsync(string messageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get Head Member - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// Cancellation Token to cancel the request. - /// Task of QueueMember - System.Threading.Tasks.Task GetHeadMemberAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get Head Member - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueMember) - System.Threading.Tasks.Task> GetHeadMemberWithHttpInfoAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get a 10DLC SMS Brand - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this brand resource. - - /// Cancellation Token to cancel the request. - /// Task of SMSTenDLCBrand - System.Threading.Tasks.Task GetTenDLCSmsBrandAsync(string brandId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get a 10DLC SMS Brand - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this brand resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTenDLCBrand) - System.Threading.Tasks.Task> GetTenDLCSmsBrandWithHttpInfoAsync(string brandId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get list of SMS 10DLC Brands - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of SMSTenDLCBrandsListResult - System.Threading.Tasks.Task GetTenDLCSmsBrandsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get list of SMS 10DLC Brands - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTenDLCBrandsListResult) - System.Threading.Tasks.Task> GetTenDLCSmsBrandsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get a 10DLC SMS Campaign - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this campaign resource. - - /// Cancellation Token to cancel the request. - /// Task of SMSTenDLCCampaign - System.Threading.Tasks.Task GetTenDLCSmsCampaignAsync(string campaignId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get a 10DLC SMS Campaign - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this campaign resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTenDLCCampaign) - System.Threading.Tasks.Task> GetTenDLCSmsCampaignWithHttpInfoAsync(string campaignId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get list of SMS 10DLC Campaigns - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// The unique identifier for a brand (optional) - - /// Cancellation Token to cancel the request. - /// Task of SMSTenDLCCampaignsListResult - System.Threading.Tasks.Task GetTenDLCSmsCampaignsAsync(string brandId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get list of SMS 10DLC Campaigns - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// The unique identifier for a brand (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTenDLCCampaignsListResult) - System.Threading.Tasks.Task> GetTenDLCSmsCampaignsWithHttpInfoAsync(string brandId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get a 10DLC SMS Partner Campaign - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this campaign resource. - - /// Cancellation Token to cancel the request. - /// Task of SMSTenDLCPartnerCampaign - System.Threading.Tasks.Task GetTenDLCSmsPartnerCampaignAsync(string campaignId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get a 10DLC SMS Partner Campaign - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this campaign resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTenDLCPartnerCampaign) - System.Threading.Tasks.Task> GetTenDLCSmsPartnerCampaignWithHttpInfoAsync(string campaignId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get list of SMS 10DLC Partner Campaigns - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// The unique identifier for a brand (optional) - - /// Cancellation Token to cancel the request. - /// Task of SMSTenDLCPartnerCampaignsListResult - System.Threading.Tasks.Task GetTenDLCSmsPartnerCampaignsAsync(string brandId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get list of SMS 10DLC Partner Campaigns - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// The unique identifier for a brand (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTenDLCPartnerCampaignsListResult) - System.Threading.Tasks.Task> GetTenDLCSmsPartnerCampaignsWithHttpInfoAsync(string brandId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get a TollFree SMS Campaign - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this TollFree Campaign resource. - - /// Cancellation Token to cancel the request. - /// Task of SMSTollFreeCampaign - System.Threading.Tasks.Task GetTollFreeSmsCampaignAsync(string campaignId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get a TollFree SMS Campaign - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this TollFree Campaign resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTollFreeCampaign) - System.Threading.Tasks.Task> GetTollFreeSmsCampaignWithHttpInfoAsync(string campaignId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get list of TollFree Campaigns - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of SMSTollFreeCampaignsListResult - System.Threading.Tasks.Task GetTollFreeSmsCampaignsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get list of TollFree Campaigns - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTollFreeCampaignsListResult) - System.Threading.Tasks.Task> GetTollFreeSmsCampaignsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List Active Queues - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Return only the Queue resources with aliases that exactly match this name. (optional) - - /// Cancellation Token to cancel the request. - /// Task of QueueList - System.Threading.Tasks.Task ListActiveQueuesAsync(string alias = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List Active Queues - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Return only the Queue resources with aliases that exactly match this name. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueList) - System.Threading.Tasks.Task> ListActiveQueuesWithHttpInfoAsync(string alias = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List All Account Logs - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of LogList - System.Threading.Tasks.Task ListAllAccountLogsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List All Account Logs - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (LogList) - System.Threading.Tasks.Task> ListAllAccountLogsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List applications - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Return only applications with aliases that exactly match this value. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApplicationList - System.Threading.Tasks.Task ListApplicationsAsync(string alias = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List applications - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Return only applications with aliases that exactly match this value. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ApplicationList) - System.Threading.Tasks.Task> ListApplicationsWithHttpInfoAsync(string alias = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List available numbers - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. (optional) - - /// State or province of this phone number. (optional) - - /// Country of this phone number. (optional) - - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) - - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// Cancellation Token to cancel the request. - /// Task of AvailableNumberList - System.Threading.Tasks.Task ListAvailableNumbersAsync(string phoneNumber = default(string), string region = default(string), string country = default(string), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List available numbers - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. (optional) - - /// State or province of this phone number. (optional) - - /// Country of this phone number. (optional) - - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) - - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (AvailableNumberList) - System.Threading.Tasks.Task> ListAvailableNumbersWithHttpInfoAsync(string phoneNumber = default(string), string region = default(string), string country = default(string), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List Call Logs - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this call resource. - - /// Cancellation Token to cancel the request. - /// Task of LogList - System.Threading.Tasks.Task ListCallLogsAsync(string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List Call Logs - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this call resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (LogList) - System.Threading.Tasks.Task> ListCallLogsWithHttpInfoAsync(string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List Call Recordings - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this call resource. - - /// Only show recordings created on the specified date, in the form *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of RecordingList - System.Threading.Tasks.Task ListCallRecordingsAsync(string callId, string dateCreated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List Call Recordings - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this call resource. - - /// Only show recordings created on the specified date, in the form *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (RecordingList) - System.Threading.Tasks.Task> ListCallRecordingsWithHttpInfoAsync(string callId, string dateCreated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List Calls - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. (optional, default to false) - - /// Only show Calls to this phone number. (optional) - - /// Only show Calls from this phone number. (optional) - - /// Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. (optional) - - /// Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. (optional) - - /// Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) - - /// Only show Calls spawned by the call with this ID. (optional) - - /// Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) - - /// Cancellation Token to cancel the request. - /// Task of CallList - System.Threading.Tasks.Task ListCallsAsync(bool? active = default(bool?), string to = default(string), string from = default(string), CallStatus? status = default(CallStatus?), string startTime = default(string), string endTime = default(string), string parentCallId = default(string), List applicationId = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List Calls - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. (optional, default to false) - - /// Only show Calls to this phone number. (optional) - - /// Only show Calls from this phone number. (optional) - - /// Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. (optional) - - /// Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. (optional) - - /// Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) - - /// Only show Calls spawned by the call with this ID. (optional) - - /// Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CallList) - System.Threading.Tasks.Task> ListCallsWithHttpInfoAsync(bool? active = default(bool?), string to = default(string), string from = default(string), CallStatus? status = default(CallStatus?), string startTime = default(string), string endTime = default(string), string parentCallId = default(string), List applicationId = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List Conference Recordings - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Show only Recordings made during the conference with this ID. - - /// Show only Recordings made during the Call with this ID. (optional) - - /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of RecordingList - System.Threading.Tasks.Task ListConferenceRecordingsAsync(string conferenceId, string callId = default(string), string dateCreated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List Conference Recordings - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Show only Recordings made during the conference with this ID. - - /// Show only Recordings made during the Call with this ID. (optional) - - /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (RecordingList) - System.Threading.Tasks.Task> ListConferenceRecordingsWithHttpInfoAsync(string conferenceId, string callId = default(string), string dateCreated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List Conferences - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. (optional) - - /// List Conferences whose alias exactly matches this string. (optional) - - /// Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. (optional) - - /// Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ConferenceList - System.Threading.Tasks.Task ListConferencesAsync(string status = default(string), string alias = default(string), string dateCreated = default(string), string dateUpdated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List Conferences - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. (optional) - - /// List Conferences whose alias exactly matches this string. (optional) - - /// Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. (optional) - - /// Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ConferenceList) - System.Threading.Tasks.Task> ListConferencesWithHttpInfoAsync(string status = default(string), string alias = default(string), string dateCreated = default(string), string dateUpdated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List Incoming Numbers - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Only show incoming phone number resources that match this PCRE-compatible regular expression. (optional) - - /// Only show incoming phone numbers with aliases that exactly match this value. (optional) - - /// State or province of this phone number. (optional) - - /// Country of this phone number. (optional) - - /// 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) - - /// Indication of whether the phone number has an application linked to it. (optional, default to false) - - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) (deprecated) - - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) (deprecated) - - /// Indication of whether the phone number has a campaign associated with it (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. (optional) - - /// 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) - - /// Cancellation Token to cancel the request. - /// Task of IncomingNumberList - System.Threading.Tasks.Task ListIncomingNumbersAsync(string phoneNumber = default(string), string alias = default(string), string region = default(string), string country = default(string), string applicationId = default(string), bool? hasApplication = default(bool?), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? hasCampaign = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?), string tfnCampaignId = default(string), bool? offnet = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List Incoming Numbers - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Only show incoming phone number resources that match this PCRE-compatible regular expression. (optional) - - /// Only show incoming phone numbers with aliases that exactly match this value. (optional) - - /// State or province of this phone number. (optional) - - /// Country of this phone number. (optional) - - /// 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) - - /// Indication of whether the phone number has an application linked to it. (optional, default to false) - - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) (deprecated) - - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) (deprecated) - - /// Indication of whether the phone number has a campaign associated with it (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. (optional) - - /// 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) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (IncomingNumberList) - System.Threading.Tasks.Task> ListIncomingNumbersWithHttpInfoAsync(string phoneNumber = default(string), string alias = default(string), string region = default(string), string country = default(string), string applicationId = default(string), bool? hasApplication = default(bool?), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? hasCampaign = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?), string tfnCampaignId = default(string), bool? offnet = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List Members - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// Cancellation Token to cancel the request. - /// Task of QueueMemberList - System.Threading.Tasks.Task ListMembersAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List Members - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueMemberList) - System.Threading.Tasks.Task> ListMembersWithHttpInfoAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List Participants - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// Only show Participants with the talk privilege. (optional) - - /// Only show Participants with the listen privilege. (optional) - - /// Only show Participants with the dtmfPassThrough privilege. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ConferenceParticipantList - System.Threading.Tasks.Task ListParticipantsAsync(string conferenceId, bool? talk = default(bool?), bool? listen = default(bool?), bool? dtmfPassThrough = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List Participants - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// Only show Participants with the talk privilege. (optional) - - /// Only show Participants with the listen privilege. (optional) - - /// Only show Participants with the dtmfPassThrough privilege. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ConferenceParticipantList) - System.Threading.Tasks.Task> ListParticipantsWithHttpInfoAsync(string conferenceId, bool? talk = default(bool?), bool? listen = default(bool?), bool? dtmfPassThrough = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List Recordings - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Show only Recordings made during the Call with this ID. (optional) - - /// Show only Recordings made during the conference with this ID. (optional) - - /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of RecordingList - System.Threading.Tasks.Task ListRecordingsAsync(string callId = default(string), string conferenceId = default(string), string dateCreated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List Recordings - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Show only Recordings made during the Call with this ID. (optional) - - /// Show only Recordings made during the conference with this ID. (optional) - - /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (RecordingList) - System.Threading.Tasks.Task> ListRecordingsWithHttpInfoAsync(string callId = default(string), string conferenceId = default(string), string dateCreated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List SMS Messages - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Only show Messages to this phone number. (optional) - - /// Only show Messages from this phone number. (optional) - - /// Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. (optional) - - /// Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. (optional) - - /// Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. (optional) - - /// Only show messages associated with this campaign ID. (optional) - - /// Only show messages associated with this brand ID (optional) - - /// Only show messages that were sent as part of a 10DLC campaign. (optional) - - /// Cancellation Token to cancel the request. - /// Task of MessagesList - System.Threading.Tasks.Task ListSmsMessagesAsync(string to = default(string), string from = default(string), string beginTime = default(string), string endTime = default(string), MessageDirection? direction = default(MessageDirection?), string campaignId = default(string), string brandId = default(string), bool? is10DLC = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List SMS Messages - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Only show Messages to this phone number. (optional) - - /// Only show Messages from this phone number. (optional) - - /// Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. (optional) - - /// Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. (optional) - - /// Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. (optional) - - /// Only show messages associated with this campaign ID. (optional) - - /// Only show messages associated with this brand ID (optional) - - /// Only show messages that were sent as part of a 10DLC campaign. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (MessagesList) - System.Threading.Tasks.Task> ListSmsMessagesWithHttpInfoAsync(string to = default(string), string from = default(string), string beginTime = default(string), string endTime = default(string), MessageDirection? direction = default(MessageDirection?), string campaignId = default(string), string brandId = default(string), bool? is10DLC = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Make a Call - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Call details for making a call (optional) - - /// Cancellation Token to cancel the request. - /// Task of CallResult - System.Threading.Tasks.Task MakeACallAsync(MakeCallRequest makeCallRequest = default(MakeCallRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Make a Call - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Call details for making a call (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CallResult) - System.Threading.Tasks.Task> MakeACallWithHttpInfoAsync(MakeCallRequest makeCallRequest = default(MakeCallRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Make a JWT for WebRTC calling - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Information needed to craft a JWT compatible with the platforms WebRTC APIs - - /// Cancellation Token to cancel the request. - /// Task of string - System.Threading.Tasks.Task MakeAWebrtcJwtAsync(CreateWebRTCToken createWebRTCToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Make a JWT for WebRTC calling - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Information needed to craft a JWT compatible with the platforms WebRTC APIs - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (string) - System.Threading.Tasks.Task> MakeAWebrtcJwtWithHttpInfoAsync(CreateWebRTCToken createWebRTCToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Remove a Participant - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// ID of the Call associated with this participant. - - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task RemoveAParticipantAsync(string conferenceId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Remove a Participant - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// ID of the Call associated with this participant. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> RemoveAParticipantWithHttpInfoAsync(string conferenceId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Send an SMS Message - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Details to create a message - - /// Cancellation Token to cancel the request. - /// Task of MessageResult - System.Threading.Tasks.Task SendAnSmsMessageAsync(MessageRequest messageRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Send an SMS Message - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Details to create a message - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (MessageResult) - System.Threading.Tasks.Task> SendAnSmsMessageWithHttpInfoAsync(MessageRequest messageRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Stream a Recording File - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of System.IO.Stream - System.Threading.Tasks.Task StreamARecordingFileAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Stream a Recording File - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (System.IO.Stream) - System.Threading.Tasks.Task> StreamARecordingFileWithHttpInfoAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Update a Conference - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this conference resource. - - /// Conference Details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task UpdateAConferenceAsync(string conferenceId, UpdateConferenceRequest updateConferenceRequest = default(UpdateConferenceRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Update a Conference - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this conference resource. - - /// Conference Details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateAConferenceWithHttpInfoAsync(string conferenceId, UpdateConferenceRequest updateConferenceRequest = default(UpdateConferenceRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Update a Live Call - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this call resource. - - /// Call details to update - - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task UpdateALiveCallAsync(string callId, UpdateCallRequest updateCallRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Update a Live Call - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this call resource. - - /// Call details to update - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateALiveCallWithHttpInfoAsync(string callId, UpdateCallRequest updateCallRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Update a Participant - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// ID of the Call associated with this participant. - - /// Conference participant details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of ConferenceParticipantResult - System.Threading.Tasks.Task UpdateAParticipantAsync(string conferenceId, string callId, UpdateConferenceParticipantRequest updateConferenceParticipantRequest = default(UpdateConferenceParticipantRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Update a Participant - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// ID of the Call associated with this participant. - - /// Conference participant details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ConferenceParticipantResult) - System.Threading.Tasks.Task> UpdateAParticipantWithHttpInfoAsync(string conferenceId, string callId, UpdateConferenceParticipantRequest updateConferenceParticipantRequest = default(UpdateConferenceParticipantRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Update a Queue - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this Queue resource. - - /// Queue Details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of QueueResult - System.Threading.Tasks.Task UpdateAQueueAsync(string queueId, QueueRequest queueRequest = default(QueueRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Update a Queue - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this Queue resource. - - /// Queue Details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueResult) - System.Threading.Tasks.Task> UpdateAQueueWithHttpInfoAsync(string queueId, QueueRequest queueRequest = default(QueueRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Manage an account - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Account details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task UpdateAnAccountAsync(AccountRequest accountRequest = default(AccountRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Manage an account - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// Account details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateAnAccountWithHttpInfoAsync(AccountRequest accountRequest = default(AccountRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Update an application - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this application resource. - - /// Application details to update. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApplicationResult - System.Threading.Tasks.Task UpdateAnApplicationAsync(string applicationId, ApplicationRequest applicationRequest = default(ApplicationRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Update an application - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this application resource. - - /// Application details to update. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ApplicationResult) - System.Threading.Tasks.Task> UpdateAnApplicationWithHttpInfoAsync(string applicationId, ApplicationRequest applicationRequest = default(ApplicationRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Update an Incoming Number - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this phone number resource. - - /// Incoming Number details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of IncomingNumberResult - System.Threading.Tasks.Task UpdateAnIncomingNumberAsync(string phoneNumberId, IncomingNumberRequest incomingNumberRequest = default(IncomingNumberRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Update an Incoming Number - /// - /// - /// - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this phone number resource. - - /// Incoming Number details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (IncomingNumberResult) - System.Threading.Tasks.Task> UpdateAnIncomingNumberWithHttpInfoAsync(string phoneNumberId, IncomingNumberRequest incomingNumberRequest = default(IncomingNumberRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IDefaultApi : IDefaultApiSync, IDefaultApiAsync - { - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class DefaultApi : IDefaultApi - { - private string accountId; - private freeclimb.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public DefaultApi() : this((string)null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// - public DefaultApi(string basePath) - { - this.Configuration = freeclimb.Client.Configuration.MergeConfigurations( - freeclimb.Client.GlobalConfiguration.Instance, - new freeclimb.Client.Configuration { BasePath = basePath } - ); - this.Client = new freeclimb.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new freeclimb.Client.ApiClient(this.Configuration.BasePath); - this.ExceptionFactory = freeclimb.Client.Configuration.DefaultExceptionFactory; - this.accountId = this.Configuration.Username; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public DefaultApi(freeclimb.Client.Configuration configuration) - { - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Configuration = freeclimb.Client.Configuration.MergeConfigurations( - freeclimb.Client.GlobalConfiguration.Instance, - configuration - ); - this.Client = new freeclimb.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new freeclimb.Client.ApiClient(this.Configuration.BasePath); - ExceptionFactory = freeclimb.Client.Configuration.DefaultExceptionFactory; - this.accountId = this.Configuration.Username; - } - - /// - /// Initializes a new instance of the class - /// using a Configuration object and client instance. - /// - /// The client interface for synchronous API access. - /// The client interface for asynchronous API access. - /// The configuration object. - public DefaultApi(freeclimb.Client.ISynchronousClient client, freeclimb.Client.IAsynchronousClient asyncClient, freeclimb.Client.IReadableConfiguration configuration) - { - if (client == null) throw new ArgumentNullException("client"); - if (asyncClient == null) throw new ArgumentNullException("asyncClient"); - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Client = client; - this.AsynchronousClient = asyncClient; - this.Configuration = configuration; - this.ExceptionFactory = freeclimb.Client.Configuration.DefaultExceptionFactory; - this.accountId = this.Configuration.Username; - } - - /// - /// The client for accessing this underlying API asynchronously. - /// - public freeclimb.Client.IAsynchronousClient AsynchronousClient { get; set; } - - /// - /// The client for accessing this underlying API synchronously. - /// - public freeclimb.Client.ISynchronousClient Client { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public string GetBasePath() - { - return this.Configuration.BasePath; - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public freeclimb.Client.IReadableConfiguration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public freeclimb.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Buy a Phone Number - /// - /// Thrown when fails to make API call - /// Incoming Number transaction details - /// IncomingNumberResult - public IncomingNumberResult BuyAPhoneNumber(BuyIncomingNumberRequest buyIncomingNumberRequest) - { - freeclimb.Client.ApiResponse localVarResponse = BuyAPhoneNumberWithHttpInfo(buyIncomingNumberRequest ); - return localVarResponse.Data; - } - - /// - /// Buy a Phone Number - /// - /// Thrown when fails to make API call - /// Incoming Number transaction details - /// ApiResponse of IncomingNumberResult - public freeclimb.Client.ApiResponse BuyAPhoneNumberWithHttpInfo(BuyIncomingNumberRequest buyIncomingNumberRequest) - { - - // verify the required parameter 'buyIncomingNumberRequest' is set - if (buyIncomingNumberRequest == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'buyIncomingNumberRequest' when calling DefaultApi->BuyAPhoneNumber"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = buyIncomingNumberRequest; - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/IncomingPhoneNumbers", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("BuyAPhoneNumber", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Buy a Phone Number - /// - /// Thrown when fails to make API call - - /// Incoming Number transaction details - - /// Cancellation Token to cancel the request. - /// Task of IncomingNumberResult - public async System.Threading.Tasks.Task BuyAPhoneNumberAsync(BuyIncomingNumberRequest buyIncomingNumberRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await BuyAPhoneNumberWithHttpInfoAsync(buyIncomingNumberRequest, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Buy a Phone Number - /// - /// Thrown when fails to make API call - - /// Incoming Number transaction details - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (IncomingNumberResult) - public async System.Threading.Tasks.Task> BuyAPhoneNumberWithHttpInfoAsync(BuyIncomingNumberRequest buyIncomingNumberRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'buyIncomingNumberRequest' is set - if (buyIncomingNumberRequest == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'buyIncomingNumberRequest' when calling DefaultApi->BuyAPhoneNumber"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = buyIncomingNumberRequest; - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/IncomingPhoneNumbers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("BuyAPhoneNumber", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a Conference - /// - /// Thrown when fails to make API call - /// Conference to create (optional) - /// ConferenceResult - public ConferenceResult CreateAConference(CreateConferenceRequest createConferenceRequest = default(CreateConferenceRequest)) - { - freeclimb.Client.ApiResponse localVarResponse = CreateAConferenceWithHttpInfo(createConferenceRequest ); - return localVarResponse.Data; - } - - /// - /// Create a Conference - /// - /// Thrown when fails to make API call - /// Conference to create (optional) - /// ApiResponse of ConferenceResult - public freeclimb.Client.ApiResponse CreateAConferenceWithHttpInfo(CreateConferenceRequest createConferenceRequest = default(CreateConferenceRequest)) - { - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = createConferenceRequest; - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/Conferences", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateAConference", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a Conference - /// - /// Thrown when fails to make API call - - /// Conference to create (optional) - - /// Cancellation Token to cancel the request. - /// Task of ConferenceResult - public async System.Threading.Tasks.Task CreateAConferenceAsync(CreateConferenceRequest createConferenceRequest = default(CreateConferenceRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await CreateAConferenceWithHttpInfoAsync(createConferenceRequest, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Create a Conference - /// - /// Thrown when fails to make API call - - /// Conference to create (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ConferenceResult) - public async System.Threading.Tasks.Task> CreateAConferenceWithHttpInfoAsync(CreateConferenceRequest createConferenceRequest = default(CreateConferenceRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = createConferenceRequest; - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/Conferences", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateAConference", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a Queue - /// - /// Thrown when fails to make API call - /// Queue details used to create a queue (optional) - /// QueueResult - public QueueResult CreateAQueue(QueueRequest queueRequest = default(QueueRequest)) - { - freeclimb.Client.ApiResponse localVarResponse = CreateAQueueWithHttpInfo(queueRequest ); - return localVarResponse.Data; - } - - /// - /// Create a Queue - /// - /// Thrown when fails to make API call - /// Queue details used to create a queue (optional) - /// ApiResponse of QueueResult - public freeclimb.Client.ApiResponse CreateAQueueWithHttpInfo(QueueRequest queueRequest = default(QueueRequest)) - { - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = queueRequest; - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/Queues", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateAQueue", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a Queue - /// - /// Thrown when fails to make API call - - /// Queue details used to create a queue (optional) - - /// Cancellation Token to cancel the request. - /// Task of QueueResult - public async System.Threading.Tasks.Task CreateAQueueAsync(QueueRequest queueRequest = default(QueueRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await CreateAQueueWithHttpInfoAsync(queueRequest, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Create a Queue - /// - /// Thrown when fails to make API call - - /// Queue details used to create a queue (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueResult) - public async System.Threading.Tasks.Task> CreateAQueueWithHttpInfoAsync(QueueRequest queueRequest = default(QueueRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = queueRequest; - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/Queues", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateAQueue", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create an application - /// - /// Thrown when fails to make API call - /// Application Details (optional) - /// ApplicationResult - public ApplicationResult CreateAnApplication(ApplicationRequest applicationRequest = default(ApplicationRequest)) - { - freeclimb.Client.ApiResponse localVarResponse = CreateAnApplicationWithHttpInfo(applicationRequest ); - return localVarResponse.Data; - } - - /// - /// Create an application - /// - /// Thrown when fails to make API call - /// Application Details (optional) - /// ApiResponse of ApplicationResult - public freeclimb.Client.ApiResponse CreateAnApplicationWithHttpInfo(ApplicationRequest applicationRequest = default(ApplicationRequest)) - { - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = applicationRequest; - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/Applications", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateAnApplication", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create an application - /// - /// Thrown when fails to make API call - - /// Application Details (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApplicationResult - public async System.Threading.Tasks.Task CreateAnApplicationAsync(ApplicationRequest applicationRequest = default(ApplicationRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await CreateAnApplicationWithHttpInfoAsync(applicationRequest, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Create an application - /// - /// Thrown when fails to make API call - - /// Application Details (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ApplicationResult) - public async System.Threading.Tasks.Task> CreateAnApplicationWithHttpInfoAsync(ApplicationRequest applicationRequest = default(ApplicationRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = applicationRequest; - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/Applications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateAnApplication", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Query the knowledge base - /// - /// Thrown when fails to make API call - /// A string that uniquely identifies the KnowledgeBase resource. - /// Completion request details (optional) - /// CompletionResult - public CompletionResult CreateKnowledgeBaseCompletion(string knowledgeBaseId, CompletionRequest completionRequest = default(CompletionRequest)) - { - freeclimb.Client.ApiResponse localVarResponse = CreateKnowledgeBaseCompletionWithHttpInfo(knowledgeBaseId , completionRequest ); - return localVarResponse.Data; - } - - /// - /// Query the knowledge base - /// - /// Thrown when fails to make API call - /// A string that uniquely identifies the KnowledgeBase resource. - /// Completion request details (optional) - /// ApiResponse of CompletionResult - public freeclimb.Client.ApiResponse CreateKnowledgeBaseCompletionWithHttpInfo(string knowledgeBaseId, CompletionRequest completionRequest = default(CompletionRequest)) - { - - // verify the required parameter 'knowledgeBaseId' is set - if (knowledgeBaseId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'knowledgeBaseId' when calling DefaultApi->CreateKnowledgeBaseCompletion"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("knowledgeBaseId", freeclimb.Client.ClientUtils.ParameterToString(knowledgeBaseId)); // path parameter - localVarRequestOptions.Data = completionRequest; - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateKnowledgeBaseCompletion", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Query the knowledge base - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies the KnowledgeBase resource. - - /// Completion request details (optional) - - /// Cancellation Token to cancel the request. - /// Task of CompletionResult - public async System.Threading.Tasks.Task CreateKnowledgeBaseCompletionAsync(string knowledgeBaseId, CompletionRequest completionRequest = default(CompletionRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await CreateKnowledgeBaseCompletionWithHttpInfoAsync(knowledgeBaseId, completionRequest, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Query the knowledge base - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies the KnowledgeBase resource. - - /// Completion request details (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CompletionResult) - public async System.Threading.Tasks.Task> CreateKnowledgeBaseCompletionWithHttpInfoAsync(string knowledgeBaseId, CompletionRequest completionRequest = default(CompletionRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'knowledgeBaseId' is set - if (knowledgeBaseId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'knowledgeBaseId' when calling DefaultApi->CreateKnowledgeBaseCompletion"); - } - - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("knowledgeBaseId", freeclimb.Client.ClientUtils.ParameterToString(knowledgeBaseId)); // path parameter - localVarRequestOptions.Data = completionRequest; - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateKnowledgeBaseCompletion", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a Recording - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this recording resource. - /// - public void DeleteARecording(string recordingId) - { - DeleteARecordingWithHttpInfo(recordingId); - } - - /// - /// Delete a Recording - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this recording resource. - /// ApiResponse of Object(void) - public freeclimb.Client.ApiResponse DeleteARecordingWithHttpInfo(string recordingId) - { - - // verify the required parameter 'recordingId' is set - if (recordingId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'recordingId' when calling DefaultApi->DeleteARecording"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("recordingId", freeclimb.Client.ClientUtils.ParameterToString(recordingId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Delete("/Accounts/{accountId}/Recordings/{recordingId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteARecording", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a Recording - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task DeleteARecordingAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await DeleteARecordingWithHttpInfoAsync(recordingId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a Recording - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteARecordingWithHttpInfoAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'recordingId' is set - if (recordingId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'recordingId' when calling DefaultApi->DeleteARecording"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("recordingId", freeclimb.Client.ClientUtils.ParameterToString(recordingId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/Accounts/{accountId}/Recordings/{recordingId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteARecording", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete an application - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this application resource. - /// - public void DeleteAnApplication(string applicationId) - { - DeleteAnApplicationWithHttpInfo(applicationId); - } - - /// - /// Delete an application - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this application resource. - /// ApiResponse of Object(void) - public freeclimb.Client.ApiResponse DeleteAnApplicationWithHttpInfo(string applicationId) - { - - // verify the required parameter 'applicationId' is set - if (applicationId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'applicationId' when calling DefaultApi->DeleteAnApplication"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("applicationId", freeclimb.Client.ClientUtils.ParameterToString(applicationId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Delete("/Accounts/{accountId}/Applications/{applicationId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteAnApplication", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete an application - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this application resource. - - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task DeleteAnApplicationAsync(string applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await DeleteAnApplicationWithHttpInfoAsync(applicationId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete an application - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this application resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteAnApplicationWithHttpInfoAsync(string applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'applicationId' is set - if (applicationId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'applicationId' when calling DefaultApi->DeleteAnApplication"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("applicationId", freeclimb.Client.ClientUtils.ParameterToString(applicationId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/Accounts/{accountId}/Applications/{applicationId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteAnApplication", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete an Incoming Number - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this phone number resource. - /// - public void DeleteAnIncomingNumber(string phoneNumberId) - { - DeleteAnIncomingNumberWithHttpInfo(phoneNumberId); - } - - /// - /// Delete an Incoming Number - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this phone number resource. - /// ApiResponse of Object(void) - public freeclimb.Client.ApiResponse DeleteAnIncomingNumberWithHttpInfo(string phoneNumberId) - { - - // verify the required parameter 'phoneNumberId' is set - if (phoneNumberId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'phoneNumberId' when calling DefaultApi->DeleteAnIncomingNumber"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("phoneNumberId", freeclimb.Client.ClientUtils.ParameterToString(phoneNumberId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Delete("/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteAnIncomingNumber", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete an Incoming Number - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this phone number resource. - - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task DeleteAnIncomingNumberAsync(string phoneNumberId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await DeleteAnIncomingNumberWithHttpInfoAsync(phoneNumberId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete an Incoming Number - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this phone number resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteAnIncomingNumberWithHttpInfoAsync(string phoneNumberId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'phoneNumberId' is set - if (phoneNumberId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'phoneNumberId' when calling DefaultApi->DeleteAnIncomingNumber"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("phoneNumberId", freeclimb.Client.ClientUtils.ParameterToString(phoneNumberId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteAnIncomingNumber", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Dequeue a Member - /// - /// Thrown when fails to make API call - /// String that uniquely identifies the Queue that the Member belongs to. - /// ID if the Call that the Member belongs to - /// QueueMember - public QueueMember DequeueAMember(string queueId, string callId) - { - freeclimb.Client.ApiResponse localVarResponse = DequeueAMemberWithHttpInfo(queueId , callId ); - return localVarResponse.Data; - } - - /// - /// Dequeue a Member - /// - /// Thrown when fails to make API call - /// String that uniquely identifies the Queue that the Member belongs to. - /// ID if the Call that the Member belongs to - /// ApiResponse of QueueMember - public freeclimb.Client.ApiResponse DequeueAMemberWithHttpInfo(string queueId, string callId) - { - - // verify the required parameter 'queueId' is set - if (queueId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'queueId' when calling DefaultApi->DequeueAMember"); - } - - - // verify the required parameter 'callId' is set - if (callId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->DequeueAMember"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("queueId", freeclimb.Client.ClientUtils.ParameterToString(queueId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/Queues/{queueId}/Members/{callId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DequeueAMember", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Dequeue a Member - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// ID if the Call that the Member belongs to - - /// Cancellation Token to cancel the request. - /// Task of QueueMember - public async System.Threading.Tasks.Task DequeueAMemberAsync(string queueId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await DequeueAMemberWithHttpInfoAsync(queueId, callId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Dequeue a Member - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// ID if the Call that the Member belongs to - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueMember) - public async System.Threading.Tasks.Task> DequeueAMemberWithHttpInfoAsync(string queueId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'queueId' is set - if (queueId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'queueId' when calling DefaultApi->DequeueAMember"); - } - - - // verify the required parameter 'callId' is set - if (callId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->DequeueAMember"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("queueId", freeclimb.Client.ClientUtils.ParameterToString(queueId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/Queues/{queueId}/Members/{callId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DequeueAMember", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Dequeue Head Member - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this queue resource. - /// QueueMember - public QueueMember DequeueHeadMember(string queueId) - { - freeclimb.Client.ApiResponse localVarResponse = DequeueHeadMemberWithHttpInfo(queueId ); - return localVarResponse.Data; - } - - /// - /// Dequeue Head Member - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this queue resource. - /// ApiResponse of QueueMember - public freeclimb.Client.ApiResponse DequeueHeadMemberWithHttpInfo(string queueId) - { - - // verify the required parameter 'queueId' is set - if (queueId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'queueId' when calling DefaultApi->DequeueHeadMember"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("queueId", freeclimb.Client.ClientUtils.ParameterToString(queueId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/Queues/{queueId}/Members/Front", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DequeueHeadMember", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Dequeue Head Member - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this queue resource. - - /// Cancellation Token to cancel the request. - /// Task of QueueMember - public async System.Threading.Tasks.Task DequeueHeadMemberAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await DequeueHeadMemberWithHttpInfoAsync(queueId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Dequeue Head Member - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this queue resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueMember) - public async System.Threading.Tasks.Task> DequeueHeadMemberWithHttpInfoAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'queueId' is set - if (queueId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'queueId' when calling DefaultApi->DequeueHeadMember"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("queueId", freeclimb.Client.ClientUtils.ParameterToString(queueId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/Queues/{queueId}/Members/Front", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DequeueHeadMember", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Download a Recording File - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this recording resource. - /// System.IO.Stream - public System.IO.Stream DownloadARecordingFile(string recordingId) - { - freeclimb.Client.ApiResponse localVarResponse = DownloadARecordingFileWithHttpInfo(recordingId ); - return localVarResponse.Data; - } - - /// - /// Download a Recording File - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this recording resource. - /// ApiResponse of System.IO.Stream - public freeclimb.Client.ApiResponse DownloadARecordingFileWithHttpInfo(string recordingId) - { - - // verify the required parameter 'recordingId' is set - if (recordingId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'recordingId' when calling DefaultApi->DownloadARecordingFile"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "audio/x-wav" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("recordingId", freeclimb.Client.ClientUtils.ParameterToString(recordingId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Recordings/{recordingId}/Download", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DownloadARecordingFile", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Download a Recording File - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of System.IO.Stream - public async System.Threading.Tasks.Task DownloadARecordingFileAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await DownloadARecordingFileWithHttpInfoAsync(recordingId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Download a Recording File - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (System.IO.Stream) - public async System.Threading.Tasks.Task> DownloadARecordingFileWithHttpInfoAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'recordingId' is set - if (recordingId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'recordingId' when calling DefaultApi->DownloadARecordingFile"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "audio/x-wav" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("recordingId", freeclimb.Client.ClientUtils.ParameterToString(recordingId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Recordings/{recordingId}/Download", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DownloadARecordingFile", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Filter Logs - /// - /// Thrown when fails to make API call - /// Filter logs request paramters - /// LogList - public LogList FilterLogs(FilterLogsRequest filterLogsRequest) - { - freeclimb.Client.ApiResponse localVarResponse = FilterLogsWithHttpInfo(filterLogsRequest ); - return localVarResponse.Data; - } - - /// - /// Filter Logs - /// - /// Thrown when fails to make API call - /// Filter logs request paramters - /// ApiResponse of LogList - public freeclimb.Client.ApiResponse FilterLogsWithHttpInfo(FilterLogsRequest filterLogsRequest) - { - - // verify the required parameter 'filterLogsRequest' is set - if (filterLogsRequest == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'filterLogsRequest' when calling DefaultApi->FilterLogs"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = filterLogsRequest; - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/Logs", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("FilterLogs", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Filter Logs - /// - /// Thrown when fails to make API call - - /// Filter logs request paramters - - /// Cancellation Token to cancel the request. - /// Task of LogList - public async System.Threading.Tasks.Task FilterLogsAsync(FilterLogsRequest filterLogsRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await FilterLogsWithHttpInfoAsync(filterLogsRequest, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Filter Logs - /// - /// Thrown when fails to make API call - - /// Filter logs request paramters - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (LogList) - public async System.Threading.Tasks.Task> FilterLogsWithHttpInfoAsync(FilterLogsRequest filterLogsRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'filterLogsRequest' is set - if (filterLogsRequest == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'filterLogsRequest' when calling DefaultApi->FilterLogs"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = filterLogsRequest; - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/Logs", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("FilterLogs", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Call - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this call resource. - /// CallResult - public CallResult GetACall(string callId) - { - freeclimb.Client.ApiResponse localVarResponse = GetACallWithHttpInfo(callId ); - return localVarResponse.Data; - } - - /// - /// Get a Call - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this call resource. - /// ApiResponse of CallResult - public freeclimb.Client.ApiResponse GetACallWithHttpInfo(string callId) - { - - // verify the required parameter 'callId' is set - if (callId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->GetACall"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Calls/{callId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetACall", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Call - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this call resource. - - /// Cancellation Token to cancel the request. - /// Task of CallResult - public async System.Threading.Tasks.Task GetACallAsync(string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetACallWithHttpInfoAsync(callId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a Call - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this call resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CallResult) - public async System.Threading.Tasks.Task> GetACallWithHttpInfoAsync(string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'callId' is set - if (callId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->GetACall"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Calls/{callId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetACall", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Conference - /// - /// Thrown when fails to make API call - /// A string that uniquely identifies this conference resource. - /// ConferenceResult - public ConferenceResult GetAConference(string conferenceId) - { - freeclimb.Client.ApiResponse localVarResponse = GetAConferenceWithHttpInfo(conferenceId ); - return localVarResponse.Data; - } - - /// - /// Get a Conference - /// - /// Thrown when fails to make API call - /// A string that uniquely identifies this conference resource. - /// ApiResponse of ConferenceResult - public freeclimb.Client.ApiResponse GetAConferenceWithHttpInfo(string conferenceId) - { - - // verify the required parameter 'conferenceId' is set - if (conferenceId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'conferenceId' when calling DefaultApi->GetAConference"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("conferenceId", freeclimb.Client.ClientUtils.ParameterToString(conferenceId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Conferences/{conferenceId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAConference", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Conference - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this conference resource. - - /// Cancellation Token to cancel the request. - /// Task of ConferenceResult - public async System.Threading.Tasks.Task GetAConferenceAsync(string conferenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetAConferenceWithHttpInfoAsync(conferenceId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a Conference - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this conference resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ConferenceResult) - public async System.Threading.Tasks.Task> GetAConferenceWithHttpInfoAsync(string conferenceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'conferenceId' is set - if (conferenceId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'conferenceId' when calling DefaultApi->GetAConference"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("conferenceId", freeclimb.Client.ClientUtils.ParameterToString(conferenceId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Conferences/{conferenceId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAConference", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Member - /// - /// Thrown when fails to make API call - /// String that uniquely identifies the Queue that the Member belongs to. - /// ID of the Call that the Member belongs to - /// QueueMember - public QueueMember GetAMember(string queueId, string callId) - { - freeclimb.Client.ApiResponse localVarResponse = GetAMemberWithHttpInfo(queueId , callId ); - return localVarResponse.Data; - } - - /// - /// Get a Member - /// - /// Thrown when fails to make API call - /// String that uniquely identifies the Queue that the Member belongs to. - /// ID of the Call that the Member belongs to - /// ApiResponse of QueueMember - public freeclimb.Client.ApiResponse GetAMemberWithHttpInfo(string queueId, string callId) - { - - // verify the required parameter 'queueId' is set - if (queueId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'queueId' when calling DefaultApi->GetAMember"); - } - - - // verify the required parameter 'callId' is set - if (callId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->GetAMember"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("queueId", freeclimb.Client.ClientUtils.ParameterToString(queueId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Queues/{queueId}/Members/{callId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAMember", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Member - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// ID of the Call that the Member belongs to - - /// Cancellation Token to cancel the request. - /// Task of QueueMember - public async System.Threading.Tasks.Task GetAMemberAsync(string queueId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetAMemberWithHttpInfoAsync(queueId, callId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a Member - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// ID of the Call that the Member belongs to - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueMember) - public async System.Threading.Tasks.Task> GetAMemberWithHttpInfoAsync(string queueId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'queueId' is set - if (queueId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'queueId' when calling DefaultApi->GetAMember"); - } - - - // verify the required parameter 'callId' is set - if (callId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->GetAMember"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("queueId", freeclimb.Client.ClientUtils.ParameterToString(queueId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Queues/{queueId}/Members/{callId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAMember", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Participant - /// - /// Thrown when fails to make API call - /// ID of the conference this participant is in. - /// ID of the Call associated with this participant. - /// ConferenceParticipantResult - public ConferenceParticipantResult GetAParticipant(string conferenceId, string callId) - { - freeclimb.Client.ApiResponse localVarResponse = GetAParticipantWithHttpInfo(conferenceId , callId ); - return localVarResponse.Data; - } - - /// - /// Get a Participant - /// - /// Thrown when fails to make API call - /// ID of the conference this participant is in. - /// ID of the Call associated with this participant. - /// ApiResponse of ConferenceParticipantResult - public freeclimb.Client.ApiResponse GetAParticipantWithHttpInfo(string conferenceId, string callId) - { - - // verify the required parameter 'conferenceId' is set - if (conferenceId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'conferenceId' when calling DefaultApi->GetAParticipant"); - } - - - // verify the required parameter 'callId' is set - if (callId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->GetAParticipant"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("conferenceId", freeclimb.Client.ClientUtils.ParameterToString(conferenceId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAParticipant", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Participant - /// - /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// ID of the Call associated with this participant. - - /// Cancellation Token to cancel the request. - /// Task of ConferenceParticipantResult - public async System.Threading.Tasks.Task GetAParticipantAsync(string conferenceId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetAParticipantWithHttpInfoAsync(conferenceId, callId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a Participant - /// - /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// ID of the Call associated with this participant. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ConferenceParticipantResult) - public async System.Threading.Tasks.Task> GetAParticipantWithHttpInfoAsync(string conferenceId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'conferenceId' is set - if (conferenceId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'conferenceId' when calling DefaultApi->GetAParticipant"); - } - - - // verify the required parameter 'callId' is set - if (callId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->GetAParticipant"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("conferenceId", freeclimb.Client.ClientUtils.ParameterToString(conferenceId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAParticipant", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Queue - /// - /// Thrown when fails to make API call - /// A string that uniquely identifies this queue resource. - /// QueueResult - public QueueResult GetAQueue(string queueId) - { - freeclimb.Client.ApiResponse localVarResponse = GetAQueueWithHttpInfo(queueId ); - return localVarResponse.Data; - } - - /// - /// Get a Queue - /// - /// Thrown when fails to make API call - /// A string that uniquely identifies this queue resource. - /// ApiResponse of QueueResult - public freeclimb.Client.ApiResponse GetAQueueWithHttpInfo(string queueId) - { - - // verify the required parameter 'queueId' is set - if (queueId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'queueId' when calling DefaultApi->GetAQueue"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("queueId", freeclimb.Client.ClientUtils.ParameterToString(queueId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Queues/{queueId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAQueue", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Queue - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this queue resource. - - /// Cancellation Token to cancel the request. - /// Task of QueueResult - public async System.Threading.Tasks.Task GetAQueueAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetAQueueWithHttpInfoAsync(queueId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a Queue - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this queue resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueResult) - public async System.Threading.Tasks.Task> GetAQueueWithHttpInfoAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'queueId' is set - if (queueId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'queueId' when calling DefaultApi->GetAQueue"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("queueId", freeclimb.Client.ClientUtils.ParameterToString(queueId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Queues/{queueId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAQueue", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Recording - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this recording resource. - /// RecordingResult - public RecordingResult GetARecording(string recordingId) - { - freeclimb.Client.ApiResponse localVarResponse = GetARecordingWithHttpInfo(recordingId ); - return localVarResponse.Data; - } - - /// - /// Get a Recording - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this recording resource. - /// ApiResponse of RecordingResult - public freeclimb.Client.ApiResponse GetARecordingWithHttpInfo(string recordingId) - { - - // verify the required parameter 'recordingId' is set - if (recordingId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'recordingId' when calling DefaultApi->GetARecording"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("recordingId", freeclimb.Client.ClientUtils.ParameterToString(recordingId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Recordings/{recordingId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetARecording", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Recording - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of RecordingResult - public async System.Threading.Tasks.Task GetARecordingAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetARecordingWithHttpInfoAsync(recordingId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a Recording - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (RecordingResult) - public async System.Threading.Tasks.Task> GetARecordingWithHttpInfoAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'recordingId' is set - if (recordingId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'recordingId' when calling DefaultApi->GetARecording"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("recordingId", freeclimb.Client.ClientUtils.ParameterToString(recordingId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Recordings/{recordingId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetARecording", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get an Account - /// - /// Thrown when fails to make API call - /// AccountResult - public AccountResult GetAnAccount() - { - freeclimb.Client.ApiResponse localVarResponse = GetAnAccountWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get an Account - /// - /// Thrown when fails to make API call - /// ApiResponse of AccountResult - public freeclimb.Client.ApiResponse GetAnAccountWithHttpInfo() - { - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAnAccount", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get an Account - /// - /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of AccountResult - public async System.Threading.Tasks.Task GetAnAccountAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetAnAccountWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get an Account - /// - /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (AccountResult) - public async System.Threading.Tasks.Task> GetAnAccountWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAnAccount", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get an Application - /// - /// Thrown when fails to make API call - /// A string that uniquely identifies this application resource. - /// ApplicationResult - public ApplicationResult GetAnApplication(string applicationId) - { - freeclimb.Client.ApiResponse localVarResponse = GetAnApplicationWithHttpInfo(applicationId ); - return localVarResponse.Data; - } - - /// - /// Get an Application - /// - /// Thrown when fails to make API call - /// A string that uniquely identifies this application resource. - /// ApiResponse of ApplicationResult - public freeclimb.Client.ApiResponse GetAnApplicationWithHttpInfo(string applicationId) - { - - // verify the required parameter 'applicationId' is set - if (applicationId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'applicationId' when calling DefaultApi->GetAnApplication"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("applicationId", freeclimb.Client.ClientUtils.ParameterToString(applicationId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Applications/{applicationId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAnApplication", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get an Application - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this application resource. - - /// Cancellation Token to cancel the request. - /// Task of ApplicationResult - public async System.Threading.Tasks.Task GetAnApplicationAsync(string applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetAnApplicationWithHttpInfoAsync(applicationId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get an Application - /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this application resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ApplicationResult) - public async System.Threading.Tasks.Task> GetAnApplicationWithHttpInfoAsync(string applicationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'applicationId' is set - if (applicationId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'applicationId' when calling DefaultApi->GetAnApplication"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("applicationId", freeclimb.Client.ClientUtils.ParameterToString(applicationId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Applications/{applicationId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAnApplication", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get an Incoming Number - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this phone number resource. - /// IncomingNumberResult - public IncomingNumberResult GetAnIncomingNumber(string phoneNumberId) - { - freeclimb.Client.ApiResponse localVarResponse = GetAnIncomingNumberWithHttpInfo(phoneNumberId ); - return localVarResponse.Data; - } - - /// - /// Get an Incoming Number - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this phone number resource. - /// ApiResponse of IncomingNumberResult - public freeclimb.Client.ApiResponse GetAnIncomingNumberWithHttpInfo(string phoneNumberId) - { - - // verify the required parameter 'phoneNumberId' is set - if (phoneNumberId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'phoneNumberId' when calling DefaultApi->GetAnIncomingNumber"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("phoneNumberId", freeclimb.Client.ClientUtils.ParameterToString(phoneNumberId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAnIncomingNumber", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get an Incoming Number - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this phone number resource. - - /// Cancellation Token to cancel the request. - /// Task of IncomingNumberResult - public async System.Threading.Tasks.Task GetAnIncomingNumberAsync(string phoneNumberId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetAnIncomingNumberWithHttpInfoAsync(phoneNumberId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get an Incoming Number - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this phone number resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (IncomingNumberResult) - public async System.Threading.Tasks.Task> GetAnIncomingNumberWithHttpInfoAsync(string phoneNumberId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'phoneNumberId' is set - if (phoneNumberId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'phoneNumberId' when calling DefaultApi->GetAnIncomingNumber"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("phoneNumberId", freeclimb.Client.ClientUtils.ParameterToString(phoneNumberId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAnIncomingNumber", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get an SMS Message - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this Message resource. - /// MessageResult - public MessageResult GetAnSmsMessage(string messageId) - { - freeclimb.Client.ApiResponse localVarResponse = GetAnSmsMessageWithHttpInfo(messageId ); - return localVarResponse.Data; - } - - /// - /// Get an SMS Message - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this Message resource. - /// ApiResponse of MessageResult - public freeclimb.Client.ApiResponse GetAnSmsMessageWithHttpInfo(string messageId) - { - - // verify the required parameter 'messageId' is set - if (messageId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'messageId' when calling DefaultApi->GetAnSmsMessage"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("messageId", freeclimb.Client.ClientUtils.ParameterToString(messageId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Messages/{messageId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAnSmsMessage", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get an SMS Message - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this Message resource. - - /// Cancellation Token to cancel the request. - /// Task of MessageResult - public async System.Threading.Tasks.Task GetAnSmsMessageAsync(string messageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetAnSmsMessageWithHttpInfoAsync(messageId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get an SMS Message - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this Message resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (MessageResult) - public async System.Threading.Tasks.Task> GetAnSmsMessageWithHttpInfoAsync(string messageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'messageId' is set - if (messageId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'messageId' when calling DefaultApi->GetAnSmsMessage"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("messageId", freeclimb.Client.ClientUtils.ParameterToString(messageId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Messages/{messageId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAnSmsMessage", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Head Member - /// - /// Thrown when fails to make API call - /// String that uniquely identifies the Queue that the Member belongs to. - /// QueueMember - public QueueMember GetHeadMember(string queueId) - { - freeclimb.Client.ApiResponse localVarResponse = GetHeadMemberWithHttpInfo(queueId ); - return localVarResponse.Data; - } - - /// - /// Get Head Member - /// - /// Thrown when fails to make API call - /// String that uniquely identifies the Queue that the Member belongs to. - /// ApiResponse of QueueMember - public freeclimb.Client.ApiResponse GetHeadMemberWithHttpInfo(string queueId) - { - - // verify the required parameter 'queueId' is set - if (queueId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'queueId' when calling DefaultApi->GetHeadMember"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("queueId", freeclimb.Client.ClientUtils.ParameterToString(queueId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Queues/{queueId}/Members/Front", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetHeadMember", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Head Member - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// Cancellation Token to cancel the request. - /// Task of QueueMember - public async System.Threading.Tasks.Task GetHeadMemberAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetHeadMemberWithHttpInfoAsync(queueId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get Head Member - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueMember) - public async System.Threading.Tasks.Task> GetHeadMemberWithHttpInfoAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'queueId' is set - if (queueId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'queueId' when calling DefaultApi->GetHeadMember"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("queueId", freeclimb.Client.ClientUtils.ParameterToString(queueId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Queues/{queueId}/Members/Front", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetHeadMember", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a 10DLC SMS Brand - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this brand resource. - /// SMSTenDLCBrand - public SMSTenDLCBrand GetTenDLCSmsBrand(string brandId) - { - freeclimb.Client.ApiResponse localVarResponse = GetTenDLCSmsBrandWithHttpInfo(brandId ); - return localVarResponse.Data; - } - - /// - /// Get a 10DLC SMS Brand - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this brand resource. - /// ApiResponse of SMSTenDLCBrand - public freeclimb.Client.ApiResponse GetTenDLCSmsBrandWithHttpInfo(string brandId) - { - - // verify the required parameter 'brandId' is set - if (brandId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'brandId' when calling DefaultApi->GetTenDLCSmsBrand"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("brandId", freeclimb.Client.ClientUtils.ParameterToString(brandId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Messages/10DLC/Brands/{brandId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetTenDLCSmsBrand", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a 10DLC SMS Brand - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this brand resource. - - /// Cancellation Token to cancel the request. - /// Task of SMSTenDLCBrand - public async System.Threading.Tasks.Task GetTenDLCSmsBrandAsync(string brandId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetTenDLCSmsBrandWithHttpInfoAsync(brandId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a 10DLC SMS Brand - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this brand resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTenDLCBrand) - public async System.Threading.Tasks.Task> GetTenDLCSmsBrandWithHttpInfoAsync(string brandId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'brandId' is set - if (brandId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'brandId' when calling DefaultApi->GetTenDLCSmsBrand"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("brandId", freeclimb.Client.ClientUtils.ParameterToString(brandId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Messages/10DLC/Brands/{brandId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetTenDLCSmsBrand", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get list of SMS 10DLC Brands - /// - /// Thrown when fails to make API call - /// SMSTenDLCBrandsListResult - public SMSTenDLCBrandsListResult GetTenDLCSmsBrands() - { - freeclimb.Client.ApiResponse localVarResponse = GetTenDLCSmsBrandsWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get list of SMS 10DLC Brands - /// - /// Thrown when fails to make API call - /// ApiResponse of SMSTenDLCBrandsListResult - public freeclimb.Client.ApiResponse GetTenDLCSmsBrandsWithHttpInfo() - { - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Messages/10DLC/Brands", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetTenDLCSmsBrands", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get list of SMS 10DLC Brands - /// - /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of SMSTenDLCBrandsListResult - public async System.Threading.Tasks.Task GetTenDLCSmsBrandsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetTenDLCSmsBrandsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get list of SMS 10DLC Brands - /// - /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTenDLCBrandsListResult) - public async System.Threading.Tasks.Task> GetTenDLCSmsBrandsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Messages/10DLC/Brands", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetTenDLCSmsBrands", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a 10DLC SMS Campaign - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this campaign resource. - /// SMSTenDLCCampaign - public SMSTenDLCCampaign GetTenDLCSmsCampaign(string campaignId) - { - freeclimb.Client.ApiResponse localVarResponse = GetTenDLCSmsCampaignWithHttpInfo(campaignId ); - return localVarResponse.Data; - } - - /// - /// Get a 10DLC SMS Campaign - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this campaign resource. - /// ApiResponse of SMSTenDLCCampaign - public freeclimb.Client.ApiResponse GetTenDLCSmsCampaignWithHttpInfo(string campaignId) - { - - // verify the required parameter 'campaignId' is set - if (campaignId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'campaignId' when calling DefaultApi->GetTenDLCSmsCampaign"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("campaignId", freeclimb.Client.ClientUtils.ParameterToString(campaignId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Messages/10DLC/Campaigns/{campaignId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetTenDLCSmsCampaign", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a 10DLC SMS Campaign - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this campaign resource. - - /// Cancellation Token to cancel the request. - /// Task of SMSTenDLCCampaign - public async System.Threading.Tasks.Task GetTenDLCSmsCampaignAsync(string campaignId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetTenDLCSmsCampaignWithHttpInfoAsync(campaignId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a 10DLC SMS Campaign - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this campaign resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTenDLCCampaign) - public async System.Threading.Tasks.Task> GetTenDLCSmsCampaignWithHttpInfoAsync(string campaignId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'campaignId' is set - if (campaignId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'campaignId' when calling DefaultApi->GetTenDLCSmsCampaign"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("campaignId", freeclimb.Client.ClientUtils.ParameterToString(campaignId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Messages/10DLC/Campaigns/{campaignId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetTenDLCSmsCampaign", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get list of SMS 10DLC Campaigns - /// - /// Thrown when fails to make API call - /// The unique identifier for a brand (optional) - /// SMSTenDLCCampaignsListResult - public SMSTenDLCCampaignsListResult GetTenDLCSmsCampaigns(string brandId = default(string)) - { - freeclimb.Client.ApiResponse localVarResponse = GetTenDLCSmsCampaignsWithHttpInfo(brandId ); - return localVarResponse.Data; - } - - /// - /// Get list of SMS 10DLC Campaigns - /// - /// Thrown when fails to make API call - /// The unique identifier for a brand (optional) - /// ApiResponse of SMSTenDLCCampaignsListResult - public freeclimb.Client.ApiResponse GetTenDLCSmsCampaignsWithHttpInfo(string brandId = default(string)) - { - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (brandId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "brandId", brandId)); - } - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Messages/10DLC/Campaigns", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetTenDLCSmsCampaigns", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get list of SMS 10DLC Campaigns - /// - /// Thrown when fails to make API call - - /// The unique identifier for a brand (optional) - - /// Cancellation Token to cancel the request. - /// Task of SMSTenDLCCampaignsListResult - public async System.Threading.Tasks.Task GetTenDLCSmsCampaignsAsync(string brandId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetTenDLCSmsCampaignsWithHttpInfoAsync(brandId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get list of SMS 10DLC Campaigns - /// - /// Thrown when fails to make API call - - /// The unique identifier for a brand (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTenDLCCampaignsListResult) - public async System.Threading.Tasks.Task> GetTenDLCSmsCampaignsWithHttpInfoAsync(string brandId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (brandId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "brandId", brandId)); - } - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Messages/10DLC/Campaigns", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetTenDLCSmsCampaigns", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a 10DLC SMS Partner Campaign - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this campaign resource. - /// SMSTenDLCPartnerCampaign - public SMSTenDLCPartnerCampaign GetTenDLCSmsPartnerCampaign(string campaignId) - { - freeclimb.Client.ApiResponse localVarResponse = GetTenDLCSmsPartnerCampaignWithHttpInfo(campaignId ); - return localVarResponse.Data; - } - - /// - /// Get a 10DLC SMS Partner Campaign - /// - /// Thrown when fails to make API call - /// String that uniquely identifies this campaign resource. - /// ApiResponse of SMSTenDLCPartnerCampaign - public freeclimb.Client.ApiResponse GetTenDLCSmsPartnerCampaignWithHttpInfo(string campaignId) - { - - // verify the required parameter 'campaignId' is set - if (campaignId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'campaignId' when calling DefaultApi->GetTenDLCSmsPartnerCampaign"); - } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("campaignId", freeclimb.Client.ClientUtils.ParameterToString(campaignId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns/{campaignId}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetTenDLCSmsPartnerCampaign", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a 10DLC SMS Partner Campaign - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this campaign resource. - - /// Cancellation Token to cancel the request. - /// Task of SMSTenDLCPartnerCampaign - public async System.Threading.Tasks.Task GetTenDLCSmsPartnerCampaignAsync(string campaignId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await GetTenDLCSmsPartnerCampaignWithHttpInfoAsync(campaignId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a 10DLC SMS Partner Campaign - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this campaign resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTenDLCPartnerCampaign) - public async System.Threading.Tasks.Task> GetTenDLCSmsPartnerCampaignWithHttpInfoAsync(string campaignId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'campaignId' is set - if (campaignId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'campaignId' when calling DefaultApi->GetTenDLCSmsPartnerCampaign"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("campaignId", freeclimb.Client.ClientUtils.ParameterToString(campaignId)); // path parameter - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns/{campaignId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetTenDLCSmsPartnerCampaign", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get list of SMS 10DLC Partner Campaigns - /// - /// Thrown when fails to make API call - /// The unique identifier for a brand (optional) - /// SMSTenDLCPartnerCampaignsListResult - public SMSTenDLCPartnerCampaignsListResult GetTenDLCSmsPartnerCampaigns(string brandId = default(string)) - { - freeclimb.Client.ApiResponse localVarResponse = GetTenDLCSmsPartnerCampaignsWithHttpInfo(brandId ); - return localVarResponse.Data; - } - - /// - /// Get list of SMS 10DLC Partner Campaigns - /// - /// Thrown when fails to make API call - /// The unique identifier for a brand (optional) - /// ApiResponse of SMSTenDLCPartnerCampaignsListResult - public freeclimb.Client.ApiResponse GetTenDLCSmsPartnerCampaignsWithHttpInfo(string brandId = default(string)) - { - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (brandId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "brandId", brandId)); - } - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetTenDLCSmsPartnerCampaigns", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get list of SMS 10DLC Partner Campaigns - /// - /// Thrown when fails to make API call - - /// The unique identifier for a brand (optional) - - /// Cancellation Token to cancel the request. - /// Task of SMSTenDLCPartnerCampaignsListResult - public async System.Threading.Tasks.Task GetTenDLCSmsPartnerCampaignsAsync(string brandId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// The base path + public string GetBasePath() { - freeclimb.Client.ApiResponse localVarResponse = await GetTenDLCSmsPartnerCampaignsWithHttpInfoAsync(brandId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; + return this.Configuration.BasePath; } /// - /// Get list of SMS 10DLC Partner Campaigns + /// Gets or sets the configuration object /// - /// Thrown when fails to make API call - - /// The unique identifier for a brand (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTenDLCPartnerCampaignsListResult) - public async System.Threading.Tasks.Task> GetTenDLCSmsPartnerCampaignsWithHttpInfoAsync(string brandId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = freeclimb.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (brandId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "brandId", brandId)); - } - - // authentication (fc) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + /// An instance of the Configuration + public freeclimb.Client.IReadableConfiguration Configuration { get; set; } - if (this.ExceptionFactory != null) + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public freeclimb.Client.ExceptionFactory ExceptionFactory + { + get { - Exception _exception = this.ExceptionFactory("GetTenDLCSmsPartnerCampaigns", localVarResponse); - if (_exception != null) + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) { - throw _exception; + throw new InvalidOperationException( + "Multicast delegate for ExceptionFactory is unsupported." + ); } + return _exceptionFactory; } - - return localVarResponse; + set { _exceptionFactory = value; } } /// - /// Get a TollFree SMS Campaign + /// Get next page of paginated resource /// /// Thrown when fails to make API call - /// String that uniquely identifies this TollFree Campaign resource. - /// SMSTollFreeCampaign - public SMSTollFreeCampaign GetTollFreeSmsCampaign(string campaignId) + /// T + public T GetNextPage(T response) + where T : IPagination { - freeclimb.Client.ApiResponse localVarResponse = GetTollFreeSmsCampaignWithHttpInfo(campaignId ); + freeclimb.Client.ApiResponse localVarResponse = GetNextPageWithHttpInfo(response); return localVarResponse.Data; } /// - /// Get a TollFree SMS Campaign + /// Get next page of paginated response /// /// Thrown when fails to make API call - /// String that uniquely identifies this TollFree Campaign resource. - /// ApiResponse of SMSTollFreeCampaign - public freeclimb.Client.ApiResponse GetTollFreeSmsCampaignWithHttpInfo(string campaignId) + /// ApiResponse of T + public freeclimb.Client.ApiResponse GetNextPageWithHttpInfo(T response) + where T : IPagination { - - // verify the required parameter 'campaignId' is set - if (campaignId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'campaignId' when calling DefaultApi->GetTollFreeSmsCampaign"); - } + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; + + if (response.NextPageUri == null) + { + throw new Exception("Missing param NextPageUri when calling GetNextPage"); + } - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -7626,21 +1704,37 @@ public freeclimb.Client.ApiResponse GetTollFreeSmsCampaignW localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("campaignId", freeclimb.Client.ClientUtils.ParameterToString(campaignId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Messages/TollFree/Campaigns/{campaignId}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + response.NextPageUri, + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetTollFreeSmsCampaign", localVarResponse); + Exception _exception = this.ExceptionFactory("GetNextPage", localVarResponse); if (_exception != null) { throw _exception; @@ -7651,51 +1745,61 @@ public freeclimb.Client.ApiResponse GetTollFreeSmsCampaignW } /// - /// Get a TollFree SMS Campaign + /// Buy a Phone Number /// /// Thrown when fails to make API call - - /// String that uniquely identifies this TollFree Campaign resource. - - /// Cancellation Token to cancel the request. - /// Task of SMSTollFreeCampaign - public async System.Threading.Tasks.Task GetTollFreeSmsCampaignAsync(string campaignId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Incoming Number transaction details + + /// IncomingNumberResult + public IncomingNumberResult BuyAPhoneNumber( + BuyIncomingNumberRequest buyIncomingNumberRequest + ) { - freeclimb.Client.ApiResponse localVarResponse = await GetTollFreeSmsCampaignWithHttpInfoAsync(campaignId, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = + BuyAPhoneNumberWithHttpInfo(buyIncomingNumberRequest); return localVarResponse.Data; } /// - /// Get a TollFree SMS Campaign + /// Buy a Phone Number /// /// Thrown when fails to make API call - - /// String that uniquely identifies this TollFree Campaign resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTollFreeCampaign) - public async System.Threading.Tasks.Task> GetTollFreeSmsCampaignWithHttpInfoAsync(string campaignId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Incoming Number transaction details + + /// ApiResponse of IncomingNumberResult + public freeclimb.Client.ApiResponse BuyAPhoneNumberWithHttpInfo( + BuyIncomingNumberRequest buyIncomingNumberRequest + ) { - - // verify the required parameter 'campaignId' is set - if (campaignId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'campaignId' when calling DefaultApi->GetTollFreeSmsCampaign"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->BuyAPhoneNumber" + ); } - + // verify the required parameter 'buyIncomingNumberRequest' is set + if (buyIncomingNumberRequest == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'buyIncomingNumberRequest' when calling DefaultApi->BuyAPhoneNumber" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { "application/json" }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -7707,22 +1811,40 @@ public freeclimb.Client.ApiResponse GetTollFreeSmsCampaignW localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("campaignId", freeclimb.Client.ClientUtils.ParameterToString(campaignId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.Data = buyIncomingNumberRequest; + + localVarRequestOptions.Operation = "DefaultApi.BuyAPhoneNumber"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Messages/TollFree/Campaigns/{campaignId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/IncomingPhoneNumbers", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetTollFreeSmsCampaign", localVarResponse); + Exception _exception = this.ExceptionFactory("BuyAPhoneNumber", localVarResponse); if (_exception != null) { throw _exception; @@ -7733,35 +1855,52 @@ public freeclimb.Client.ApiResponse GetTollFreeSmsCampaignW } /// - /// Get list of TollFree Campaigns + /// Create a Conference /// /// Thrown when fails to make API call - /// SMSTollFreeCampaignsListResult - public SMSTollFreeCampaignsListResult GetTollFreeSmsCampaigns() + /// Conference to create (optional) + + /// ConferenceResult + public ConferenceResult CreateAConference( + CreateConferenceRequest? createConferenceRequest = default(CreateConferenceRequest?) + ) { - freeclimb.Client.ApiResponse localVarResponse = GetTollFreeSmsCampaignsWithHttpInfo(); + freeclimb.Client.ApiResponse localVarResponse = + CreateAConferenceWithHttpInfo(createConferenceRequest); return localVarResponse.Data; } /// - /// Get list of TollFree Campaigns + /// Create a Conference /// /// Thrown when fails to make API call - /// ApiResponse of SMSTollFreeCampaignsListResult - public freeclimb.Client.ApiResponse GetTollFreeSmsCampaignsWithHttpInfo() + /// Conference to create (optional) + + /// ApiResponse of ConferenceResult + public freeclimb.Client.ApiResponse CreateAConferenceWithHttpInfo( + CreateConferenceRequest? createConferenceRequest = default(CreateConferenceRequest?) + ) { - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->CreateAConference" + ); + } - string[] _contentTypes = new string[] { - }; + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); + + string[] _contentTypes = new string[] { "application/json" }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -7773,20 +1912,40 @@ public freeclimb.Client.ApiResponse GetTollFreeS localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.Data = createConferenceRequest; + + localVarRequestOptions.Operation = "DefaultApi.CreateAConference"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Messages/TollFree/Campaigns", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/Conferences", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetTollFreeSmsCampaigns", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateAConference", localVarResponse); if (_exception != null) { throw _exception; @@ -7797,40 +1956,51 @@ public freeclimb.Client.ApiResponse GetTollFreeS } /// - /// Get list of TollFree Campaigns + /// Create a Queue /// /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of SMSTollFreeCampaignsListResult - public async System.Threading.Tasks.Task GetTollFreeSmsCampaignsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Queue details used to create a queue (optional) + + /// QueueResult + public QueueResult CreateAQueue(QueueRequest? queueRequest = default(QueueRequest?)) { - freeclimb.Client.ApiResponse localVarResponse = await GetTollFreeSmsCampaignsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = CreateAQueueWithHttpInfo( + queueRequest + ); return localVarResponse.Data; } /// - /// Get list of TollFree Campaigns + /// Create a Queue /// /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (SMSTollFreeCampaignsListResult) - public async System.Threading.Tasks.Task> GetTollFreeSmsCampaignsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Queue details used to create a queue (optional) + + /// ApiResponse of QueueResult + public freeclimb.Client.ApiResponse CreateAQueueWithHttpInfo( + QueueRequest? queueRequest = default(QueueRequest?) + ) { - + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->CreateAQueue" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { "application/json" }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -7842,21 +2012,40 @@ public freeclimb.Client.ApiResponse GetTollFreeS localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.Data = queueRequest; + + localVarRequestOptions.Operation = "DefaultApi.CreateAQueue"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Messages/TollFree/Campaigns", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/Queues", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetTollFreeSmsCampaigns", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateAQueue", localVarResponse); if (_exception != null) { throw _exception; @@ -7867,38 +2056,52 @@ public freeclimb.Client.ApiResponse GetTollFreeS } /// - /// List Active Queues + /// Create an application /// /// Thrown when fails to make API call - /// Return only the Queue resources with aliases that exactly match this name. (optional) - /// QueueList - public QueueList ListActiveQueues(string alias = default(string)) + /// Application Details (optional) + + /// ApplicationResult + public ApplicationResult CreateAnApplication( + ApplicationRequest? applicationRequest = default(ApplicationRequest?) + ) { - freeclimb.Client.ApiResponse localVarResponse = ListActiveQueuesWithHttpInfo(alias ); + freeclimb.Client.ApiResponse localVarResponse = + CreateAnApplicationWithHttpInfo(applicationRequest); return localVarResponse.Data; } /// - /// List Active Queues + /// Create an application /// /// Thrown when fails to make API call - /// Return only the Queue resources with aliases that exactly match this name. (optional) - /// ApiResponse of QueueList - public freeclimb.Client.ApiResponse ListActiveQueuesWithHttpInfo(string alias = default(string)) + /// Application Details (optional) + + /// ApiResponse of ApplicationResult + public freeclimb.Client.ApiResponse CreateAnApplicationWithHttpInfo( + ApplicationRequest? applicationRequest = default(ApplicationRequest?) + ) { - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->CreateAnApplication" + ); + } + + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { "application/json" }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -7910,24 +2113,43 @@ public freeclimb.Client.ApiResponse GetTollFreeS localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (alias != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "alias", alias)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.Data = applicationRequest; + + localVarRequestOptions.Operation = "DefaultApi.CreateAnApplication"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Queues", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/Applications", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListActiveQueues", localVarResponse); + Exception _exception = this.ExceptionFactory( + "CreateAnApplication", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -7938,45 +2160,65 @@ public freeclimb.Client.ApiResponse GetTollFreeS } /// - /// List Active Queues + /// Query the knowledge base /// /// Thrown when fails to make API call - - /// Return only the Queue resources with aliases that exactly match this name. (optional) - - /// Cancellation Token to cancel the request. - /// Task of QueueList - public async System.Threading.Tasks.Task ListActiveQueuesAsync(string alias = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// A string that uniquely identifies the KnowledgeBase resource. + /// Completion request details (optional) + + /// CompletionResult + public CompletionResult CreateKnowledgeBaseCompletion( + string knowledgeBaseId, + CompletionRequest? completionRequest = default(CompletionRequest?) + ) { - freeclimb.Client.ApiResponse localVarResponse = await ListActiveQueuesWithHttpInfoAsync(alias, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = + CreateKnowledgeBaseCompletionWithHttpInfo(knowledgeBaseId, completionRequest); return localVarResponse.Data; } /// - /// List Active Queues + /// Query the knowledge base /// /// Thrown when fails to make API call - - /// Return only the Queue resources with aliases that exactly match this name. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueList) - public async System.Threading.Tasks.Task> ListActiveQueuesWithHttpInfoAsync(string alias = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// A string that uniquely identifies the KnowledgeBase resource. + /// Completion request details (optional) + + /// ApiResponse of CompletionResult + public freeclimb.Client.ApiResponse CreateKnowledgeBaseCompletionWithHttpInfo( + string knowledgeBaseId, + CompletionRequest? completionRequest = default(CompletionRequest?) + ) { - - + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->CreateKnowledgeBaseCompletion" + ); + } + + // verify the required parameter 'knowledgeBaseId' is set + if (knowledgeBaseId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'knowledgeBaseId' when calling DefaultApi->CreateKnowledgeBaseCompletion" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { "application/json" }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -7988,25 +2230,47 @@ public freeclimb.Client.ApiResponse GetTollFreeS localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (alias != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "alias", alias)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "knowledgeBaseId", + freeclimb.Client.ClientUtils.ParameterToString(knowledgeBaseId) + ); // path parameter + localVarRequestOptions.Data = completionRequest; + + localVarRequestOptions.Operation = "DefaultApi.CreateKnowledgeBaseCompletion"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Queues", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/KnowledgeBases/{knowledgeBaseId}/Completion", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListActiveQueues", localVarResponse); + Exception _exception = this.ExceptionFactory( + "CreateKnowledgeBaseCompletion", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -8017,35 +2281,55 @@ public freeclimb.Client.ApiResponse GetTollFreeS } /// - /// List All Account Logs + /// Delete a Recording /// /// Thrown when fails to make API call - /// LogList - public LogList ListAllAccountLogs() + /// String that uniquely identifies this recording resource. + + /// + public void DeleteARecording(string recordingId) { - freeclimb.Client.ApiResponse localVarResponse = ListAllAccountLogsWithHttpInfo(); - return localVarResponse.Data; + DeleteARecordingWithHttpInfo(recordingId); } /// - /// List All Account Logs + /// Delete a Recording /// /// Thrown when fails to make API call - /// ApiResponse of LogList - public freeclimb.Client.ApiResponse ListAllAccountLogsWithHttpInfo() + /// String that uniquely identifies this recording resource. + + /// ApiResponse of Object(void) + public freeclimb.Client.ApiResponse DeleteARecordingWithHttpInfo(string recordingId) { - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->DeleteARecording" + ); + } + + // verify the required parameter 'recordingId' is set + if (recordingId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'recordingId' when calling DefaultApi->DeleteARecording" + ); + } + + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -8057,20 +2341,43 @@ public freeclimb.Client.ApiResponse ListAllAccountLogsWithHttpInfo() localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "recordingId", + freeclimb.Client.ClientUtils.ParameterToString(recordingId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.DeleteARecording"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Logs", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete( + "/Accounts/{accountId}/Recordings/{recordingId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListAllAccountLogs", localVarResponse); + Exception _exception = this.ExceptionFactory("DeleteARecording", localVarResponse); if (_exception != null) { throw _exception; @@ -8081,40 +2388,57 @@ public freeclimb.Client.ApiResponse ListAllAccountLogsWithHttpInfo() } /// - /// List All Account Logs + /// Delete an application /// /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of LogList - public async System.Threading.Tasks.Task ListAllAccountLogsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies this application resource. + + /// + public void DeleteAnApplication(string applicationId) { - freeclimb.Client.ApiResponse localVarResponse = await ListAllAccountLogsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; + DeleteAnApplicationWithHttpInfo(applicationId); } /// - /// List All Account Logs + /// Delete an application /// /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (LogList) - public async System.Threading.Tasks.Task> ListAllAccountLogsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies this application resource. + + /// ApiResponse of Object(void) + public freeclimb.Client.ApiResponse DeleteAnApplicationWithHttpInfo( + string applicationId + ) { - + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->DeleteAnApplication" + ); + } + + // verify the required parameter 'applicationId' is set + if (applicationId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'applicationId' when calling DefaultApi->DeleteAnApplication" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -8126,21 +2450,46 @@ public freeclimb.Client.ApiResponse ListAllAccountLogsWithHttpInfo() localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "applicationId", + freeclimb.Client.ClientUtils.ParameterToString(applicationId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.DeleteAnApplication"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Logs", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Delete( + "/Accounts/{accountId}/Applications/{applicationId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListAllAccountLogs", localVarResponse); + Exception _exception = this.ExceptionFactory( + "DeleteAnApplication", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -8151,38 +2500,57 @@ public freeclimb.Client.ApiResponse ListAllAccountLogsWithHttpInfo() } /// - /// List applications + /// Delete an Incoming Number /// /// Thrown when fails to make API call - /// Return only applications with aliases that exactly match this value. (optional) - /// ApplicationList - public ApplicationList ListApplications(string alias = default(string)) + /// String that uniquely identifies this phone number resource. + + /// + public void DeleteAnIncomingNumber(string phoneNumberId) { - freeclimb.Client.ApiResponse localVarResponse = ListApplicationsWithHttpInfo(alias ); - return localVarResponse.Data; + DeleteAnIncomingNumberWithHttpInfo(phoneNumberId); } /// - /// List applications + /// Delete an Incoming Number /// /// Thrown when fails to make API call - /// Return only applications with aliases that exactly match this value. (optional) - /// ApiResponse of ApplicationList - public freeclimb.Client.ApiResponse ListApplicationsWithHttpInfo(string alias = default(string)) + /// String that uniquely identifies this phone number resource. + + /// ApiResponse of Object(void) + public freeclimb.Client.ApiResponse DeleteAnIncomingNumberWithHttpInfo( + string phoneNumberId + ) { - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->DeleteAnIncomingNumber" + ); + } + + // verify the required parameter 'phoneNumberId' is set + if (phoneNumberId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'phoneNumberId' when calling DefaultApi->DeleteAnIncomingNumber" + ); + } - string[] _contentTypes = new string[] { - }; + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); + + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -8194,24 +2562,46 @@ public freeclimb.Client.ApiResponse ListAllAccountLogsWithHttpInfo() localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (alias != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "alias", alias)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "phoneNumberId", + freeclimb.Client.ClientUtils.ParameterToString(phoneNumberId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.DeleteAnIncomingNumber"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Applications", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete( + "/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListApplications", localVarResponse); + Exception _exception = this.ExceptionFactory( + "DeleteAnIncomingNumber", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -8222,45 +2612,73 @@ public freeclimb.Client.ApiResponse ListAllAccountLogsWithHttpInfo() } /// - /// List applications + /// Dequeue a Member /// /// Thrown when fails to make API call - - /// Return only applications with aliases that exactly match this value. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApplicationList - public async System.Threading.Tasks.Task ListApplicationsAsync(string alias = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies the Queue that the Member belongs to. + /// ID if the Call that the Member belongs to + + /// QueueMember + public QueueMember DequeueAMember(string queueId, string callId) { - freeclimb.Client.ApiResponse localVarResponse = await ListApplicationsWithHttpInfoAsync(alias, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = DequeueAMemberWithHttpInfo( + queueId, + callId + ); return localVarResponse.Data; } /// - /// List applications + /// Dequeue a Member /// /// Thrown when fails to make API call - - /// Return only applications with aliases that exactly match this value. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ApplicationList) - public async System.Threading.Tasks.Task> ListApplicationsWithHttpInfoAsync(string alias = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies the Queue that the Member belongs to. + /// ID if the Call that the Member belongs to + + /// ApiResponse of QueueMember + public freeclimb.Client.ApiResponse DequeueAMemberWithHttpInfo( + string queueId, + string callId + ) { - - + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->DequeueAMember" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + // verify the required parameter 'queueId' is set + if (queueId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'queueId' when calling DefaultApi->DequeueAMember" + ); + } + + // verify the required parameter 'callId' is set + if (callId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'callId' when calling DefaultApi->DequeueAMember" + ); + } + + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -8272,25 +2690,47 @@ public freeclimb.Client.ApiResponse ListAllAccountLogsWithHttpInfo() localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (alias != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "alias", alias)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "queueId", + freeclimb.Client.ClientUtils.ParameterToString(queueId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "callId", + freeclimb.Client.ClientUtils.ParameterToString(callId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.DequeueAMember"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Applications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/Queues/{queueId}/Members/{callId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListApplications", localVarResponse); + Exception _exception = this.ExceptionFactory("DequeueAMember", localVarResponse); if (_exception != null) { throw _exception; @@ -8301,65 +2741,59 @@ public freeclimb.Client.ApiResponse ListAllAccountLogsWithHttpInfo() } /// - /// List available numbers + /// Dequeue Head Member /// /// Thrown when fails to make API call - /// PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. (optional) - /// State or province of this phone number. (optional) - /// Country of this phone number. (optional) - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// AvailableNumberList - public AvailableNumberList ListAvailableNumbers(string phoneNumber = default(string), string region = default(string), string country = default(string), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?)) + /// String that uniquely identifies this queue resource. + + /// QueueMember + public QueueMember DequeueHeadMember(string queueId) { - freeclimb.Client.ApiResponse localVarResponse = ListAvailableNumbersWithHttpInfo(phoneNumber , region , country , voiceEnabled , smsEnabled , capabilitiesVoice , capabilitiesSms , capabilitiesTollFree , capabilitiesTenDLC , capabilitiesShortCode ); + freeclimb.Client.ApiResponse localVarResponse = + DequeueHeadMemberWithHttpInfo(queueId); return localVarResponse.Data; } /// - /// List available numbers + /// Dequeue Head Member /// /// Thrown when fails to make API call - /// PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. (optional) - /// State or province of this phone number. (optional) - /// Country of this phone number. (optional) - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// ApiResponse of AvailableNumberList - public freeclimb.Client.ApiResponse ListAvailableNumbersWithHttpInfo(string phoneNumber = default(string), string region = default(string), string country = default(string), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?)) + /// String that uniquely identifies this queue resource. + + /// ApiResponse of QueueMember + public freeclimb.Client.ApiResponse DequeueHeadMemberWithHttpInfo( + string queueId + ) { - - - - - - - - - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->DequeueHeadMember" + ); + } + + // verify the required parameter 'queueId' is set + if (queueId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'queueId' when calling DefaultApi->DequeueHeadMember" + ); + } + + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); + + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -8371,59 +2805,43 @@ public freeclimb.Client.ApiResponse ListAllAccountLogsWithHttpInfo() localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (phoneNumber != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "phoneNumber", phoneNumber)); - } - if (region != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "region", region)); - } - if (country != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "country", country)); - } - if (voiceEnabled != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "voiceEnabled", voiceEnabled)); - } - if (smsEnabled != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "smsEnabled", smsEnabled)); - } - if (capabilitiesVoice != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.voice", capabilitiesVoice)); - } - if (capabilitiesSms != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.sms", capabilitiesSms)); - } - if (capabilitiesTollFree != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.tollFree", capabilitiesTollFree)); - } - if (capabilitiesTenDLC != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.tenDLC", capabilitiesTenDLC)); - } - if (capabilitiesShortCode != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.shortCode", capabilitiesShortCode)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "queueId", + freeclimb.Client.ClientUtils.ParameterToString(queueId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.DequeueHeadMember"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/AvailablePhoneNumbers", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/Queues/{queueId}/Members/Front", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListAvailableNumbers", localVarResponse); + Exception _exception = this.ExceptionFactory("DequeueHeadMember", localVarResponse); if (_exception != null) { throw _exception; @@ -8434,90 +2852,59 @@ public freeclimb.Client.ApiResponse ListAllAccountLogsWithHttpInfo() } /// - /// List available numbers + /// Download a Recording File /// /// Thrown when fails to make API call - - /// PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. (optional) - - /// State or province of this phone number. (optional) - - /// Country of this phone number. (optional) - - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) - - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// Cancellation Token to cancel the request. - /// Task of AvailableNumberList - public async System.Threading.Tasks.Task ListAvailableNumbersAsync(string phoneNumber = default(string), string region = default(string), string country = default(string), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies this recording resource. + + /// System.IO.Stream + public System.IO.Stream DownloadARecordingFile(string recordingId) { - freeclimb.Client.ApiResponse localVarResponse = await ListAvailableNumbersWithHttpInfoAsync(phoneNumber, region, country, voiceEnabled, smsEnabled, capabilitiesVoice, capabilitiesSms, capabilitiesTollFree, capabilitiesTenDLC, capabilitiesShortCode, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = + DownloadARecordingFileWithHttpInfo(recordingId); return localVarResponse.Data; } /// - /// List available numbers + /// Download a Recording File /// /// Thrown when fails to make API call - - /// PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. (optional) - - /// State or province of this phone number. (optional) - - /// Country of this phone number. (optional) - - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) - - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (AvailableNumberList) - public async System.Threading.Tasks.Task> ListAvailableNumbersWithHttpInfoAsync(string phoneNumber = default(string), string region = default(string), string country = default(string), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies this recording resource. + + /// ApiResponse of System.IO.Stream + public freeclimb.Client.ApiResponse DownloadARecordingFileWithHttpInfo( + string recordingId + ) { - - - - - - - - - - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->DownloadARecordingFile" + ); + } + + // verify the required parameter 'recordingId' is set + if (recordingId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'recordingId' when calling DefaultApi->DownloadARecordingFile" + ); + } + + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); + + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "audio/x-wav" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -8529,60 +2916,46 @@ public freeclimb.Client.ApiResponse ListAllAccountLogsWithHttpInfo() localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - if (phoneNumber != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "phoneNumber", phoneNumber)); - } - if (region != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "region", region)); - } - if (country != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "country", country)); - } - if (voiceEnabled != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "voiceEnabled", voiceEnabled)); - } - if (smsEnabled != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "smsEnabled", smsEnabled)); - } - if (capabilitiesVoice != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.voice", capabilitiesVoice)); - } - if (capabilitiesSms != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.sms", capabilitiesSms)); - } - if (capabilitiesTollFree != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.tollFree", capabilitiesTollFree)); - } - if (capabilitiesTenDLC != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.tenDLC", capabilitiesTenDLC)); - } - if (capabilitiesShortCode != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.shortCode", capabilitiesShortCode)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "recordingId", + freeclimb.Client.ClientUtils.ParameterToString(recordingId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.DownloadARecordingFile"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/AvailablePhoneNumbers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Recordings/{recordingId}/Download", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListAvailableNumbers", localVarResponse); + Exception _exception = this.ExceptionFactory( + "DownloadARecordingFile", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -8593,44 +2966,60 @@ public freeclimb.Client.ApiResponse ListAllAccountLogsWithHttpInfo() } /// - /// List Call Logs + /// Filter Logs /// /// Thrown when fails to make API call - /// String that uniquely identifies this call resource. + /// Filter logs request paramters + /// LogList - public LogList ListCallLogs(string callId) + public LogList FilterLogs(FilterLogsRequest filterLogsRequest) { - freeclimb.Client.ApiResponse localVarResponse = ListCallLogsWithHttpInfo(callId ); + freeclimb.Client.ApiResponse localVarResponse = FilterLogsWithHttpInfo( + filterLogsRequest + ); return localVarResponse.Data; } /// - /// List Call Logs + /// Filter Logs /// /// Thrown when fails to make API call - /// String that uniquely identifies this call resource. + /// Filter logs request paramters + /// ApiResponse of LogList - public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string callId) + public freeclimb.Client.ApiResponse FilterLogsWithHttpInfo( + FilterLogsRequest filterLogsRequest + ) { - - // verify the required parameter 'callId' is set - if (callId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->FilterLogs" + ); + } + + // verify the required parameter 'filterLogsRequest' is set + if (filterLogsRequest == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->ListCallLogs"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'filterLogsRequest' when calling DefaultApi->FilterLogs" + ); } - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { "application/json" }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -8642,21 +3031,40 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.Data = filterLogsRequest; + + localVarRequestOptions.Operation = "DefaultApi.FilterLogs"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Calls/{callId}/Logs", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/Logs", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListCallLogs", localVarResponse); + Exception _exception = this.ExceptionFactory("FilterLogs", localVarResponse); if (_exception != null) { throw _exception; @@ -8667,51 +3075,58 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal } /// - /// List Call Logs + /// Get a Call /// /// Thrown when fails to make API call - /// String that uniquely identifies this call resource. - - /// Cancellation Token to cancel the request. - /// Task of LogList - public async System.Threading.Tasks.Task ListCallLogsAsync(string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + + /// CallResult + public CallResult GetACall(string callId) { - freeclimb.Client.ApiResponse localVarResponse = await ListCallLogsWithHttpInfoAsync(callId, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = GetACallWithHttpInfo( + callId + ); return localVarResponse.Data; } /// - /// List Call Logs + /// Get a Call /// /// Thrown when fails to make API call - /// String that uniquely identifies this call resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (LogList) - public async System.Threading.Tasks.Task> ListCallLogsWithHttpInfoAsync(string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + + /// ApiResponse of CallResult + public freeclimb.Client.ApiResponse GetACallWithHttpInfo(string callId) { - + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetACall" + ); + } + // verify the required parameter 'callId' is set if (callId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->ListCallLogs"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'callId' when calling DefaultApi->GetACall" + ); } - + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -8723,22 +3138,43 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "callId", + freeclimb.Client.ClientUtils.ParameterToString(callId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetACall"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Calls/{callId}/Logs", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Calls/{callId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListCallLogs", localVarResponse); + Exception _exception = this.ExceptionFactory("GetACall", localVarResponse); if (_exception != null) { throw _exception; @@ -8749,47 +3185,59 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal } /// - /// List Call Recordings + /// Get a Conference /// /// Thrown when fails to make API call - /// String that uniquely identifies this call resource. - /// Only show recordings created on the specified date, in the form *YYYY-MM-DD*. (optional) - /// RecordingList - public RecordingList ListCallRecordings(string callId, string dateCreated = default(string)) + /// A string that uniquely identifies this conference resource. + + /// ConferenceResult + public ConferenceResult GetAConference(string conferenceId) { - freeclimb.Client.ApiResponse localVarResponse = ListCallRecordingsWithHttpInfo(callId , dateCreated ); + freeclimb.Client.ApiResponse localVarResponse = + GetAConferenceWithHttpInfo(conferenceId); return localVarResponse.Data; } /// - /// List Call Recordings + /// Get a Conference /// /// Thrown when fails to make API call - /// String that uniquely identifies this call resource. - /// Only show recordings created on the specified date, in the form *YYYY-MM-DD*. (optional) - /// ApiResponse of RecordingList - public freeclimb.Client.ApiResponse ListCallRecordingsWithHttpInfo(string callId, string dateCreated = default(string)) + /// A string that uniquely identifies this conference resource. + + /// ApiResponse of ConferenceResult + public freeclimb.Client.ApiResponse GetAConferenceWithHttpInfo( + string conferenceId + ) { - - // verify the required parameter 'callId' is set - if (callId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetAConference" + ); + } + + // verify the required parameter 'conferenceId' is set + if (conferenceId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->ListCallRecordings"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'conferenceId' when calling DefaultApi->GetAConference" + ); } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -8801,25 +3249,43 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter - if (dateCreated != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateCreated", dateCreated)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "conferenceId", + freeclimb.Client.ClientUtils.ParameterToString(conferenceId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetAConference"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Calls/{callId}/Recordings", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Conferences/{conferenceId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListCallRecordings", localVarResponse); + Exception _exception = this.ExceptionFactory("GetAConference", localVarResponse); if (_exception != null) { throw _exception; @@ -8830,56 +3296,73 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal } /// - /// List Call Recordings + /// Get a Member /// /// Thrown when fails to make API call - - /// String that uniquely identifies this call resource. - - /// Only show recordings created on the specified date, in the form *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of RecordingList - public async System.Threading.Tasks.Task ListCallRecordingsAsync(string callId, string dateCreated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies the Queue that the Member belongs to. + /// ID of the Call that the Member belongs to + + /// QueueMember + public QueueMember GetAMember(string queueId, string callId) { - freeclimb.Client.ApiResponse localVarResponse = await ListCallRecordingsWithHttpInfoAsync(callId, dateCreated, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = GetAMemberWithHttpInfo( + queueId, + callId + ); return localVarResponse.Data; } /// - /// List Call Recordings + /// Get a Member /// /// Thrown when fails to make API call - - /// String that uniquely identifies this call resource. - - /// Only show recordings created on the specified date, in the form *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (RecordingList) - public async System.Threading.Tasks.Task> ListCallRecordingsWithHttpInfoAsync(string callId, string dateCreated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies the Queue that the Member belongs to. + /// ID of the Call that the Member belongs to + + /// ApiResponse of QueueMember + public freeclimb.Client.ApiResponse GetAMemberWithHttpInfo( + string queueId, + string callId + ) { - + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetAMember" + ); + } + + // verify the required parameter 'queueId' is set + if (queueId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'queueId' when calling DefaultApi->GetAMember" + ); + } + // verify the required parameter 'callId' is set if (callId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->ListCallRecordings"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'callId' when calling DefaultApi->GetAMember" + ); } - - + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -8891,26 +3374,47 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter - if (dateCreated != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateCreated", dateCreated)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "queueId", + freeclimb.Client.ClientUtils.ParameterToString(queueId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "callId", + freeclimb.Client.ClientUtils.ParameterToString(callId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetAMember"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Calls/{callId}/Recordings", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Queues/{queueId}/Members/{callId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListCallRecordings", localVarResponse); + Exception _exception = this.ExceptionFactory("GetAMember", localVarResponse); if (_exception != null) { throw _exception; @@ -8921,59 +3425,71 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal } /// - /// List Calls + /// Get a Participant /// /// Thrown when fails to make API call - /// If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. (optional, default to false) - /// Only show Calls to this phone number. (optional) - /// Only show Calls from this phone number. (optional) - /// Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. (optional) - /// Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. (optional) - /// Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) - /// Only show Calls spawned by the call with this ID. (optional) - /// Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) - /// CallList - public CallList ListCalls(bool? active = default(bool?), string to = default(string), string from = default(string), CallStatus? status = default(CallStatus?), string startTime = default(string), string endTime = default(string), string parentCallId = default(string), List applicationId = default(List)) + /// ID of the conference this participant is in. + /// ID of the Call associated with this participant. + + /// ConferenceParticipantResult + public ConferenceParticipantResult GetAParticipant(string conferenceId, string callId) { - freeclimb.Client.ApiResponse localVarResponse = ListCallsWithHttpInfo(active , to , from , status , startTime , endTime , parentCallId , applicationId ); + freeclimb.Client.ApiResponse localVarResponse = + GetAParticipantWithHttpInfo(conferenceId, callId); return localVarResponse.Data; } /// - /// List Calls + /// Get a Participant /// /// Thrown when fails to make API call - /// If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. (optional, default to false) - /// Only show Calls to this phone number. (optional) - /// Only show Calls from this phone number. (optional) - /// Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. (optional) - /// Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. (optional) - /// Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) - /// Only show Calls spawned by the call with this ID. (optional) - /// Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) - /// ApiResponse of CallList - public freeclimb.Client.ApiResponse ListCallsWithHttpInfo(bool? active = default(bool?), string to = default(string), string from = default(string), CallStatus? status = default(CallStatus?), string startTime = default(string), string endTime = default(string), string parentCallId = default(string), List applicationId = default(List)) + /// ID of the conference this participant is in. + /// ID of the Call associated with this participant. + + /// ApiResponse of ConferenceParticipantResult + public freeclimb.Client.ApiResponse GetAParticipantWithHttpInfo( + string conferenceId, + string callId + ) { - - - - - - - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetAParticipant" + ); + } + + // verify the required parameter 'conferenceId' is set + if (conferenceId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'conferenceId' when calling DefaultApi->GetAParticipant" + ); + } + + // verify the required parameter 'callId' is set + if (callId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'callId' when calling DefaultApi->GetAParticipant" + ); + } + + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); + + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -8985,52 +3501,47 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (active != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "active", active)); - } - if (to != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "to", to)); - } - if (from != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "from", from)); - } - if (status != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "status", status)); - } - if (startTime != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "startTime", startTime)); - } - if (endTime != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "endTime", endTime)); - } - if (parentCallId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "parentCallId", parentCallId)); - } - if (applicationId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("multi", "applicationId", applicationId)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "conferenceId", + freeclimb.Client.ClientUtils.ParameterToString(conferenceId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "callId", + freeclimb.Client.ClientUtils.ParameterToString(callId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetAParticipant"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Calls", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListCalls", localVarResponse); + Exception _exception = this.ExceptionFactory("GetAParticipant", localVarResponse); if (_exception != null) { throw _exception; @@ -9041,80 +3552,58 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal } /// - /// List Calls + /// Get a Queue /// /// Thrown when fails to make API call - - /// If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. (optional, default to false) - - /// Only show Calls to this phone number. (optional) - - /// Only show Calls from this phone number. (optional) - - /// Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. (optional) - - /// Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. (optional) - - /// Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) - - /// Only show Calls spawned by the call with this ID. (optional) - - /// Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) - - /// Cancellation Token to cancel the request. - /// Task of CallList - public async System.Threading.Tasks.Task ListCallsAsync(bool? active = default(bool?), string to = default(string), string from = default(string), CallStatus? status = default(CallStatus?), string startTime = default(string), string endTime = default(string), string parentCallId = default(string), List applicationId = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// A string that uniquely identifies this queue resource. + + /// QueueResult + public QueueResult GetAQueue(string queueId) { - freeclimb.Client.ApiResponse localVarResponse = await ListCallsWithHttpInfoAsync(active, to, from, status, startTime, endTime, parentCallId, applicationId, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = GetAQueueWithHttpInfo( + queueId + ); return localVarResponse.Data; } /// - /// List Calls + /// Get a Queue /// /// Thrown when fails to make API call - - /// If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. (optional, default to false) - - /// Only show Calls to this phone number. (optional) - - /// Only show Calls from this phone number. (optional) - - /// Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. (optional) - - /// Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. (optional) - - /// Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) - - /// Only show Calls spawned by the call with this ID. (optional) - - /// Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CallList) - public async System.Threading.Tasks.Task> ListCallsWithHttpInfoAsync(bool? active = default(bool?), string to = default(string), string from = default(string), CallStatus? status = default(CallStatus?), string startTime = default(string), string endTime = default(string), string parentCallId = default(string), List applicationId = default(List), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// A string that uniquely identifies this queue resource. + + /// ApiResponse of QueueResult + public freeclimb.Client.ApiResponse GetAQueueWithHttpInfo(string queueId) { - - - - - - - - - + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetAQueue" + ); + } + + // verify the required parameter 'queueId' is set + if (queueId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'queueId' when calling DefaultApi->GetAQueue" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -9126,53 +3615,43 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (active != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "active", active)); - } - if (to != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "to", to)); - } - if (from != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "from", from)); - } - if (status != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "status", status)); - } - if (startTime != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "startTime", startTime)); - } - if (endTime != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "endTime", endTime)); - } - if (parentCallId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "parentCallId", parentCallId)); - } - if (applicationId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("multi", "applicationId", applicationId)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "queueId", + freeclimb.Client.ClientUtils.ParameterToString(queueId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetAQueue"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Calls", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Queues/{queueId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListCalls", localVarResponse); + Exception _exception = this.ExceptionFactory("GetAQueue", localVarResponse); if (_exception != null) { throw _exception; @@ -9183,50 +3662,59 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal } /// - /// List Conference Recordings + /// Get a Recording /// /// Thrown when fails to make API call - /// Show only Recordings made during the conference with this ID. - /// Show only Recordings made during the Call with this ID. (optional) - /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - /// RecordingList - public RecordingList ListConferenceRecordings(string conferenceId, string callId = default(string), string dateCreated = default(string)) + /// String that uniquely identifies this recording resource. + + /// RecordingResult + public RecordingResult GetARecording(string recordingId) { - freeclimb.Client.ApiResponse localVarResponse = ListConferenceRecordingsWithHttpInfo(conferenceId , callId , dateCreated ); + freeclimb.Client.ApiResponse localVarResponse = + GetARecordingWithHttpInfo(recordingId); return localVarResponse.Data; } /// - /// List Conference Recordings + /// Get a Recording /// /// Thrown when fails to make API call - /// Show only Recordings made during the conference with this ID. - /// Show only Recordings made during the Call with this ID. (optional) - /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - /// ApiResponse of RecordingList - public freeclimb.Client.ApiResponse ListConferenceRecordingsWithHttpInfo(string conferenceId, string callId = default(string), string dateCreated = default(string)) + /// String that uniquely identifies this recording resource. + + /// ApiResponse of RecordingResult + public freeclimb.Client.ApiResponse GetARecordingWithHttpInfo( + string recordingId + ) { - - // verify the required parameter 'conferenceId' is set - if (conferenceId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetARecording" + ); + } + + // verify the required parameter 'recordingId' is set + if (recordingId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'conferenceId' when calling DefaultApi->ListConferenceRecordings"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'recordingId' when calling DefaultApi->GetARecording" + ); } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -9238,29 +3726,43 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("conferenceId", freeclimb.Client.ClientUtils.ParameterToString(conferenceId)); // path parameter - if (callId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "callId", callId)); - } - if (dateCreated != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateCreated", dateCreated)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "recordingId", + freeclimb.Client.ClientUtils.ParameterToString(recordingId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetARecording"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Conferences/{conferenceId}/Recordings", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Recordings/{recordingId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListConferenceRecordings", localVarResponse); + Exception _exception = this.ExceptionFactory("GetARecording", localVarResponse); if (_exception != null) { throw _exception; @@ -9271,61 +3773,46 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal } /// - /// List Conference Recordings + /// Get an Account /// /// Thrown when fails to make API call - - /// Show only Recordings made during the conference with this ID. - - /// Show only Recordings made during the Call with this ID. (optional) - - /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of RecordingList - public async System.Threading.Tasks.Task ListConferenceRecordingsAsync(string conferenceId, string callId = default(string), string dateCreated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + + /// AccountResult + public AccountResult GetAnAccount() { - freeclimb.Client.ApiResponse localVarResponse = await ListConferenceRecordingsWithHttpInfoAsync(conferenceId, callId, dateCreated, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = + GetAnAccountWithHttpInfo(); return localVarResponse.Data; } /// - /// List Conference Recordings + /// Get an Account /// /// Thrown when fails to make API call - - /// Show only Recordings made during the conference with this ID. - - /// Show only Recordings made during the Call with this ID. (optional) - - /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (RecordingList) - public async System.Threading.Tasks.Task> ListConferenceRecordingsWithHttpInfoAsync(string conferenceId, string callId = default(string), string dateCreated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + + /// ApiResponse of AccountResult + public freeclimb.Client.ApiResponse GetAnAccountWithHttpInfo() { - - // verify the required parameter 'conferenceId' is set - if (conferenceId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'conferenceId' when calling DefaultApi->ListConferenceRecordings"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetAnAccount" + ); } - - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -9337,30 +3824,39 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("conferenceId", freeclimb.Client.ClientUtils.ParameterToString(conferenceId)); // path parameter - if (callId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "callId", callId)); - } - if (dateCreated != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateCreated", dateCreated)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetAnAccount"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Conferences/{conferenceId}/Recordings", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListConferenceRecordings", localVarResponse); + Exception _exception = this.ExceptionFactory("GetAnAccount", localVarResponse); if (_exception != null) { throw _exception; @@ -9371,47 +3867,59 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal } /// - /// List Conferences + /// Get an Application /// /// Thrown when fails to make API call - /// Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. (optional) - /// List Conferences whose alias exactly matches this string. (optional) - /// Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. (optional) - /// Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. (optional) - /// ConferenceList - public ConferenceList ListConferences(string status = default(string), string alias = default(string), string dateCreated = default(string), string dateUpdated = default(string)) + /// A string that uniquely identifies this application resource. + + /// ApplicationResult + public ApplicationResult GetAnApplication(string applicationId) { - freeclimb.Client.ApiResponse localVarResponse = ListConferencesWithHttpInfo(status , alias , dateCreated , dateUpdated ); + freeclimb.Client.ApiResponse localVarResponse = + GetAnApplicationWithHttpInfo(applicationId); return localVarResponse.Data; } /// - /// List Conferences + /// Get an Application /// /// Thrown when fails to make API call - /// Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. (optional) - /// List Conferences whose alias exactly matches this string. (optional) - /// Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. (optional) - /// Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. (optional) - /// ApiResponse of ConferenceList - public freeclimb.Client.ApiResponse ListConferencesWithHttpInfo(string status = default(string), string alias = default(string), string dateCreated = default(string), string dateUpdated = default(string)) + /// A string that uniquely identifies this application resource. + + /// ApiResponse of ApplicationResult + public freeclimb.Client.ApiResponse GetAnApplicationWithHttpInfo( + string applicationId + ) { - - - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetAnApplication" + ); + } + + // verify the required parameter 'applicationId' is set + if (applicationId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'applicationId' when calling DefaultApi->GetAnApplication" + ); + } + + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -9423,36 +3931,43 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (status != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "status", status)); - } - if (alias != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "alias", alias)); - } - if (dateCreated != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateCreated", dateCreated)); - } - if (dateUpdated != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateUpdated", dateUpdated)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "applicationId", + freeclimb.Client.ClientUtils.ParameterToString(applicationId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetAnApplication"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Conferences", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Applications/{applicationId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListConferences", localVarResponse); + Exception _exception = this.ExceptionFactory("GetAnApplication", localVarResponse); if (_exception != null) { throw _exception; @@ -9463,60 +3978,59 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal } /// - /// List Conferences + /// Get an Incoming Number /// /// Thrown when fails to make API call - - /// Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. (optional) - - /// List Conferences whose alias exactly matches this string. (optional) - - /// Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. (optional) - - /// Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ConferenceList - public async System.Threading.Tasks.Task ListConferencesAsync(string status = default(string), string alias = default(string), string dateCreated = default(string), string dateUpdated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies this phone number resource. + + /// IncomingNumberResult + public IncomingNumberResult GetAnIncomingNumber(string phoneNumberId) { - freeclimb.Client.ApiResponse localVarResponse = await ListConferencesWithHttpInfoAsync(status, alias, dateCreated, dateUpdated, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = + GetAnIncomingNumberWithHttpInfo(phoneNumberId); return localVarResponse.Data; } /// - /// List Conferences - /// - /// Thrown when fails to make API call - - /// Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. (optional) - - /// List Conferences whose alias exactly matches this string. (optional) - - /// Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. (optional) - - /// Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ConferenceList) - public async System.Threading.Tasks.Task> ListConferencesWithHttpInfoAsync(string status = default(string), string alias = default(string), string dateCreated = default(string), string dateUpdated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Get an Incoming Number + /// + /// Thrown when fails to make API call + /// String that uniquely identifies this phone number resource. + + /// ApiResponse of IncomingNumberResult + public freeclimb.Client.ApiResponse GetAnIncomingNumberWithHttpInfo( + string phoneNumberId + ) { - - - - - + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetAnIncomingNumber" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + // verify the required parameter 'phoneNumberId' is set + if (phoneNumberId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'phoneNumberId' when calling DefaultApi->GetAnIncomingNumber" + ); + } - string[] _contentTypes = new string[] { - }; + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); + + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -9528,37 +4042,46 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (status != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "status", status)); - } - if (alias != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "alias", alias)); - } - if (dateCreated != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateCreated", dateCreated)); - } - if (dateUpdated != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateUpdated", dateUpdated)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "phoneNumberId", + freeclimb.Client.ClientUtils.ParameterToString(phoneNumberId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetAnIncomingNumber"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Conferences", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListConferences", localVarResponse); + Exception _exception = this.ExceptionFactory( + "GetAnIncomingNumber", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -9569,83 +4092,59 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal } /// - /// List Incoming Numbers + /// Get an SMS Message /// /// Thrown when fails to make API call - /// Only show incoming phone number resources that match this PCRE-compatible regular expression. (optional) - /// Only show incoming phone numbers with aliases that exactly match this value. (optional) - /// State or province of this phone number. (optional) - /// Country of this phone number. (optional) - /// 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) - /// Indication of whether the phone number has an application linked to it. (optional, default to false) - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) (deprecated) - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) (deprecated) - /// Indication of whether the phone number has a campaign associated with it (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. (optional) - /// 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) - /// IncomingNumberList - public IncomingNumberList ListIncomingNumbers(string phoneNumber = default(string), string alias = default(string), string region = default(string), string country = default(string), string applicationId = default(string), bool? hasApplication = default(bool?), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? hasCampaign = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?), string tfnCampaignId = default(string), bool? offnet = default(bool?)) + /// String that uniquely identifies this Message resource. + + /// MessageResult + public MessageResult GetAnSmsMessage(string messageId) { - freeclimb.Client.ApiResponse localVarResponse = ListIncomingNumbersWithHttpInfo(phoneNumber , alias , region , country , applicationId , hasApplication , voiceEnabled , smsEnabled , hasCampaign , capabilitiesVoice , capabilitiesSms , capabilitiesTollFree , capabilitiesTenDLC , capabilitiesShortCode , tfnCampaignId , offnet ); + freeclimb.Client.ApiResponse localVarResponse = + GetAnSmsMessageWithHttpInfo(messageId); return localVarResponse.Data; } /// - /// List Incoming Numbers + /// Get an SMS Message /// /// Thrown when fails to make API call - /// Only show incoming phone number resources that match this PCRE-compatible regular expression. (optional) - /// Only show incoming phone numbers with aliases that exactly match this value. (optional) - /// State or province of this phone number. (optional) - /// Country of this phone number. (optional) - /// 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) - /// Indication of whether the phone number has an application linked to it. (optional, default to false) - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) (deprecated) - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) (deprecated) - /// Indication of whether the phone number has a campaign associated with it (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. (optional) - /// 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) - /// ApiResponse of IncomingNumberList - public freeclimb.Client.ApiResponse ListIncomingNumbersWithHttpInfo(string phoneNumber = default(string), string alias = default(string), string region = default(string), string country = default(string), string applicationId = default(string), bool? hasApplication = default(bool?), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? hasCampaign = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?), string tfnCampaignId = default(string), bool? offnet = default(bool?)) + /// String that uniquely identifies this Message resource. + + /// ApiResponse of MessageResult + public freeclimb.Client.ApiResponse GetAnSmsMessageWithHttpInfo( + string messageId + ) { - - - - - - - - - - - - - - - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetAnSmsMessage" + ); + } + + // verify the required parameter 'messageId' is set + if (messageId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'messageId' when calling DefaultApi->GetAnSmsMessage" + ); + } + + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); + + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -9657,84 +4156,43 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (phoneNumber != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "phoneNumber", phoneNumber)); - } - if (alias != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "alias", alias)); - } - if (region != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "region", region)); - } - if (country != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "country", country)); - } - if (applicationId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "applicationId", applicationId)); - } - if (hasApplication != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "hasApplication", hasApplication)); - } - if (voiceEnabled != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "voiceEnabled", voiceEnabled)); - } - if (smsEnabled != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "smsEnabled", smsEnabled)); - } - if (hasCampaign != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "hasCampaign", hasCampaign)); - } - if (capabilitiesVoice != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.voice", capabilitiesVoice)); - } - if (capabilitiesSms != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.sms", capabilitiesSms)); - } - if (capabilitiesTollFree != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.tollFree", capabilitiesTollFree)); - } - if (capabilitiesTenDLC != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.tenDLC", capabilitiesTenDLC)); - } - if (capabilitiesShortCode != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.shortCode", capabilitiesShortCode)); - } - if (tfnCampaignId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "tfn.campaignId", tfnCampaignId)); - } - if (offnet != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "offnet", offnet)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "messageId", + freeclimb.Client.ClientUtils.ParameterToString(messageId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetAnSmsMessage"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/IncomingPhoneNumbers", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Messages/{messageId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListIncomingNumbers", localVarResponse); + Exception _exception = this.ExceptionFactory("GetAnSmsMessage", localVarResponse); if (_exception != null) { throw _exception; @@ -9745,120 +4203,58 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal } /// - /// List Incoming Numbers + /// Get Head Member /// /// Thrown when fails to make API call - - /// Only show incoming phone number resources that match this PCRE-compatible regular expression. (optional) - - /// Only show incoming phone numbers with aliases that exactly match this value. (optional) - - /// State or province of this phone number. (optional) - - /// Country of this phone number. (optional) - - /// 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) - - /// Indication of whether the phone number has an application linked to it. (optional, default to false) - - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) (deprecated) - - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) (deprecated) - - /// Indication of whether the phone number has a campaign associated with it (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. (optional) - - /// 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) - - /// Cancellation Token to cancel the request. - /// Task of IncomingNumberList - public async System.Threading.Tasks.Task ListIncomingNumbersAsync(string phoneNumber = default(string), string alias = default(string), string region = default(string), string country = default(string), string applicationId = default(string), bool? hasApplication = default(bool?), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? hasCampaign = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?), string tfnCampaignId = default(string), bool? offnet = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies the Queue that the Member belongs to. + + /// QueueMember + public QueueMember GetHeadMember(string queueId) { - freeclimb.Client.ApiResponse localVarResponse = await ListIncomingNumbersWithHttpInfoAsync(phoneNumber, alias, region, country, applicationId, hasApplication, voiceEnabled, smsEnabled, hasCampaign, capabilitiesVoice, capabilitiesSms, capabilitiesTollFree, capabilitiesTenDLC, capabilitiesShortCode, tfnCampaignId, offnet, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = GetHeadMemberWithHttpInfo( + queueId + ); return localVarResponse.Data; } /// - /// List Incoming Numbers + /// Get Head Member /// /// Thrown when fails to make API call - - /// Only show incoming phone number resources that match this PCRE-compatible regular expression. (optional) - - /// Only show incoming phone numbers with aliases that exactly match this value. (optional) - - /// State or province of this phone number. (optional) - - /// Country of this phone number. (optional) - - /// 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) - - /// Indication of whether the phone number has an application linked to it. (optional, default to false) - - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) (deprecated) - - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) (deprecated) - - /// Indication of whether the phone number has a campaign associated with it (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// (optional) - - /// Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. (optional) - - /// 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) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (IncomingNumberList) - public async System.Threading.Tasks.Task> ListIncomingNumbersWithHttpInfoAsync(string phoneNumber = default(string), string alias = default(string), string region = default(string), string country = default(string), string applicationId = default(string), bool? hasApplication = default(bool?), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? hasCampaign = default(bool?), bool? capabilitiesVoice = default(bool?), bool? capabilitiesSms = default(bool?), bool? capabilitiesTollFree = default(bool?), bool? capabilitiesTenDLC = default(bool?), bool? capabilitiesShortCode = default(bool?), string tfnCampaignId = default(string), bool? offnet = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies the Queue that the Member belongs to. + + /// ApiResponse of QueueMember + public freeclimb.Client.ApiResponse GetHeadMemberWithHttpInfo(string queueId) { - - - - - - - - - - - - - - - - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetHeadMember" + ); + } + + // verify the required parameter 'queueId' is set + if (queueId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'queueId' when calling DefaultApi->GetHeadMember" + ); + } + + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); + + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -9870,85 +4266,43 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (phoneNumber != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "phoneNumber", phoneNumber)); - } - if (alias != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "alias", alias)); - } - if (region != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "region", region)); - } - if (country != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "country", country)); - } - if (applicationId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "applicationId", applicationId)); - } - if (hasApplication != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "hasApplication", hasApplication)); - } - if (voiceEnabled != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "voiceEnabled", voiceEnabled)); - } - if (smsEnabled != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "smsEnabled", smsEnabled)); - } - if (hasCampaign != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "hasCampaign", hasCampaign)); - } - if (capabilitiesVoice != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.voice", capabilitiesVoice)); - } - if (capabilitiesSms != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.sms", capabilitiesSms)); - } - if (capabilitiesTollFree != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.tollFree", capabilitiesTollFree)); - } - if (capabilitiesTenDLC != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.tenDLC", capabilitiesTenDLC)); - } - if (capabilitiesShortCode != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "capabilities.shortCode", capabilitiesShortCode)); - } - if (tfnCampaignId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "tfn.campaignId", tfnCampaignId)); - } - if (offnet != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "offnet", offnet)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "queueId", + freeclimb.Client.ClientUtils.ParameterToString(queueId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetHeadMember"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/IncomingPhoneNumbers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Queues/{queueId}/Members/Front", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListIncomingNumbers", localVarResponse); + Exception _exception = this.ExceptionFactory("GetHeadMember", localVarResponse); if (_exception != null) { throw _exception; @@ -9959,44 +4313,59 @@ public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string cal } /// - /// List Members + /// Get a 10DLC SMS Brand /// /// Thrown when fails to make API call - /// String that uniquely identifies the Queue that the Member belongs to. - /// QueueMemberList - public QueueMemberList ListMembers(string queueId) + /// String that uniquely identifies this brand resource. + + /// SMSTenDLCBrand + public SMSTenDLCBrand GetTenDLCSmsBrand(string brandId) { - freeclimb.Client.ApiResponse localVarResponse = ListMembersWithHttpInfo(queueId ); + freeclimb.Client.ApiResponse localVarResponse = + GetTenDLCSmsBrandWithHttpInfo(brandId); return localVarResponse.Data; } /// - /// List Members + /// Get a 10DLC SMS Brand /// /// Thrown when fails to make API call - /// String that uniquely identifies the Queue that the Member belongs to. - /// ApiResponse of QueueMemberList - public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(string queueId) + /// String that uniquely identifies this brand resource. + + /// ApiResponse of SMSTenDLCBrand + public freeclimb.Client.ApiResponse GetTenDLCSmsBrandWithHttpInfo( + string brandId + ) { - - // verify the required parameter 'queueId' is set - if (queueId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'queueId' when calling DefaultApi->ListMembers"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetTenDLCSmsBrand" + ); } - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + // verify the required parameter 'brandId' is set + if (brandId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'brandId' when calling DefaultApi->GetTenDLCSmsBrand" + ); + } - string[] _contentTypes = new string[] { - }; + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); + + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -10008,21 +4377,43 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("queueId", freeclimb.Client.ClientUtils.ParameterToString(queueId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "brandId", + freeclimb.Client.ClientUtils.ParameterToString(brandId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetTenDLCSmsBrand"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Queues/{queueId}/Members", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Messages/10DLC/Brands/{brandId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListMembers", localVarResponse); + Exception _exception = this.ExceptionFactory("GetTenDLCSmsBrand", localVarResponse); if (_exception != null) { throw _exception; @@ -10033,51 +4424,46 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str } /// - /// List Members + /// Get list of SMS 10DLC Brands /// /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// Cancellation Token to cancel the request. - /// Task of QueueMemberList - public async System.Threading.Tasks.Task ListMembersAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + + /// SMSTenDLCBrandsListResult + public SMSTenDLCBrandsListResult GetTenDLCSmsBrands() { - freeclimb.Client.ApiResponse localVarResponse = await ListMembersWithHttpInfoAsync(queueId, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = + GetTenDLCSmsBrandsWithHttpInfo(); return localVarResponse.Data; } /// - /// List Members + /// Get list of SMS 10DLC Brands /// /// Thrown when fails to make API call - - /// String that uniquely identifies the Queue that the Member belongs to. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueMemberList) - public async System.Threading.Tasks.Task> ListMembersWithHttpInfoAsync(string queueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + + /// ApiResponse of SMSTenDLCBrandsListResult + public freeclimb.Client.ApiResponse GetTenDLCSmsBrandsWithHttpInfo() { - - // verify the required parameter 'queueId' is set - if (queueId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'queueId' when calling DefaultApi->ListMembers"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetTenDLCSmsBrands" + ); } - + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -10089,22 +4475,42 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("queueId", freeclimb.Client.ClientUtils.ParameterToString(queueId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetTenDLCSmsBrands"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Queues/{queueId}/Members", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Messages/10DLC/Brands", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListMembers", localVarResponse); + Exception _exception = this.ExceptionFactory( + "GetTenDLCSmsBrands", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -10115,53 +4521,59 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str } /// - /// List Participants + /// Get a 10DLC SMS Campaign /// /// Thrown when fails to make API call - /// ID of the conference this participant is in. - /// Only show Participants with the talk privilege. (optional) - /// Only show Participants with the listen privilege. (optional) - /// Only show Participants with the dtmfPassThrough privilege. (optional) - /// ConferenceParticipantList - public ConferenceParticipantList ListParticipants(string conferenceId, bool? talk = default(bool?), bool? listen = default(bool?), bool? dtmfPassThrough = default(bool?)) + /// String that uniquely identifies this campaign resource. + + /// SMSTenDLCCampaign + public SMSTenDLCCampaign GetTenDLCSmsCampaign(string campaignId) { - freeclimb.Client.ApiResponse localVarResponse = ListParticipantsWithHttpInfo(conferenceId , talk , listen , dtmfPassThrough ); + freeclimb.Client.ApiResponse localVarResponse = + GetTenDLCSmsCampaignWithHttpInfo(campaignId); return localVarResponse.Data; } /// - /// List Participants + /// Get a 10DLC SMS Campaign /// /// Thrown when fails to make API call - /// ID of the conference this participant is in. - /// Only show Participants with the talk privilege. (optional) - /// Only show Participants with the listen privilege. (optional) - /// Only show Participants with the dtmfPassThrough privilege. (optional) - /// ApiResponse of ConferenceParticipantList - public freeclimb.Client.ApiResponse ListParticipantsWithHttpInfo(string conferenceId, bool? talk = default(bool?), bool? listen = default(bool?), bool? dtmfPassThrough = default(bool?)) + /// String that uniquely identifies this campaign resource. + + /// ApiResponse of SMSTenDLCCampaign + public freeclimb.Client.ApiResponse GetTenDLCSmsCampaignWithHttpInfo( + string campaignId + ) { - - // verify the required parameter 'conferenceId' is set - if (conferenceId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetTenDLCSmsCampaign" + ); + } + + // verify the required parameter 'campaignId' is set + if (campaignId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'conferenceId' when calling DefaultApi->ListParticipants"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'campaignId' when calling DefaultApi->GetTenDLCSmsCampaign" + ); } - - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -10173,33 +4585,46 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("conferenceId", freeclimb.Client.ClientUtils.ParameterToString(conferenceId)); // path parameter - if (talk != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "talk", talk)); - } - if (listen != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "listen", listen)); - } - if (dtmfPassThrough != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dtmfPassThrough", dtmfPassThrough)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "campaignId", + freeclimb.Client.ClientUtils.ParameterToString(campaignId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetTenDLCSmsCampaign"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Conferences/{conferenceId}/Participants", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Messages/10DLC/Campaigns/{campaignId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListParticipants", localVarResponse); + Exception _exception = this.ExceptionFactory( + "GetTenDLCSmsCampaign", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -10210,66 +4635,52 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str } /// - /// List Participants + /// Get list of SMS 10DLC Campaigns /// /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// Only show Participants with the talk privilege. (optional) - - /// Only show Participants with the listen privilege. (optional) - - /// Only show Participants with the dtmfPassThrough privilege. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ConferenceParticipantList - public async System.Threading.Tasks.Task ListParticipantsAsync(string conferenceId, bool? talk = default(bool?), bool? listen = default(bool?), bool? dtmfPassThrough = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// The unique identifier for a brand (optional) + + /// SMSTenDLCCampaignsListResult + public SMSTenDLCCampaignsListResult GetTenDLCSmsCampaigns( + string? brandId = default(string?) + ) { - freeclimb.Client.ApiResponse localVarResponse = await ListParticipantsWithHttpInfoAsync(conferenceId, talk, listen, dtmfPassThrough, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = + GetTenDLCSmsCampaignsWithHttpInfo(brandId); return localVarResponse.Data; } /// - /// List Participants + /// Get list of SMS 10DLC Campaigns /// /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// Only show Participants with the talk privilege. (optional) - - /// Only show Participants with the listen privilege. (optional) - - /// Only show Participants with the dtmfPassThrough privilege. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ConferenceParticipantList) - public async System.Threading.Tasks.Task> ListParticipantsWithHttpInfoAsync(string conferenceId, bool? talk = default(bool?), bool? listen = default(bool?), bool? dtmfPassThrough = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// The unique identifier for a brand (optional) + + /// ApiResponse of SMSTenDLCCampaignsListResult + public freeclimb.Client.ApiResponse GetTenDLCSmsCampaignsWithHttpInfo( + string? brandId = default(string?) + ) { - - // verify the required parameter 'conferenceId' is set - if (conferenceId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'conferenceId' when calling DefaultApi->ListParticipants"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetTenDLCSmsCampaigns" + ); } - - - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -10281,34 +4692,48 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("conferenceId", freeclimb.Client.ClientUtils.ParameterToString(conferenceId)); // path parameter - if (talk != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "talk", talk)); - } - if (listen != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "listen", listen)); - } - if (dtmfPassThrough != null) + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + if (brandId != null) { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dtmfPassThrough", dtmfPassThrough)); + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "brandId", brandId) + ); } + localVarRequestOptions.Operation = "DefaultApi.GetTenDLCSmsCampaigns"; + // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Conferences/{conferenceId}/Participants", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Messages/10DLC/Campaigns", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListParticipants", localVarResponse); + Exception _exception = this.ExceptionFactory( + "GetTenDLCSmsCampaigns", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -10319,44 +4744,59 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str } /// - /// List Recordings + /// Get a 10DLC SMS Partner Campaign /// /// Thrown when fails to make API call - /// Show only Recordings made during the Call with this ID. (optional) - /// Show only Recordings made during the conference with this ID. (optional) - /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - /// RecordingList - public RecordingList ListRecordings(string callId = default(string), string conferenceId = default(string), string dateCreated = default(string)) + /// String that uniquely identifies this campaign resource. + + /// SMSTenDLCPartnerCampaign + public SMSTenDLCPartnerCampaign GetTenDLCSmsPartnerCampaign(string campaignId) { - freeclimb.Client.ApiResponse localVarResponse = ListRecordingsWithHttpInfo(callId , conferenceId , dateCreated ); + freeclimb.Client.ApiResponse localVarResponse = + GetTenDLCSmsPartnerCampaignWithHttpInfo(campaignId); return localVarResponse.Data; } /// - /// List Recordings + /// Get a 10DLC SMS Partner Campaign /// /// Thrown when fails to make API call - /// Show only Recordings made during the Call with this ID. (optional) - /// Show only Recordings made during the conference with this ID. (optional) - /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - /// ApiResponse of RecordingList - public freeclimb.Client.ApiResponse ListRecordingsWithHttpInfo(string callId = default(string), string conferenceId = default(string), string dateCreated = default(string)) + /// String that uniquely identifies this campaign resource. + + /// ApiResponse of SMSTenDLCPartnerCampaign + public freeclimb.Client.ApiResponse GetTenDLCSmsPartnerCampaignWithHttpInfo( + string campaignId + ) { - - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetTenDLCSmsPartnerCampaign" + ); + } + + // verify the required parameter 'campaignId' is set + if (campaignId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'campaignId' when calling DefaultApi->GetTenDLCSmsPartnerCampaign" + ); + } + + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -10368,32 +4808,46 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (callId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "callId", callId)); - } - if (conferenceId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "conferenceId", conferenceId)); - } - if (dateCreated != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateCreated", dateCreated)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "campaignId", + freeclimb.Client.ClientUtils.ParameterToString(campaignId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetTenDLCSmsPartnerCampaign"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Recordings", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns/{campaignId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListRecordings", localVarResponse); + Exception _exception = this.ExceptionFactory( + "GetTenDLCSmsPartnerCampaign", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -10404,55 +4858,52 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str } /// - /// List Recordings + /// Get list of SMS 10DLC Partner Campaigns /// /// Thrown when fails to make API call - - /// Show only Recordings made during the Call with this ID. (optional) - - /// Show only Recordings made during the conference with this ID. (optional) - - /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of RecordingList - public async System.Threading.Tasks.Task ListRecordingsAsync(string callId = default(string), string conferenceId = default(string), string dateCreated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// The unique identifier for a brand (optional) + + /// SMSTenDLCPartnerCampaignsListResult + public SMSTenDLCPartnerCampaignsListResult GetTenDLCSmsPartnerCampaigns( + string? brandId = default(string?) + ) { - freeclimb.Client.ApiResponse localVarResponse = await ListRecordingsWithHttpInfoAsync(callId, conferenceId, dateCreated, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = + GetTenDLCSmsPartnerCampaignsWithHttpInfo(brandId); return localVarResponse.Data; } /// - /// List Recordings + /// Get list of SMS 10DLC Partner Campaigns /// /// Thrown when fails to make API call - - /// Show only Recordings made during the Call with this ID. (optional) - - /// Show only Recordings made during the conference with this ID. (optional) - - /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (RecordingList) - public async System.Threading.Tasks.Task> ListRecordingsWithHttpInfoAsync(string callId = default(string), string conferenceId = default(string), string dateCreated = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// The unique identifier for a brand (optional) + + /// ApiResponse of SMSTenDLCPartnerCampaignsListResult + public freeclimb.Client.ApiResponse GetTenDLCSmsPartnerCampaignsWithHttpInfo( + string? brandId = default(string?) + ) { - - - - + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetTenDLCSmsPartnerCampaigns" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -10464,33 +4915,48 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (callId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "callId", callId)); - } - if (conferenceId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "conferenceId", conferenceId)); - } - if (dateCreated != null) + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + if (brandId != null) { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateCreated", dateCreated)); + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "brandId", brandId) + ); } + localVarRequestOptions.Operation = "DefaultApi.GetTenDLCSmsPartnerCampaigns"; + // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Recordings", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Messages/10DLC/PartnerCampaigns", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListRecordings", localVarResponse); + Exception _exception = this.ExceptionFactory( + "GetTenDLCSmsPartnerCampaigns", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -10501,59 +4967,59 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str } /// - /// List SMS Messages + /// Get a TollFree SMS Campaign /// /// Thrown when fails to make API call - /// Only show Messages to this phone number. (optional) - /// Only show Messages from this phone number. (optional) - /// Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. (optional) - /// Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. (optional) - /// Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. (optional) - /// Only show messages associated with this campaign ID. (optional) - /// Only show messages associated with this brand ID (optional) - /// Only show messages that were sent as part of a 10DLC campaign. (optional) - /// MessagesList - public MessagesList ListSmsMessages(string to = default(string), string from = default(string), string beginTime = default(string), string endTime = default(string), MessageDirection? direction = default(MessageDirection?), string campaignId = default(string), string brandId = default(string), bool? is10DLC = default(bool?)) + /// String that uniquely identifies this TollFree Campaign resource. + + /// SMSTollFreeCampaign + public SMSTollFreeCampaign GetTollFreeSmsCampaign(string campaignId) { - freeclimb.Client.ApiResponse localVarResponse = ListSmsMessagesWithHttpInfo(to , from , beginTime , endTime , direction , campaignId , brandId , is10DLC ); + freeclimb.Client.ApiResponse localVarResponse = + GetTollFreeSmsCampaignWithHttpInfo(campaignId); return localVarResponse.Data; } /// - /// List SMS Messages + /// Get a TollFree SMS Campaign /// /// Thrown when fails to make API call - /// Only show Messages to this phone number. (optional) - /// Only show Messages from this phone number. (optional) - /// Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. (optional) - /// Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. (optional) - /// Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. (optional) - /// Only show messages associated with this campaign ID. (optional) - /// Only show messages associated with this brand ID (optional) - /// Only show messages that were sent as part of a 10DLC campaign. (optional) - /// ApiResponse of MessagesList - public freeclimb.Client.ApiResponse ListSmsMessagesWithHttpInfo(string to = default(string), string from = default(string), string beginTime = default(string), string endTime = default(string), MessageDirection? direction = default(MessageDirection?), string campaignId = default(string), string brandId = default(string), bool? is10DLC = default(bool?)) + /// String that uniquely identifies this TollFree Campaign resource. + + /// ApiResponse of SMSTollFreeCampaign + public freeclimb.Client.ApiResponse GetTollFreeSmsCampaignWithHttpInfo( + string campaignId + ) { - - - - - - - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetTollFreeSmsCampaign" + ); + } + + // verify the required parameter 'campaignId' is set + if (campaignId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'campaignId' when calling DefaultApi->GetTollFreeSmsCampaign" + ); + } + + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); + + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -10565,52 +5031,46 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (to != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "to", to)); - } - if (from != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "from", from)); - } - if (beginTime != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "beginTime", beginTime)); - } - if (endTime != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "endTime", endTime)); - } - if (direction != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "direction", direction)); - } - if (campaignId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "campaignId", campaignId)); - } - if (brandId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "brandId", brandId)); - } - if (is10DLC != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "is10DLC", is10DLC)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "campaignId", + freeclimb.Client.ClientUtils.ParameterToString(campaignId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetTollFreeSmsCampaign"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Messages", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Messages/TollFree/Campaigns/{campaignId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListSmsMessages", localVarResponse); + Exception _exception = this.ExceptionFactory( + "GetTollFreeSmsCampaign", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -10621,80 +5081,46 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str } /// - /// List SMS Messages + /// Get list of TollFree Campaigns /// /// Thrown when fails to make API call - - /// Only show Messages to this phone number. (optional) - - /// Only show Messages from this phone number. (optional) - - /// Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. (optional) - - /// Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. (optional) - - /// Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. (optional) - - /// Only show messages associated with this campaign ID. (optional) - - /// Only show messages associated with this brand ID (optional) - - /// Only show messages that were sent as part of a 10DLC campaign. (optional) - - /// Cancellation Token to cancel the request. - /// Task of MessagesList - public async System.Threading.Tasks.Task ListSmsMessagesAsync(string to = default(string), string from = default(string), string beginTime = default(string), string endTime = default(string), MessageDirection? direction = default(MessageDirection?), string campaignId = default(string), string brandId = default(string), bool? is10DLC = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await ListSmsMessagesWithHttpInfoAsync(to, from, beginTime, endTime, direction, campaignId, brandId, is10DLC, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - /// - /// List SMS Messages - /// - /// Thrown when fails to make API call - - /// Only show Messages to this phone number. (optional) - - /// Only show Messages from this phone number. (optional) - - /// Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. (optional) - - /// Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. (optional) - - /// Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. (optional) - - /// Only show messages associated with this campaign ID. (optional) - - /// Only show messages associated with this brand ID (optional) - - /// Only show messages that were sent as part of a 10DLC campaign. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (MessagesList) - public async System.Threading.Tasks.Task> ListSmsMessagesWithHttpInfoAsync(string to = default(string), string from = default(string), string beginTime = default(string), string endTime = default(string), MessageDirection? direction = default(MessageDirection?), string campaignId = default(string), string brandId = default(string), bool? is10DLC = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// SMSTollFreeCampaignsListResult + public SMSTollFreeCampaignsListResult GetTollFreeSmsCampaigns() + { + freeclimb.Client.ApiResponse localVarResponse = + GetTollFreeSmsCampaignsWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Get list of TollFree Campaigns + /// + /// Thrown when fails to make API call + + /// ApiResponse of SMSTollFreeCampaignsListResult + public freeclimb.Client.ApiResponse GetTollFreeSmsCampaignsWithHttpInfo() { - - - - - - - - - + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->GetTollFreeSmsCampaigns" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -10706,53 +5132,42 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - if (to != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "to", to)); - } - if (from != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "from", from)); - } - if (beginTime != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "beginTime", beginTime)); - } - if (endTime != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "endTime", endTime)); - } - if (direction != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "direction", direction)); - } - if (campaignId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "campaignId", campaignId)); - } - if (brandId != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "brandId", brandId)); - } - if (is10DLC != null) - { - localVarRequestOptions.QueryParameters.Add(freeclimb.Client.ClientUtils.ParameterToMultiMap("", "is10DLC", is10DLC)); - } + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.GetTollFreeSmsCampaigns"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Messages", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Messages/TollFree/Campaigns", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ListSmsMessages", localVarResponse); + Exception _exception = this.ExceptionFactory( + "GetTollFreeSmsCampaigns", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -10763,39 +5178,51 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str } /// - /// Make a Call + /// List Active Queues /// /// Thrown when fails to make API call - /// Call details for making a call (optional) - /// CallResult - public CallResult MakeACall(MakeCallRequest makeCallRequest = default(MakeCallRequest)) + /// Return only the Queue resources with aliases that exactly match this name. (optional) + + /// QueueList + public QueueList ListActiveQueues(string? alias = default(string?)) { - freeclimb.Client.ApiResponse localVarResponse = MakeACallWithHttpInfo(makeCallRequest ); + freeclimb.Client.ApiResponse localVarResponse = ListActiveQueuesWithHttpInfo( + alias + ); return localVarResponse.Data; } /// - /// Make a Call + /// List Active Queues /// /// Thrown when fails to make API call - /// Call details for making a call (optional) - /// ApiResponse of CallResult - public freeclimb.Client.ApiResponse MakeACallWithHttpInfo(MakeCallRequest makeCallRequest = default(MakeCallRequest)) + /// Return only the Queue resources with aliases that exactly match this name. (optional) + + /// ApiResponse of QueueList + public freeclimb.Client.ApiResponse ListActiveQueuesWithHttpInfo( + string? alias = default(string?) + ) { - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->ListActiveQueues" + ); + } - string[] _contentTypes = new string[] { - "application/json" - }; + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); + + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -10807,21 +5234,45 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = makeCallRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + if (alias != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "alias", alias) + ); + } + + localVarRequestOptions.Operation = "DefaultApi.ListActiveQueues"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/Calls", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Queues", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("MakeACall", localVarResponse); + Exception _exception = this.ExceptionFactory("ListActiveQueues", localVarResponse); if (_exception != null) { throw _exception; @@ -10832,46 +5283,46 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str } /// - /// Make a Call + /// List All Account Logs /// /// Thrown when fails to make API call - - /// Call details for making a call (optional) - - /// Cancellation Token to cancel the request. - /// Task of CallResult - public async System.Threading.Tasks.Task MakeACallAsync(MakeCallRequest makeCallRequest = default(MakeCallRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + + /// LogList + public LogList ListAllAccountLogs() { - freeclimb.Client.ApiResponse localVarResponse = await MakeACallWithHttpInfoAsync(makeCallRequest, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = + ListAllAccountLogsWithHttpInfo(); return localVarResponse.Data; } /// - /// Make a Call + /// List All Account Logs /// /// Thrown when fails to make API call - - /// Call details for making a call (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CallResult) - public async System.Threading.Tasks.Task> MakeACallWithHttpInfoAsync(MakeCallRequest makeCallRequest = default(MakeCallRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + + /// ApiResponse of LogList + public freeclimb.Client.ApiResponse ListAllAccountLogsWithHttpInfo() { - - + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->ListAllAccountLogs" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -10883,22 +5334,42 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = makeCallRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.ListAllAccountLogs"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/Calls", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Logs", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("MakeACall", localVarResponse); + Exception _exception = this.ExceptionFactory( + "ListAllAccountLogs", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -10909,50 +5380,50 @@ public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(str } /// - /// Make a JWT for WebRTC calling + /// List applications /// /// Thrown when fails to make API call - /// Information needed to craft a JWT compatible with the platforms WebRTC APIs - /// string - public string MakeAWebrtcJwt(CreateWebRTCToken createWebRTCToken) + /// Return only applications with aliases that exactly match this value. (optional) + + /// ApplicationList + public ApplicationList ListApplications(string? alias = default(string?)) { - freeclimb.Client.ApiResponse localVarResponse = MakeAWebrtcJwtWithHttpInfo(createWebRTCToken ); - var responseData = localVarResponse.Data; - if (responseData == null) - { - return localVarResponse.RawContent; - } + freeclimb.Client.ApiResponse localVarResponse = + ListApplicationsWithHttpInfo(alias); return localVarResponse.Data; } /// - /// Make a JWT for WebRTC calling + /// List applications /// /// Thrown when fails to make API call - /// Information needed to craft a JWT compatible with the platforms WebRTC APIs - /// ApiResponse of string - public freeclimb.Client.ApiResponse MakeAWebrtcJwtWithHttpInfo(CreateWebRTCToken createWebRTCToken) + /// Return only applications with aliases that exactly match this value. (optional) + + /// ApiResponse of ApplicationList + public freeclimb.Client.ApiResponse ListApplicationsWithHttpInfo( + string? alias = default(string?) + ) { - - // verify the required parameter 'createWebRTCToken' is set - if (createWebRTCToken == null) + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'createWebRTCToken' when calling DefaultApi->MakeAWebrtcJwt"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->ListApplications" + ); } - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "text/plain" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -10964,21 +5435,45 @@ public freeclimb.Client.ApiResponse MakeAWebrtcJwtWithHttpInfo(CreateWeb localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = createWebRTCToken; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + if (alias != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "alias", alias) + ); + } + + localVarRequestOptions.Operation = "DefaultApi.ListApplications"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/Calls/WebRTC/Token", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Applications", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("MakeAWebrtcJwt", localVarResponse); + Exception _exception = this.ExceptionFactory("ListApplications", localVarResponse); if (_exception != null) { throw _exception; @@ -10989,52 +5484,90 @@ public freeclimb.Client.ApiResponse MakeAWebrtcJwtWithHttpInfo(CreateWeb } /// - /// Make a JWT for WebRTC calling + /// List available numbers /// /// Thrown when fails to make API call - - /// Information needed to craft a JWT compatible with the platforms WebRTC APIs - - /// Cancellation Token to cancel the request. - /// Task of string - public async System.Threading.Tasks.Task MakeAWebrtcJwtAsync(CreateWebRTCToken createWebRTCToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await MakeAWebrtcJwtWithHttpInfoAsync(createWebRTCToken, cancellationToken).ConfigureAwait(false); + /// PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. (optional) + /// State or province of this phone number. (optional) + /// Country of this phone number. (optional) + /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) + /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + + /// AvailableNumberList + public AvailableNumberList ListAvailableNumbers( + string? phoneNumber = default(string?), + string? region = default(string?), + string? country = default(string?), + bool? voiceEnabled = default(bool?), + bool? smsEnabled = default(bool?), + bool? capabilitiesVoice = default(bool?), + bool? capabilitiesSms = default(bool?), + bool? capabilitiesTollFree = default(bool?), + bool? capabilitiesTenDLC = default(bool?), + bool? capabilitiesShortCode = default(bool?) + ) + { + freeclimb.Client.ApiResponse localVarResponse = + ListAvailableNumbersWithHttpInfo( + phoneNumber, + region, + country, + voiceEnabled, + smsEnabled, + capabilitiesVoice, + capabilitiesSms, + capabilitiesTollFree, + capabilitiesTenDLC, + capabilitiesShortCode + ); return localVarResponse.Data; } /// - /// Make a JWT for WebRTC calling + /// List available numbers /// /// Thrown when fails to make API call - - /// Information needed to craft a JWT compatible with the platforms WebRTC APIs - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> MakeAWebrtcJwtWithHttpInfoAsync(CreateWebRTCToken createWebRTCToken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'createWebRTCToken' is set - if (createWebRTCToken == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'createWebRTCToken' when calling DefaultApi->MakeAWebrtcJwt"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + /// PCRE-compatible regular expression to filter against `phoneNumber` field, which is in E.164 format. (optional) + /// State or province of this phone number. (optional) + /// Country of this phone number. (optional) + /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) + /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) - string[] _contentTypes = new string[] { - "application/json" - }; + /// ApiResponse of AvailableNumberList + public freeclimb.Client.ApiResponse ListAvailableNumbersWithHttpInfo( + string? phoneNumber = default(string?), + string? region = default(string?), + string? country = default(string?), + bool? voiceEnabled = default(bool?), + bool? smsEnabled = default(bool?), + bool? capabilitiesVoice = default(bool?), + bool? capabilitiesSms = default(bool?), + bool? capabilitiesTollFree = default(bool?), + bool? capabilitiesTenDLC = default(bool?), + bool? capabilitiesShortCode = default(bool?) + ) + { + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); + + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "text/plain" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -11046,22 +5579,122 @@ public freeclimb.Client.ApiResponse MakeAWebrtcJwtWithHttpInfo(CreateWeb localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = createWebRTCToken; + if (phoneNumber != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "phoneNumber", phoneNumber) + ); + } + if (region != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "region", region) + ); + } + if (country != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "country", country) + ); + } + if (voiceEnabled != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "voiceEnabled", + voiceEnabled + ) + ); + } + if (smsEnabled != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "smsEnabled", smsEnabled) + ); + } + if (capabilitiesVoice != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "capabilities.voice", + capabilitiesVoice + ) + ); + } + if (capabilitiesSms != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "capabilities.sms", + capabilitiesSms + ) + ); + } + if (capabilitiesTollFree != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "capabilities.tollFree", + capabilitiesTollFree + ) + ); + } + if (capabilitiesTenDLC != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "capabilities.tenDLC", + capabilitiesTenDLC + ) + ); + } + if (capabilitiesShortCode != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "capabilities.shortCode", + capabilitiesShortCode + ) + ); + } + + localVarRequestOptions.Operation = "DefaultApi.ListAvailableNumbers"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/Calls/WebRTC/Token", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/AvailablePhoneNumbers", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("MakeAWebrtcJwt", localVarResponse); + Exception _exception = this.ExceptionFactory( + "ListAvailableNumbers", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -11072,51 +5705,58 @@ public freeclimb.Client.ApiResponse MakeAWebrtcJwtWithHttpInfo(CreateWeb } /// - /// Remove a Participant + /// List Call Logs /// /// Thrown when fails to make API call - /// ID of the conference this participant is in. - /// ID of the Call associated with this participant. - /// - public void RemoveAParticipant(string conferenceId, string callId) + /// String that uniquely identifies this call resource. + + /// LogList + public LogList ListCallLogs(string callId) { - RemoveAParticipantWithHttpInfo(conferenceId, callId); + freeclimb.Client.ApiResponse localVarResponse = ListCallLogsWithHttpInfo( + callId + ); + return localVarResponse.Data; } /// - /// Remove a Participant + /// List Call Logs /// /// Thrown when fails to make API call - /// ID of the conference this participant is in. - /// ID of the Call associated with this participant. - /// ApiResponse of Object(void) - public freeclimb.Client.ApiResponse RemoveAParticipantWithHttpInfo(string conferenceId, string callId) + /// String that uniquely identifies this call resource. + + /// ApiResponse of LogList + public freeclimb.Client.ApiResponse ListCallLogsWithHttpInfo(string callId) { - - // verify the required parameter 'conferenceId' is set - if (conferenceId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'conferenceId' when calling DefaultApi->RemoveAParticipant"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->ListCallLogs" + ); } - // verify the required parameter 'callId' is set if (callId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->RemoveAParticipant"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'callId' when calling DefaultApi->ListCallLogs" + ); } - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -11128,22 +5768,43 @@ public freeclimb.Client.ApiResponse RemoveAParticipantWithHttpInfo(strin localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("conferenceId", freeclimb.Client.ClientUtils.ParameterToString(conferenceId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "callId", + freeclimb.Client.ClientUtils.ParameterToString(callId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.ListCallLogs"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Delete("/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Calls/{callId}/Logs", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("RemoveAParticipant", localVarResponse); + Exception _exception = this.ExceptionFactory("ListCallLogs", localVarResponse); if (_exception != null) { throw _exception; @@ -11154,60 +5815,65 @@ public freeclimb.Client.ApiResponse RemoveAParticipantWithHttpInfo(strin } /// - /// Remove a Participant + /// List Call Recordings /// /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// ID of the Call associated with this participant. - - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task RemoveAParticipantAsync(string conferenceId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies this call resource. + /// Only show recordings created on the specified date, in the form *YYYY-MM-DD*. (optional) + + /// RecordingList + public RecordingList ListCallRecordings( + string callId, + string? dateCreated = default(string?) + ) { - await RemoveAParticipantWithHttpInfoAsync(conferenceId, callId, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = + ListCallRecordingsWithHttpInfo(callId, dateCreated); + return localVarResponse.Data; } /// - /// Remove a Participant + /// List Call Recordings /// /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// ID of the Call associated with this participant. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> RemoveAParticipantWithHttpInfoAsync(string conferenceId, string callId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies this call resource. + /// Only show recordings created on the specified date, in the form *YYYY-MM-DD*. (optional) + + /// ApiResponse of RecordingList + public freeclimb.Client.ApiResponse ListCallRecordingsWithHttpInfo( + string callId, + string? dateCreated = default(string?) + ) { - - // verify the required parameter 'conferenceId' is set - if (conferenceId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'conferenceId' when calling DefaultApi->RemoveAParticipant"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->ListCallRecordings" + ); } - // verify the required parameter 'callId' is set if (callId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->RemoveAParticipant"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'callId' when calling DefaultApi->ListCallRecordings" + ); } - + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -11219,23 +5885,52 @@ public freeclimb.Client.ApiResponse RemoveAParticipantWithHttpInfo(strin localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("conferenceId", freeclimb.Client.ClientUtils.ParameterToString(conferenceId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "callId", + freeclimb.Client.ClientUtils.ParameterToString(callId) + ); // path parameter + if (dateCreated != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateCreated", dateCreated) + ); + } + + localVarRequestOptions.Operation = "DefaultApi.ListCallRecordings"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Calls/{callId}/Recordings", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("RemoveAParticipant", localVarResponse); + Exception _exception = this.ExceptionFactory( + "ListCallRecordings", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -11246,45 +5941,88 @@ public freeclimb.Client.ApiResponse RemoveAParticipantWithHttpInfo(strin } /// - /// Send an SMS Message + /// List Calls /// /// Thrown when fails to make API call - /// Details to create a message - /// MessageResult - public MessageResult SendAnSmsMessage(MessageRequest messageRequest) - { - freeclimb.Client.ApiResponse localVarResponse = SendAnSmsMessageWithHttpInfo(messageRequest ); + /// If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. (optional, default to false) + /// Only show Calls to this phone number. (optional) + /// Only show Calls from this phone number. (optional) + /// Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. (optional) + /// Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. (optional) + /// Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) + /// Only show Calls spawned by the call with this ID. (optional) + /// Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) + + /// CallList + public CallList ListCalls( + bool? active = default(bool?), + string? to = default(string?), + string? from = default(string?), + CallStatus? status = default(CallStatus?), + string? startTime = default(string?), + string? endTime = default(string?), + string? parentCallId = default(string?), + List? applicationId = default(List?) + ) + { + freeclimb.Client.ApiResponse localVarResponse = ListCallsWithHttpInfo( + active, + to, + from, + status, + startTime, + endTime, + parentCallId, + applicationId + ); return localVarResponse.Data; } - /// - /// Send an SMS Message - /// - /// Thrown when fails to make API call - /// Details to create a message - /// ApiResponse of MessageResult - public freeclimb.Client.ApiResponse SendAnSmsMessageWithHttpInfo(MessageRequest messageRequest) + /// + /// List Calls + /// + /// Thrown when fails to make API call + /// If active is set to true then all calls of the nature queued, ringing, inProgress are returned in the query. (optional, default to false) + /// Only show Calls to this phone number. (optional) + /// Only show Calls from this phone number. (optional) + /// Only show Calls currently in this status. May be `queued`, `ringing`, `inProgress`, `canceled`, `completed`, `failed`, `busy`, or `noAnswer`. (optional) + /// Only show Calls that started at or after this time, given as YYYY-MM-DD hh:mm:ss. (optional) + /// Only show Calls that ended at or before this time, given as YYYY-MM- DD hh:mm:ss. (optional) + /// Only show Calls spawned by the call with this ID. (optional) + /// Only show calls belonging to the given applicationId. This parameter can be repeated to return calls from multiple Applications. (optional) + + /// ApiResponse of CallList + public freeclimb.Client.ApiResponse ListCallsWithHttpInfo( + bool? active = default(bool?), + string? to = default(string?), + string? from = default(string?), + CallStatus? status = default(CallStatus?), + string? startTime = default(string?), + string? endTime = default(string?), + string? parentCallId = default(string?), + List? applicationId = default(List?) + ) { - - // verify the required parameter 'messageRequest' is set - if (messageRequest == null) + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'messageRequest' when calling DefaultApi->SendAnSmsMessage"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->ListCalls" + ); } - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -11296,21 +6034,95 @@ public freeclimb.Client.ApiResponse SendAnSmsMessageWithHttpInfo( localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = messageRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + if (active != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "active", active) + ); + } + if (to != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "to", to) + ); + } + if (from != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "from", from) + ); + } + if (status != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "status", status) + ); + } + if (startTime != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "startTime", startTime) + ); + } + if (endTime != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "endTime", endTime) + ); + } + if (parentCallId != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "parentCallId", + parentCallId + ) + ); + } + if (applicationId != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "multi", + "applicationId", + applicationId + ) + ); + } + + localVarRequestOptions.Operation = "DefaultApi.ListCalls"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/Messages", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Calls", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("SendAnSmsMessage", localVarResponse); + Exception _exception = this.ExceptionFactory("ListCalls", localVarResponse); if (_exception != null) { throw _exception; @@ -11321,52 +6133,69 @@ public freeclimb.Client.ApiResponse SendAnSmsMessageWithHttpInfo( } /// - /// Send an SMS Message + /// List Conference Recordings /// /// Thrown when fails to make API call - - /// Details to create a message - - /// Cancellation Token to cancel the request. - /// Task of MessageResult - public async System.Threading.Tasks.Task SendAnSmsMessageAsync(MessageRequest messageRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await SendAnSmsMessageWithHttpInfoAsync(messageRequest, cancellationToken).ConfigureAwait(false); + /// Show only Recordings made during the conference with this ID. + /// Show only Recordings made during the Call with this ID. (optional) + /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) + + /// RecordingList + public RecordingList ListConferenceRecordings( + string conferenceId, + string? callId = default(string?), + string? dateCreated = default(string?) + ) + { + freeclimb.Client.ApiResponse localVarResponse = + ListConferenceRecordingsWithHttpInfo(conferenceId, callId, dateCreated); return localVarResponse.Data; } /// - /// Send an SMS Message + /// List Conference Recordings /// /// Thrown when fails to make API call - - /// Details to create a message - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (MessageResult) - public async System.Threading.Tasks.Task> SendAnSmsMessageWithHttpInfoAsync(MessageRequest messageRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Show only Recordings made during the conference with this ID. + /// Show only Recordings made during the Call with this ID. (optional) + /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) + + /// ApiResponse of RecordingList + public freeclimb.Client.ApiResponse ListConferenceRecordingsWithHttpInfo( + string conferenceId, + string? callId = default(string?), + string? dateCreated = default(string?) + ) { - - // verify the required parameter 'messageRequest' is set - if (messageRequest == null) + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'messageRequest' when calling DefaultApi->SendAnSmsMessage"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->ListConferenceRecordings" + ); } - + // verify the required parameter 'conferenceId' is set + if (conferenceId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'conferenceId' when calling DefaultApi->ListConferenceRecordings" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -11378,22 +6207,58 @@ public freeclimb.Client.ApiResponse SendAnSmsMessageWithHttpInfo( localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = messageRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "conferenceId", + freeclimb.Client.ClientUtils.ParameterToString(conferenceId) + ); // path parameter + if (callId != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "callId", callId) + ); + } + if (dateCreated != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateCreated", dateCreated) + ); + } + + localVarRequestOptions.Operation = "DefaultApi.ListConferenceRecordings"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/Messages", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Conferences/{conferenceId}/Recordings", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("SendAnSmsMessage", localVarResponse); + Exception _exception = this.ExceptionFactory( + "ListConferenceRecordings", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -11404,44 +6269,64 @@ public freeclimb.Client.ApiResponse SendAnSmsMessageWithHttpInfo( } /// - /// Stream a Recording File + /// List Conferences /// /// Thrown when fails to make API call - /// String that uniquely identifies this recording resource. - /// System.IO.Stream - public System.IO.Stream StreamARecordingFile(string recordingId) - { - freeclimb.Client.ApiResponse localVarResponse = StreamARecordingFileWithHttpInfo(recordingId ); + /// Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. (optional) + /// List Conferences whose alias exactly matches this string. (optional) + /// Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. (optional) + /// Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. (optional) + + /// ConferenceList + public ConferenceList ListConferences( + string? status = default(string?), + string? alias = default(string?), + string? dateCreated = default(string?), + string? dateUpdated = default(string?) + ) + { + freeclimb.Client.ApiResponse localVarResponse = + ListConferencesWithHttpInfo(status, alias, dateCreated, dateUpdated); return localVarResponse.Data; } /// - /// Stream a Recording File + /// List Conferences /// /// Thrown when fails to make API call - /// String that uniquely identifies this recording resource. - /// ApiResponse of System.IO.Stream - public freeclimb.Client.ApiResponse StreamARecordingFileWithHttpInfo(string recordingId) + /// Only show conferences that currently have the specified status. Valid values: `empty`, `populated`, `inProgress`, or `terminated`. (optional) + /// List Conferences whose alias exactly matches this string. (optional) + /// Only show Conferences that were created on the specified date, in the form *YYYY-MM-DD*. (optional) + /// Only show Conferences that were last updated on the specified date, in the form *YYYY-MM-DD*. (optional) + + /// ApiResponse of ConferenceList + public freeclimb.Client.ApiResponse ListConferencesWithHttpInfo( + string? status = default(string?), + string? alias = default(string?), + string? dateCreated = default(string?), + string? dateUpdated = default(string?) + ) { - - // verify the required parameter 'recordingId' is set - if (recordingId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'recordingId' when calling DefaultApi->StreamARecordingFile"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->ListConferences" + ); } - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "audio/x-wav" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -11453,21 +6338,63 @@ public System.IO.Stream StreamARecordingFile(string recordingId) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("recordingId", freeclimb.Client.ClientUtils.ParameterToString(recordingId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + if (status != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "status", status) + ); + } + if (alias != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "alias", alias) + ); + } + if (dateCreated != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateCreated", dateCreated) + ); + } + if (dateUpdated != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateUpdated", dateUpdated) + ); + } + + localVarRequestOptions.Operation = "DefaultApi.ListConferences"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get("/Accounts/{accountId}/Recordings/{recordingId}/Stream", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Conferences", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("StreamARecordingFile", localVarResponse); + Exception _exception = this.ExceptionFactory("ListConferences", localVarResponse); if (_exception != null) { throw _exception; @@ -11478,51 +6405,129 @@ public System.IO.Stream StreamARecordingFile(string recordingId) } /// - /// Stream a Recording File + /// List Incoming Numbers /// /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of System.IO.Stream - public async System.Threading.Tasks.Task StreamARecordingFileAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await StreamARecordingFileWithHttpInfoAsync(recordingId, cancellationToken).ConfigureAwait(false); + /// Only show incoming phone number resources that match this PCRE-compatible regular expression. (optional) + /// Only show incoming phone numbers with aliases that exactly match this value. (optional) + /// State or province of this phone number. (optional) + /// Country of this phone number. (optional) + /// 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) + /// Indication of whether the phone number has an application linked to it. (optional, default to false) + /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) (deprecated) + /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) (deprecated) + /// Indication of whether the phone number has a campaign associated with it (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. (optional) + /// 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) + + /// IncomingNumberList + public IncomingNumberList ListIncomingNumbers( + string? phoneNumber = default(string?), + string? alias = default(string?), + string? region = default(string?), + string? country = default(string?), + string? applicationId = default(string?), + bool? hasApplication = default(bool?), + bool? voiceEnabled = default(bool?), + bool? smsEnabled = default(bool?), + bool? hasCampaign = default(bool?), + bool? capabilitiesVoice = default(bool?), + bool? capabilitiesSms = default(bool?), + bool? capabilitiesTollFree = default(bool?), + bool? capabilitiesTenDLC = default(bool?), + bool? capabilitiesShortCode = default(bool?), + string? tfnCampaignId = default(string?), + bool? offnet = default(bool?) + ) + { + freeclimb.Client.ApiResponse localVarResponse = + ListIncomingNumbersWithHttpInfo( + phoneNumber, + alias, + region, + country, + applicationId, + hasApplication, + voiceEnabled, + smsEnabled, + hasCampaign, + capabilitiesVoice, + capabilitiesSms, + capabilitiesTollFree, + capabilitiesTenDLC, + capabilitiesShortCode, + tfnCampaignId, + offnet + ); return localVarResponse.Data; } /// - /// Stream a Recording File + /// List Incoming Numbers /// /// Thrown when fails to make API call - - /// String that uniquely identifies this recording resource. - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (System.IO.Stream) - public async System.Threading.Tasks.Task> StreamARecordingFileWithHttpInfoAsync(string recordingId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'recordingId' is set - if (recordingId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'recordingId' when calling DefaultApi->StreamARecordingFile"); - } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + /// Only show incoming phone number resources that match this PCRE-compatible regular expression. (optional) + /// Only show incoming phone numbers with aliases that exactly match this value. (optional) + /// State or province of this phone number. (optional) + /// Country of this phone number. (optional) + /// 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) + /// Indication of whether the phone number has an application linked to it. (optional, default to false) + /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. (optional, default to true) (deprecated) + /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. (optional, default to true) (deprecated) + /// Indication of whether the phone number has a campaign associated with it (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// Only show incoming phone number resources that have been assigned to the provided TFNCampaign ID. (optional) + /// 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) - string[] _contentTypes = new string[] { - }; + /// ApiResponse of IncomingNumberList + public freeclimb.Client.ApiResponse ListIncomingNumbersWithHttpInfo( + string? phoneNumber = default(string?), + string? alias = default(string?), + string? region = default(string?), + string? country = default(string?), + string? applicationId = default(string?), + bool? hasApplication = default(bool?), + bool? voiceEnabled = default(bool?), + bool? smsEnabled = default(bool?), + bool? hasCampaign = default(bool?), + bool? capabilitiesVoice = default(bool?), + bool? capabilitiesSms = default(bool?), + bool? capabilitiesTollFree = default(bool?), + bool? capabilitiesTenDLC = default(bool?), + bool? capabilitiesShortCode = default(bool?), + string? tfnCampaignId = default(string?), + bool? offnet = default(bool?) + ) + { + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->ListIncomingNumbers" + ); + } + + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); + + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "audio/x-wav" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -11534,22 +6539,174 @@ public System.IO.Stream StreamARecordingFile(string recordingId) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("recordingId", freeclimb.Client.ClientUtils.ParameterToString(recordingId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + if (phoneNumber != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "phoneNumber", phoneNumber) + ); + } + if (alias != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "alias", alias) + ); + } + if (region != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "region", region) + ); + } + if (country != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "country", country) + ); + } + if (applicationId != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "applicationId", + applicationId + ) + ); + } + if (hasApplication != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "hasApplication", + hasApplication + ) + ); + } + if (voiceEnabled != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "voiceEnabled", + voiceEnabled + ) + ); + } + if (smsEnabled != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "smsEnabled", smsEnabled) + ); + } + if (hasCampaign != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "hasCampaign", hasCampaign) + ); + } + if (capabilitiesVoice != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "capabilities.voice", + capabilitiesVoice + ) + ); + } + if (capabilitiesSms != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "capabilities.sms", + capabilitiesSms + ) + ); + } + if (capabilitiesTollFree != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "capabilities.tollFree", + capabilitiesTollFree + ) + ); + } + if (capabilitiesTenDLC != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "capabilities.tenDLC", + capabilitiesTenDLC + ) + ); + } + if (capabilitiesShortCode != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "capabilities.shortCode", + capabilitiesShortCode + ) + ); + } + if (tfnCampaignId != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "tfn.campaignId", + tfnCampaignId + ) + ); + } + if (offnet != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "offnet", offnet) + ); + } + + localVarRequestOptions.Operation = "DefaultApi.ListIncomingNumbers"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/Accounts/{accountId}/Recordings/{recordingId}/Stream", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/IncomingPhoneNumbers", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("StreamARecordingFile", localVarResponse); + Exception _exception = this.ExceptionFactory( + "ListIncomingNumbers", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -11560,46 +6717,57 @@ public System.IO.Stream StreamARecordingFile(string recordingId) } /// - /// Update a Conference + /// List Members /// /// Thrown when fails to make API call - /// String that uniquely identifies this conference resource. - /// Conference Details to update (optional) - /// - public void UpdateAConference(string conferenceId, UpdateConferenceRequest updateConferenceRequest = default(UpdateConferenceRequest)) + /// String that uniquely identifies the Queue that the Member belongs to. + + /// QueueMemberList + public QueueMemberList ListMembers(string queueId) { - UpdateAConferenceWithHttpInfo(conferenceId, updateConferenceRequest); + freeclimb.Client.ApiResponse localVarResponse = + ListMembersWithHttpInfo(queueId); + return localVarResponse.Data; } /// - /// Update a Conference + /// List Members /// /// Thrown when fails to make API call - /// String that uniquely identifies this conference resource. - /// Conference Details to update (optional) - /// ApiResponse of Object(void) - public freeclimb.Client.ApiResponse UpdateAConferenceWithHttpInfo(string conferenceId, UpdateConferenceRequest updateConferenceRequest = default(UpdateConferenceRequest)) + /// String that uniquely identifies the Queue that the Member belongs to. + + /// ApiResponse of QueueMemberList + public freeclimb.Client.ApiResponse ListMembersWithHttpInfo(string queueId) { - - // verify the required parameter 'conferenceId' is set - if (conferenceId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->ListMembers" + ); + } + + // verify the required parameter 'queueId' is set + if (queueId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'conferenceId' when calling DefaultApi->UpdateAConference"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'queueId' when calling DefaultApi->ListMembers" + ); } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -11611,81 +6779,120 @@ public System.IO.Stream StreamARecordingFile(string recordingId) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("conferenceId", freeclimb.Client.ClientUtils.ParameterToString(conferenceId)); // path parameter - localVarRequestOptions.Data = updateConferenceRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "queueId", + freeclimb.Client.ClientUtils.ParameterToString(queueId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.ListMembers"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/Conferences/{conferenceId}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Queues/{queueId}/Members", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateAConference", localVarResponse); + Exception _exception = this.ExceptionFactory("ListMembers", localVarResponse); if (_exception != null) { throw _exception; } } - return localVarResponse; + return localVarResponse; + } + + /// + /// List Participants + /// + /// Thrown when fails to make API call + /// ID of the conference this participant is in. + /// Only show Participants with the talk privilege. (optional) + /// Only show Participants with the listen privilege. (optional) + /// Only show Participants with the dtmfPassThrough privilege. (optional) + + /// ConferenceParticipantList + public ConferenceParticipantList ListParticipants( + string conferenceId, + bool? talk = default(bool?), + bool? listen = default(bool?), + bool? dtmfPassThrough = default(bool?) + ) + { + freeclimb.Client.ApiResponse localVarResponse = + ListParticipantsWithHttpInfo(conferenceId, talk, listen, dtmfPassThrough); + return localVarResponse.Data; } /// - /// Update a Conference + /// List Participants /// /// Thrown when fails to make API call - - /// String that uniquely identifies this conference resource. - - /// Conference Details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task UpdateAConferenceAsync(string conferenceId, UpdateConferenceRequest updateConferenceRequest = default(UpdateConferenceRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await UpdateAConferenceWithHttpInfoAsync(conferenceId, updateConferenceRequest, cancellationToken).ConfigureAwait(false); - } + /// ID of the conference this participant is in. + /// Only show Participants with the talk privilege. (optional) + /// Only show Participants with the listen privilege. (optional) + /// Only show Participants with the dtmfPassThrough privilege. (optional) - /// - /// Update a Conference - /// - /// Thrown when fails to make API call - - /// String that uniquely identifies this conference resource. - - /// Conference Details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateAConferenceWithHttpInfoAsync(string conferenceId, UpdateConferenceRequest updateConferenceRequest = default(UpdateConferenceRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// ApiResponse of ConferenceParticipantList + public freeclimb.Client.ApiResponse ListParticipantsWithHttpInfo( + string conferenceId, + bool? talk = default(bool?), + bool? listen = default(bool?), + bool? dtmfPassThrough = default(bool?) + ) { - + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->ListParticipants" + ); + } + // verify the required parameter 'conferenceId' is set if (conferenceId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'conferenceId' when calling DefaultApi->UpdateAConference"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'conferenceId' when calling DefaultApi->ListParticipants" + ); } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -11697,23 +6904,65 @@ public System.IO.Stream StreamARecordingFile(string recordingId) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("conferenceId", freeclimb.Client.ClientUtils.ParameterToString(conferenceId)); // path parameter - localVarRequestOptions.Data = updateConferenceRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "conferenceId", + freeclimb.Client.ClientUtils.ParameterToString(conferenceId) + ); // path parameter + if (talk != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "talk", talk) + ); + } + if (listen != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "listen", listen) + ); + } + if (dtmfPassThrough != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "dtmfPassThrough", + dtmfPassThrough + ) + ); + } + + localVarRequestOptions.Operation = "DefaultApi.ListParticipants"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/Conferences/{conferenceId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Conferences/{conferenceId}/Participants", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateAConference", localVarResponse); + Exception _exception = this.ExceptionFactory("ListParticipants", localVarResponse); if (_exception != null) { throw _exception; @@ -11724,52 +6973,60 @@ public System.IO.Stream StreamARecordingFile(string recordingId) } /// - /// Update a Live Call + /// List Recordings /// /// Thrown when fails to make API call - /// String that uniquely identifies this call resource. - /// Call details to update - /// - public void UpdateALiveCall(string callId, UpdateCallRequest updateCallRequest) - { - UpdateALiveCallWithHttpInfo(callId, updateCallRequest); + /// Show only Recordings made during the Call with this ID. (optional) + /// Show only Recordings made during the conference with this ID. (optional) + /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) + + /// RecordingList + public RecordingList ListRecordings( + string? callId = default(string?), + string? conferenceId = default(string?), + string? dateCreated = default(string?) + ) + { + freeclimb.Client.ApiResponse localVarResponse = + ListRecordingsWithHttpInfo(callId, conferenceId, dateCreated); + return localVarResponse.Data; } /// - /// Update a Live Call + /// List Recordings /// /// Thrown when fails to make API call - /// String that uniquely identifies this call resource. - /// Call details to update - /// ApiResponse of Object(void) - public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string callId, UpdateCallRequest updateCallRequest) - { - - // verify the required parameter 'callId' is set - if (callId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->UpdateALiveCall"); - } + /// Show only Recordings made during the Call with this ID. (optional) + /// Show only Recordings made during the conference with this ID. (optional) + /// Only show Recordings created on this date, formatted as *YYYY-MM-DD*. (optional) - - // verify the required parameter 'updateCallRequest' is set - if (updateCallRequest == null) + /// ApiResponse of RecordingList + public freeclimb.Client.ApiResponse ListRecordingsWithHttpInfo( + string? callId = default(string?), + string? conferenceId = default(string?), + string? dateCreated = default(string?) + ) + { + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'updateCallRequest' when calling DefaultApi->UpdateALiveCall"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->ListRecordings" + ); } - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -11781,22 +7038,61 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter - localVarRequestOptions.Data = updateCallRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + if (callId != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "callId", callId) + ); + } + if (conferenceId != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap( + "", + "conferenceId", + conferenceId + ) + ); + } + if (dateCreated != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "dateCreated", dateCreated) + ); + } + + localVarRequestOptions.Operation = "DefaultApi.ListRecordings"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/Calls/{callId}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Recordings", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateALiveCall", localVarResponse); + Exception _exception = this.ExceptionFactory("ListRecordings", localVarResponse); if (_exception != null) { throw _exception; @@ -11807,61 +7103,89 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c } /// - /// Update a Live Call + /// List SMS Messages /// /// Thrown when fails to make API call - - /// String that uniquely identifies this call resource. - - /// Call details to update - - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task UpdateALiveCallAsync(string callId, UpdateCallRequest updateCallRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await UpdateALiveCallWithHttpInfoAsync(callId, updateCallRequest, cancellationToken).ConfigureAwait(false); + /// Only show Messages to this phone number. (optional) + /// Only show Messages from this phone number. (optional) + /// Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. (optional) + /// Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. (optional) + /// Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. (optional) + /// Only show messages associated with this campaign ID. (optional) + /// Only show messages associated with this brand ID (optional) + /// Only show messages that were sent as part of a 10DLC campaign. (optional) + + /// MessagesList + public MessagesList ListSmsMessages( + string? to = default(string?), + string? from = default(string?), + string? beginTime = default(string?), + string? endTime = default(string?), + MessageDirection? direction = default(MessageDirection?), + string? campaignId = default(string?), + string? brandId = default(string?), + bool? is10DLC = default(bool?) + ) + { + freeclimb.Client.ApiResponse localVarResponse = + ListSmsMessagesWithHttpInfo( + to, + from, + beginTime, + endTime, + direction, + campaignId, + brandId, + is10DLC + ); + return localVarResponse.Data; } /// - /// Update a Live Call + /// List SMS Messages /// /// Thrown when fails to make API call - - /// String that uniquely identifies this call resource. - - /// Call details to update - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateALiveCallWithHttpInfoAsync(string callId, UpdateCallRequest updateCallRequest, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - // verify the required parameter 'callId' is set - if (callId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->UpdateALiveCall"); - } + /// Only show Messages to this phone number. (optional) + /// Only show Messages from this phone number. (optional) + /// Only show Messages sent at or after this time (GMT), given as *YYYY-MM-DD hh:mm:ss*. (optional) + /// Only show messages sent at or before this time (GMT), given as *YYYY-MM-DD hh:mm*.. (optional) + /// Either `inbound` or `outbound`. Only show Messages that were either *sent from* or *received by* FreeClimb. (optional) + /// Only show messages associated with this campaign ID. (optional) + /// Only show messages associated with this brand ID (optional) + /// Only show messages that were sent as part of a 10DLC campaign. (optional) - - // verify the required parameter 'updateCallRequest' is set - if (updateCallRequest == null) + /// ApiResponse of MessagesList + public freeclimb.Client.ApiResponse ListSmsMessagesWithHttpInfo( + string? to = default(string?), + string? from = default(string?), + string? beginTime = default(string?), + string? endTime = default(string?), + MessageDirection? direction = default(MessageDirection?), + string? campaignId = default(string?), + string? brandId = default(string?), + bool? is10DLC = default(bool?) + ) + { + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'updateCallRequest' when calling DefaultApi->UpdateALiveCall"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->ListSmsMessages" + ); } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -11873,23 +7197,87 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter - localVarRequestOptions.Data = updateCallRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + if (to != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "to", to) + ); + } + if (from != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "from", from) + ); + } + if (beginTime != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "beginTime", beginTime) + ); + } + if (endTime != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "endTime", endTime) + ); + } + if (direction != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "direction", direction) + ); + } + if (campaignId != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "campaignId", campaignId) + ); + } + if (brandId != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "brandId", brandId) + ); + } + if (is10DLC != null) + { + localVarRequestOptions.QueryParameters.Add( + freeclimb.Client.ClientUtils.ParameterToMultiMap("", "is10DLC", is10DLC) + ); + } + + localVarRequestOptions.Operation = "DefaultApi.ListSmsMessages"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/Calls/{callId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Messages", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateALiveCall", localVarResponse); + Exception _exception = this.ExceptionFactory("ListSmsMessages", localVarResponse); if (_exception != null) { throw _exception; @@ -11900,57 +7288,51 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c } /// - /// Update a Participant + /// Make a Call /// /// Thrown when fails to make API call - /// ID of the conference this participant is in. - /// ID of the Call associated with this participant. - /// Conference participant details to update (optional) - /// ConferenceParticipantResult - public ConferenceParticipantResult UpdateAParticipant(string conferenceId, string callId, UpdateConferenceParticipantRequest updateConferenceParticipantRequest = default(UpdateConferenceParticipantRequest)) + /// Call details for making a call (optional) + + /// CallResult + public CallResult MakeACall(MakeCallRequest? makeCallRequest = default(MakeCallRequest?)) { - freeclimb.Client.ApiResponse localVarResponse = UpdateAParticipantWithHttpInfo(conferenceId , callId , updateConferenceParticipantRequest ); + freeclimb.Client.ApiResponse localVarResponse = MakeACallWithHttpInfo( + makeCallRequest + ); return localVarResponse.Data; } /// - /// Update a Participant + /// Make a Call /// /// Thrown when fails to make API call - /// ID of the conference this participant is in. - /// ID of the Call associated with this participant. - /// Conference participant details to update (optional) - /// ApiResponse of ConferenceParticipantResult - public freeclimb.Client.ApiResponse UpdateAParticipantWithHttpInfo(string conferenceId, string callId, UpdateConferenceParticipantRequest updateConferenceParticipantRequest = default(UpdateConferenceParticipantRequest)) - { - - // verify the required parameter 'conferenceId' is set - if (conferenceId == null) - { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'conferenceId' when calling DefaultApi->UpdateAParticipant"); - } + /// Call details for making a call (optional) - - // verify the required parameter 'callId' is set - if (callId == null) + /// ApiResponse of CallResult + public freeclimb.Client.ApiResponse MakeACallWithHttpInfo( + MakeCallRequest? makeCallRequest = default(MakeCallRequest?) + ) + { + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->UpdateAParticipant"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->MakeACall" + ); } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { "application/json" }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -11962,23 +7344,40 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("conferenceId", freeclimb.Client.ClientUtils.ParameterToString(conferenceId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter - localVarRequestOptions.Data = updateConferenceParticipantRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.Data = makeCallRequest; + + localVarRequestOptions.Operation = "DefaultApi.MakeACall"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/Calls", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateAParticipant", localVarResponse); + Exception _exception = this.ExceptionFactory("MakeACall", localVarResponse); if (_exception != null) { throw _exception; @@ -11989,68 +7388,60 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c } /// - /// Update a Participant + /// Make a JWT for WebRTC calling /// /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// ID of the Call associated with this participant. - - /// Conference participant details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of ConferenceParticipantResult - public async System.Threading.Tasks.Task UpdateAParticipantAsync(string conferenceId, string callId, UpdateConferenceParticipantRequest updateConferenceParticipantRequest = default(UpdateConferenceParticipantRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Information needed to craft a JWT compatible with the platforms WebRTC APIs + + /// string + public string MakeAWebrtcJwt(CreateWebRTCToken createWebRTCToken) { - freeclimb.Client.ApiResponse localVarResponse = await UpdateAParticipantWithHttpInfoAsync(conferenceId, callId, updateConferenceParticipantRequest, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = MakeAWebrtcJwtWithHttpInfo( + createWebRTCToken + ); return localVarResponse.Data; } /// - /// Update a Participant + /// Make a JWT for WebRTC calling /// /// Thrown when fails to make API call - - /// ID of the conference this participant is in. - - /// ID of the Call associated with this participant. - - /// Conference participant details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ConferenceParticipantResult) - public async System.Threading.Tasks.Task> UpdateAParticipantWithHttpInfoAsync(string conferenceId, string callId, UpdateConferenceParticipantRequest updateConferenceParticipantRequest = default(UpdateConferenceParticipantRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Information needed to craft a JWT compatible with the platforms WebRTC APIs + + /// ApiResponse of string + public freeclimb.Client.ApiResponse MakeAWebrtcJwtWithHttpInfo( + CreateWebRTCToken createWebRTCToken + ) { - - // verify the required parameter 'conferenceId' is set - if (conferenceId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'conferenceId' when calling DefaultApi->UpdateAParticipant"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->MakeAWebrtcJwt" + ); } - - // verify the required parameter 'callId' is set - if (callId == null) + // verify the required parameter 'createWebRTCToken' is set + if (createWebRTCToken == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'callId' when calling DefaultApi->UpdateAParticipant"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'createWebRTCToken' when calling DefaultApi->MakeAWebrtcJwt" + ); } - - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { "application/json" }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "text/plain" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -12062,24 +7453,40 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("conferenceId", freeclimb.Client.ClientUtils.ParameterToString(conferenceId)); // path parameter - localVarRequestOptions.PathParameters.Add("callId", freeclimb.Client.ClientUtils.ParameterToString(callId)); // path parameter - localVarRequestOptions.Data = updateConferenceParticipantRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.Data = createWebRTCToken; + + localVarRequestOptions.Operation = "DefaultApi.MakeAWebrtcJwt"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/Calls/WebRTC/Token", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateAParticipant", localVarResponse); + Exception _exception = this.ExceptionFactory("MakeAWebrtcJwt", localVarResponse); if (_exception != null) { throw _exception; @@ -12090,48 +7497,69 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c } /// - /// Update a Queue + /// Remove a Participant /// /// Thrown when fails to make API call - /// A string that uniquely identifies this Queue resource. - /// Queue Details to update (optional) - /// QueueResult - public QueueResult UpdateAQueue(string queueId, QueueRequest queueRequest = default(QueueRequest)) + /// ID of the conference this participant is in. + /// ID of the Call associated with this participant. + + /// + public void RemoveAParticipant(string conferenceId, string callId) { - freeclimb.Client.ApiResponse localVarResponse = UpdateAQueueWithHttpInfo(queueId , queueRequest ); - return localVarResponse.Data; + RemoveAParticipantWithHttpInfo(conferenceId, callId); } /// - /// Update a Queue + /// Remove a Participant /// /// Thrown when fails to make API call - /// A string that uniquely identifies this Queue resource. - /// Queue Details to update (optional) - /// ApiResponse of QueueResult - public freeclimb.Client.ApiResponse UpdateAQueueWithHttpInfo(string queueId, QueueRequest queueRequest = default(QueueRequest)) + /// ID of the conference this participant is in. + /// ID of the Call associated with this participant. + + /// ApiResponse of Object(void) + public freeclimb.Client.ApiResponse RemoveAParticipantWithHttpInfo( + string conferenceId, + string callId + ) { - - // verify the required parameter 'queueId' is set - if (queueId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->RemoveAParticipant" + ); + } + + // verify the required parameter 'conferenceId' is set + if (conferenceId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'conferenceId' when calling DefaultApi->RemoveAParticipant" + ); + } + + // verify the required parameter 'callId' is set + if (callId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'queueId' when calling DefaultApi->UpdateAQueue"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'callId' when calling DefaultApi->RemoveAParticipant" + ); } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -12143,22 +7571,50 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("queueId", freeclimb.Client.ClientUtils.ParameterToString(queueId)); // path parameter - localVarRequestOptions.Data = queueRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "conferenceId", + freeclimb.Client.ClientUtils.ParameterToString(conferenceId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "callId", + freeclimb.Client.ClientUtils.ParameterToString(callId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.RemoveAParticipant"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/Queues/{queueId}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete( + "/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateAQueue", localVarResponse); + Exception _exception = this.ExceptionFactory( + "RemoveAParticipant", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -12169,57 +7625,59 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c } /// - /// Update a Queue + /// Send an SMS Message /// /// Thrown when fails to make API call - - /// A string that uniquely identifies this Queue resource. - - /// Queue Details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of QueueResult - public async System.Threading.Tasks.Task UpdateAQueueAsync(string queueId, QueueRequest queueRequest = default(QueueRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Details to create a message + + /// MessageResult + public MessageResult SendAnSmsMessage(MessageRequest messageRequest) { - freeclimb.Client.ApiResponse localVarResponse = await UpdateAQueueWithHttpInfoAsync(queueId, queueRequest, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = + SendAnSmsMessageWithHttpInfo(messageRequest); return localVarResponse.Data; } /// - /// Update a Queue + /// Send an SMS Message /// - /// Thrown when fails to make API call - - /// A string that uniquely identifies this Queue resource. - - /// Queue Details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (QueueResult) - public async System.Threading.Tasks.Task> UpdateAQueueWithHttpInfoAsync(string queueId, QueueRequest queueRequest = default(QueueRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Thrown when fails to make API call + /// Details to create a message + + /// ApiResponse of MessageResult + public freeclimb.Client.ApiResponse SendAnSmsMessageWithHttpInfo( + MessageRequest messageRequest + ) { - - // verify the required parameter 'queueId' is set - if (queueId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'queueId' when calling DefaultApi->UpdateAQueue"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->SendAnSmsMessage" + ); } - - + // verify the required parameter 'messageRequest' is set + if (messageRequest == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'messageRequest' when calling DefaultApi->SendAnSmsMessage" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { "application/json" }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -12231,23 +7689,40 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("queueId", freeclimb.Client.ClientUtils.ParameterToString(queueId)); // path parameter - localVarRequestOptions.Data = queueRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.Data = messageRequest; + + localVarRequestOptions.Operation = "DefaultApi.SendAnSmsMessage"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/Queues/{queueId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/Messages", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateAQueue", localVarResponse); + Exception _exception = this.ExceptionFactory("SendAnSmsMessage", localVarResponse); if (_exception != null) { throw _exception; @@ -12258,37 +7733,59 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c } /// - /// Manage an account + /// Stream a Recording File /// /// Thrown when fails to make API call - /// Account details to update (optional) - /// - public void UpdateAnAccount(AccountRequest accountRequest = default(AccountRequest)) + /// String that uniquely identifies this recording resource. + + /// System.IO.Stream + public System.IO.Stream StreamARecordingFile(string recordingId) { - UpdateAnAccountWithHttpInfo(accountRequest); + freeclimb.Client.ApiResponse localVarResponse = + StreamARecordingFileWithHttpInfo(recordingId); + return localVarResponse.Data; } /// - /// Manage an account + /// Stream a Recording File /// /// Thrown when fails to make API call - /// Account details to update (optional) - /// ApiResponse of Object(void) - public freeclimb.Client.ApiResponse UpdateAnAccountWithHttpInfo(AccountRequest accountRequest = default(AccountRequest)) + /// String that uniquely identifies this recording resource. + + /// ApiResponse of System.IO.Stream + public freeclimb.Client.ApiResponse StreamARecordingFileWithHttpInfo( + string recordingId + ) { - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->StreamARecordingFile" + ); + } + + // verify the required parameter 'recordingId' is set + if (recordingId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'recordingId' when calling DefaultApi->StreamARecordingFile" + ); + } - string[] _contentTypes = new string[] { - "application/json" - }; + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); + + string[] _contentTypes = new string[] { }; // to determine the Accept header - string[] _accepts = new string[] { - }; + string[] _accepts = new string[] { "audio/x-wav" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -12300,21 +7797,46 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = accountRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "recordingId", + freeclimb.Client.ClientUtils.ParameterToString(recordingId) + ); // path parameter + + localVarRequestOptions.Operation = "DefaultApi.StreamARecordingFile"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get( + "/Accounts/{accountId}/Recordings/{recordingId}/Stream", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateAnAccount", localVarResponse); + Exception _exception = this.ExceptionFactory( + "StreamARecordingFile", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -12325,44 +7847,63 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c } /// - /// Manage an account + /// Update a Conference /// /// Thrown when fails to make API call - - /// Account details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task UpdateAnAccountAsync(AccountRequest accountRequest = default(AccountRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies this conference resource. + /// Conference Details to update (optional) + + /// + public void UpdateAConference( + string conferenceId, + UpdateConferenceRequest? updateConferenceRequest = default(UpdateConferenceRequest?) + ) { - await UpdateAnAccountWithHttpInfoAsync(accountRequest, cancellationToken).ConfigureAwait(false); + UpdateAConferenceWithHttpInfo(conferenceId, updateConferenceRequest); } /// - /// Manage an account + /// Update a Conference /// /// Thrown when fails to make API call - - /// Account details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateAnAccountWithHttpInfoAsync(AccountRequest accountRequest = default(AccountRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// String that uniquely identifies this conference resource. + /// Conference Details to update (optional) + + /// ApiResponse of Object(void) + public freeclimb.Client.ApiResponse UpdateAConferenceWithHttpInfo( + string conferenceId, + UpdateConferenceRequest? updateConferenceRequest = default(UpdateConferenceRequest?) + ) { - - + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->UpdateAConference" + ); + } + + // verify the required parameter 'conferenceId' is set + if (conferenceId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'conferenceId' when calling DefaultApi->UpdateAConference" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { "application/json" }; // to determine the Accept header - string[] _accepts = new string[] { - }; + string[] _accepts = new string[] { }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -12374,22 +7915,44 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.Data = accountRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "conferenceId", + freeclimb.Client.ClientUtils.ParameterToString(conferenceId) + ); // path parameter + localVarRequestOptions.Data = updateConferenceRequest; + + localVarRequestOptions.Operation = "DefaultApi.UpdateAConference"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/Conferences/{conferenceId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateAnAccount", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdateAConference", localVarResponse); if (_exception != null) { throw _exception; @@ -12400,48 +7963,69 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c } /// - /// Update an application + /// Update a Live Call /// /// Thrown when fails to make API call - /// A string that uniquely identifies this application resource. - /// Application details to update. (optional) - /// ApplicationResult - public ApplicationResult UpdateAnApplication(string applicationId, ApplicationRequest applicationRequest = default(ApplicationRequest)) + /// String that uniquely identifies this call resource. + /// Call details to update + + /// + public void UpdateALiveCall(string callId, UpdateCallRequest updateCallRequest) { - freeclimb.Client.ApiResponse localVarResponse = UpdateAnApplicationWithHttpInfo(applicationId , applicationRequest ); - return localVarResponse.Data; + UpdateALiveCallWithHttpInfo(callId, updateCallRequest); } /// - /// Update an application + /// Update a Live Call /// /// Thrown when fails to make API call - /// A string that uniquely identifies this application resource. - /// Application details to update. (optional) - /// ApiResponse of ApplicationResult - public freeclimb.Client.ApiResponse UpdateAnApplicationWithHttpInfo(string applicationId, ApplicationRequest applicationRequest = default(ApplicationRequest)) + /// String that uniquely identifies this call resource. + /// Call details to update + + /// ApiResponse of Object(void) + public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo( + string callId, + UpdateCallRequest updateCallRequest + ) { - - // verify the required parameter 'applicationId' is set - if (applicationId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->UpdateALiveCall" + ); + } + + // verify the required parameter 'callId' is set + if (callId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'callId' when calling DefaultApi->UpdateALiveCall" + ); + } + + // verify the required parameter 'updateCallRequest' is set + if (updateCallRequest == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'applicationId' when calling DefaultApi->UpdateAnApplication"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'updateCallRequest' when calling DefaultApi->UpdateALiveCall" + ); } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { "application/json" }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -12453,22 +8037,44 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("applicationId", freeclimb.Client.ClientUtils.ParameterToString(applicationId)); // path parameter - localVarRequestOptions.Data = applicationRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "callId", + freeclimb.Client.ClientUtils.ParameterToString(callId) + ); // path parameter + localVarRequestOptions.Data = updateCallRequest; + + localVarRequestOptions.Operation = "DefaultApi.UpdateALiveCall"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/Applications/{applicationId}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/Calls/{callId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateAnApplication", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdateALiveCall", localVarResponse); if (_exception != null) { throw _exception; @@ -12479,57 +8085,84 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c } /// - /// Update an application + /// Update a Participant /// /// Thrown when fails to make API call - - /// A string that uniquely identifies this application resource. - - /// Application details to update. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApplicationResult - public async System.Threading.Tasks.Task UpdateAnApplicationAsync(string applicationId, ApplicationRequest applicationRequest = default(ApplicationRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - freeclimb.Client.ApiResponse localVarResponse = await UpdateAnApplicationWithHttpInfoAsync(applicationId, applicationRequest, cancellationToken).ConfigureAwait(false); + /// ID of the conference this participant is in. + /// ID of the Call associated with this participant. + /// Conference participant details to update (optional) + + /// ConferenceParticipantResult + public ConferenceParticipantResult UpdateAParticipant( + string conferenceId, + string callId, + UpdateConferenceParticipantRequest? updateConferenceParticipantRequest = + default(UpdateConferenceParticipantRequest?) + ) + { + freeclimb.Client.ApiResponse localVarResponse = + UpdateAParticipantWithHttpInfo( + conferenceId, + callId, + updateConferenceParticipantRequest + ); return localVarResponse.Data; } /// - /// Update an application + /// Update a Participant /// /// Thrown when fails to make API call - - /// A string that uniquely identifies this application resource. - - /// Application details to update. (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ApplicationResult) - public async System.Threading.Tasks.Task> UpdateAnApplicationWithHttpInfoAsync(string applicationId, ApplicationRequest applicationRequest = default(ApplicationRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// ID of the conference this participant is in. + /// ID of the Call associated with this participant. + /// Conference participant details to update (optional) + + /// ApiResponse of ConferenceParticipantResult + public freeclimb.Client.ApiResponse UpdateAParticipantWithHttpInfo( + string conferenceId, + string callId, + UpdateConferenceParticipantRequest? updateConferenceParticipantRequest = + default(UpdateConferenceParticipantRequest?) + ) { - - // verify the required parameter 'applicationId' is set - if (applicationId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->UpdateAParticipant" + ); + } + + // verify the required parameter 'conferenceId' is set + if (conferenceId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'applicationId' when calling DefaultApi->UpdateAnApplication"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'conferenceId' when calling DefaultApi->UpdateAParticipant" + ); } - - + // verify the required parameter 'callId' is set + if (callId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'callId' when calling DefaultApi->UpdateAParticipant" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { "application/json" }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -12541,23 +8174,51 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("applicationId", freeclimb.Client.ClientUtils.ParameterToString(applicationId)); // path parameter - localVarRequestOptions.Data = applicationRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "conferenceId", + freeclimb.Client.ClientUtils.ParameterToString(conferenceId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "callId", + freeclimb.Client.ClientUtils.ParameterToString(callId) + ); // path parameter + localVarRequestOptions.Data = updateConferenceParticipantRequest; + + localVarRequestOptions.Operation = "DefaultApi.UpdateAParticipant"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/Applications/{applicationId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/Conferences/{conferenceId}/Participants/{callId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateAnApplication", localVarResponse); + Exception _exception = this.ExceptionFactory( + "UpdateAParticipant", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -12568,48 +8229,67 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c } /// - /// Update an Incoming Number + /// Update a Queue /// /// Thrown when fails to make API call - /// String that uniquely identifies this phone number resource. - /// Incoming Number details to update (optional) - /// IncomingNumberResult - public IncomingNumberResult UpdateAnIncomingNumber(string phoneNumberId, IncomingNumberRequest incomingNumberRequest = default(IncomingNumberRequest)) - { - freeclimb.Client.ApiResponse localVarResponse = UpdateAnIncomingNumberWithHttpInfo(phoneNumberId , incomingNumberRequest ); + /// A string that uniquely identifies this Queue resource. + /// Queue Details to update (optional) + + /// QueueResult + public QueueResult UpdateAQueue( + string queueId, + QueueRequest? queueRequest = default(QueueRequest?) + ) + { + freeclimb.Client.ApiResponse localVarResponse = UpdateAQueueWithHttpInfo( + queueId, + queueRequest + ); return localVarResponse.Data; } /// - /// Update an Incoming Number + /// Update a Queue /// /// Thrown when fails to make API call - /// String that uniquely identifies this phone number resource. - /// Incoming Number details to update (optional) - /// ApiResponse of IncomingNumberResult - public freeclimb.Client.ApiResponse UpdateAnIncomingNumberWithHttpInfo(string phoneNumberId, IncomingNumberRequest incomingNumberRequest = default(IncomingNumberRequest)) + /// A string that uniquely identifies this Queue resource. + /// Queue Details to update (optional) + + /// ApiResponse of QueueResult + public freeclimb.Client.ApiResponse UpdateAQueueWithHttpInfo( + string queueId, + QueueRequest? queueRequest = default(QueueRequest?) + ) { - - // verify the required parameter 'phoneNumberId' is set - if (phoneNumberId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->UpdateAQueue" + ); + } + + // verify the required parameter 'queueId' is set + if (queueId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'phoneNumberId' when calling DefaultApi->UpdateAnIncomingNumber"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'queueId' when calling DefaultApi->UpdateAQueue" + ); } - - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { "application/json" }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -12621,22 +8301,44 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("phoneNumberId", freeclimb.Client.ClientUtils.ParameterToString(phoneNumberId)); // path parameter - localVarRequestOptions.Data = incomingNumberRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "queueId", + freeclimb.Client.ClientUtils.ParameterToString(queueId) + ); // path parameter + localVarRequestOptions.Data = queueRequest; + + localVarRequestOptions.Operation = "DefaultApi.UpdateAQueue"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Post("/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/Queues/{queueId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateAnIncomingNumber", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdateAQueue", localVarResponse); if (_exception != null) { throw _exception; @@ -12647,57 +8349,48 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c } /// - /// Update an Incoming Number + /// Manage an account /// /// Thrown when fails to make API call - - /// String that uniquely identifies this phone number resource. - - /// Incoming Number details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of IncomingNumberResult - public async System.Threading.Tasks.Task UpdateAnIncomingNumberAsync(string phoneNumberId, IncomingNumberRequest incomingNumberRequest = default(IncomingNumberRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Account details to update (optional) + + /// + public void UpdateAnAccount(AccountRequest? accountRequest = default(AccountRequest?)) { - freeclimb.Client.ApiResponse localVarResponse = await UpdateAnIncomingNumberWithHttpInfoAsync(phoneNumberId, incomingNumberRequest, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; + UpdateAnAccountWithHttpInfo(accountRequest); } /// - /// Update an Incoming Number + /// Manage an account /// /// Thrown when fails to make API call - - /// String that uniquely identifies this phone number resource. - - /// Incoming Number details to update (optional) - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (IncomingNumberResult) - public async System.Threading.Tasks.Task> UpdateAnIncomingNumberWithHttpInfoAsync(string phoneNumberId, IncomingNumberRequest incomingNumberRequest = default(IncomingNumberRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Account details to update (optional) + + /// ApiResponse of Object(void) + public freeclimb.Client.ApiResponse UpdateAnAccountWithHttpInfo( + AccountRequest? accountRequest = default(AccountRequest?) + ) { - - // verify the required parameter 'phoneNumberId' is set - if (phoneNumberId == null) + // verify the required parameter 'accountId' is set + if (accountId == null) { - throw new freeclimb.Client.ApiException(400, "Missing required parameter 'phoneNumberId' when calling DefaultApi->UpdateAnIncomingNumber"); + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->UpdateAnAccount" + ); } - - + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { "application/json" }; // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _accepts = new string[] { }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -12709,23 +8402,40 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter - localVarRequestOptions.PathParameters.Add("phoneNumberId", freeclimb.Client.ClientUtils.ParameterToString(phoneNumberId)); // path parameter - localVarRequestOptions.Data = incomingNumberRequest; + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.Data = accountRequest; + + localVarRequestOptions.Operation = "DefaultApi.UpdateAnAccount"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateAnIncomingNumber", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdateAnAccount", localVarResponse); if (_exception != null) { throw _exception; @@ -12735,41 +8445,66 @@ public freeclimb.Client.ApiResponse UpdateALiveCallWithHttpInfo(string c return localVarResponse; } - /// - /// Get next page of paginated resource + /// Update an application /// /// Thrown when fails to make API call - /// T - public T GetNextPage(T response) where T : IPagination + /// A string that uniquely identifies this application resource. + /// Application details to update. (optional) + + /// ApplicationResult + public ApplicationResult UpdateAnApplication( + string applicationId, + ApplicationRequest? applicationRequest = default(ApplicationRequest?) + ) { - freeclimb.Client.ApiResponse localVarResponse = GetNextPageWithHttpInfo(response); + freeclimb.Client.ApiResponse localVarResponse = + UpdateAnApplicationWithHttpInfo(applicationId, applicationRequest); return localVarResponse.Data; } /// - /// Get next page of paginated response + /// Update an application /// /// Thrown when fails to make API call - /// ApiResponse of T - public freeclimb.Client.ApiResponse GetNextPageWithHttpInfo(T response) where T : IPagination + /// A string that uniquely identifies this application resource. + /// Application details to update. (optional) + + /// ApiResponse of ApplicationResult + public freeclimb.Client.ApiResponse UpdateAnApplicationWithHttpInfo( + string applicationId, + ApplicationRequest? applicationRequest = default(ApplicationRequest?) + ) { - - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->UpdateAnApplication" + ); + } + + // verify the required parameter 'applicationId' is set + if (applicationId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'applicationId' when calling DefaultApi->UpdateAnApplication" + ); + } - string[] _contentTypes = new string[] { - }; + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { "application/json" }; - if (response.NextPageUri == null) { - throw new Exception("Missing param NextPageUri when calling GetNextPage"); - } + // to determine the Accept header + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -12781,20 +8516,47 @@ public freeclimb.Client.ApiResponse GetNextPageWithHttpInfo(T response) wh localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "applicationId", + freeclimb.Client.ClientUtils.ParameterToString(applicationId) + ); // path parameter + localVarRequestOptions.Data = applicationRequest; + + localVarRequestOptions.Operation = "DefaultApi.UpdateAnApplication"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = this.Client.Get(response.NextPageUri, localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/Applications/{applicationId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetNextPage", localVarResponse); + Exception _exception = this.ExceptionFactory( + "UpdateAnApplication", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -12805,44 +8567,65 @@ public freeclimb.Client.ApiResponse GetNextPageWithHttpInfo(T response) wh } /// - /// Get next page of paginated response + /// Update an Incoming Number /// /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of T - public async System.Threading.Tasks.Task GetNextPageAsync(T response, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) where T : IPagination + /// String that uniquely identifies this phone number resource. + /// Incoming Number details to update (optional) + + /// IncomingNumberResult + public IncomingNumberResult UpdateAnIncomingNumber( + string phoneNumberId, + IncomingNumberRequest? incomingNumberRequest = default(IncomingNumberRequest?) + ) { - freeclimb.Client.ApiResponse localVarResponse = await GetNextPageWithHttpInfoAsync(response, cancellationToken).ConfigureAwait(false); + freeclimb.Client.ApiResponse localVarResponse = + UpdateAnIncomingNumberWithHttpInfo(phoneNumberId, incomingNumberRequest); return localVarResponse.Data; } /// - /// Get next page of paginated response + /// Update an Incoming Number /// /// Thrown when fails to make API call - - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (T) - public async System.Threading.Tasks.Task> GetNextPageWithHttpInfoAsync(T response, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) where T : IPagination + /// String that uniquely identifies this phone number resource. + /// Incoming Number details to update (optional) + + /// ApiResponse of IncomingNumberResult + public freeclimb.Client.ApiResponse UpdateAnIncomingNumberWithHttpInfo( + string phoneNumberId, + IncomingNumberRequest? incomingNumberRequest = default(IncomingNumberRequest?) + ) { - + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'accountId' when calling DefaultApi->UpdateAnIncomingNumber" + ); + } - freeclimb.Client.RequestOptions localVarRequestOptions = new freeclimb.Client.RequestOptions(); + // verify the required parameter 'phoneNumberId' is set + if (phoneNumberId == null) + { + throw new freeclimb.Client.ApiException( + 400, + "Missing required parameter 'phoneNumberId' when calling DefaultApi->UpdateAnIncomingNumber" + ); + } - string[] _contentTypes = new string[] { - }; + freeclimb.Client.RequestOptions localVarRequestOptions = + new freeclimb.Client.RequestOptions(); - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { "application/json" }; - if (response.NextPageUri == null) { - throw new Exception("Missing param NextPageUri when calling GetNextPage"); - } + // to determine the Accept header + string[] _accepts = new string[] { "application/json" }; - var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + var localVarContentType = freeclimb.Client.ClientUtils.SelectHeaderContentType( + _contentTypes + ); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); @@ -12854,21 +8637,47 @@ public freeclimb.Client.ApiResponse GetNextPageWithHttpInfo(T response) wh localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("accountId", freeclimb.Client.ClientUtils.ParameterToString(accountId)); // path parameter + localVarRequestOptions.PathParameters.Add( + "accountId", + freeclimb.Client.ClientUtils.ParameterToString(accountId) + ); // path parameter + localVarRequestOptions.PathParameters.Add( + "phoneNumberId", + freeclimb.Client.ClientUtils.ParameterToString(phoneNumberId) + ); // path parameter + localVarRequestOptions.Data = incomingNumberRequest; + + localVarRequestOptions.Operation = "DefaultApi.UpdateAnIncomingNumber"; // authentication (fc) required // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + if ( + !string.IsNullOrEmpty(this.Configuration.Username) + || !string.IsNullOrEmpty(this.Configuration.Password) + && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") + ) { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + freeclimb.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + localVarRequestOptions.HeaderParameters.Add( + "Authorization", + "Basic " + + freeclimb.Client.ClientUtils.Base64Encode( + this.Configuration.Username + ":" + this.Configuration.Password + ) + ); } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync(response.NextPageUri, localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - + var localVarResponse = this.Client.Post( + "/Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId}", + localVarRequestOptions, + this.Configuration + ); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetNextPage", localVarResponse); + Exception _exception = this.ExceptionFactory( + "UpdateAnIncomingNumber", + localVarResponse + ); if (_exception != null) { throw _exception; @@ -12877,6 +8686,5 @@ public freeclimb.Client.ApiResponse GetNextPageWithHttpInfo(T response) wh return localVarResponse; } - } } diff --git a/src/freeclimb/Client/ApiClient.cs b/src/freeclimb/Client/ApiClient.cs index 734962a3..fbc071d8 100644 --- a/src/freeclimb/Client/ApiClient.cs +++ b/src/freeclimb/Client/ApiClient.cs @@ -20,38 +20,34 @@ using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters; using System.Text; -using System.Threading; using System.Text.RegularExpressions; +using System.Threading; using System.Threading.Tasks; -using System.Web; +using freeclimb.Model; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; +using Polly; using RestSharp; -using RestSharp.Deserializers; +using RestSharp.Serializers; +using FileIO = System.IO.File; using RestSharpMethod = RestSharp.Method; -using Polly; namespace freeclimb.Client { /// /// Allows RestSharp to Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON. /// - internal class CustomJsonCodec : RestSharp.Serializers.ISerializer, RestSharp.Deserializers.IDeserializer + internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer { private readonly IReadableConfiguration _configuration; - private static readonly string _contentType = "application/json"; private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings { // OpenAPI generated types generally hide default constructors. ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, ContractResolver = new DefaultContractResolver { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, }; public CustomJsonCodec(IReadableConfiguration configuration) @@ -59,7 +55,10 @@ public CustomJsonCodec(IReadableConfiguration configuration) _configuration = configuration; } - public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) + public CustomJsonCodec( + JsonSerializerSettings serializerSettings, + IReadableConfiguration configuration + ) { _serializerSettings = serializerSettings; _configuration = configuration; @@ -72,10 +71,10 @@ public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfi /// A JSON string. public string Serialize(object obj) { - if (obj != null && obj is freeclimb.Model.AbstractOpenAPISchema) + if (obj != null && obj is AbstractOpenAPISchema) { // the object to be serialized is an oneOf/anyOf schema - return ((freeclimb.Model.AbstractOpenAPISchema)obj).ToJson(); + return ((AbstractOpenAPISchema)obj).ToJson(); } else { @@ -83,7 +82,9 @@ public string Serialize(object obj) } } - public T Deserialize(IRestResponse response) + public string Serialize(Parameter bodyParameter) => Serialize(bodyParameter.Value); + + public T Deserialize(RestResponse response) { var result = (T)Deserialize(response, typeof(T)); return result; @@ -95,7 +96,7 @@ public T Deserialize(IRestResponse response) /// The HTTP response. /// Object type. /// Object representation of the JSON string. - internal object Deserialize(IRestResponse response, Type type) + internal object Deserialize(RestResponse response, Type type) { if (type == typeof(byte[])) // return byte array { @@ -111,14 +112,20 @@ internal object Deserialize(IRestResponse response, Type type) var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath) ? Path.GetTempPath() : _configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); + var regex = new Regex( + @"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$" + ); foreach (var header in response.Headers) { var match = regex.Match(header.ToString()); if (match.Success) { - string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, bytes); + string fileName = + filePath + + ClientUtils.SanitizeFilename( + match.Groups[1].Value.Replace("\"", "").Replace("'", "") + ); + FileIO.WriteAllBytes(fileName, bytes); return new FileStream(fileName, FileMode.Open); } } @@ -129,7 +136,7 @@ internal object Deserialize(IRestResponse response, Type type) if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); + return DateTime.Parse(response.Content, null, DateTimeStyles.RoundtripKind); } if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type @@ -148,21 +155,29 @@ internal object Deserialize(IRestResponse response, Type type) } } - public string RootElement { get; set; } - public string Namespace { get; set; } - public string DateFormat { get; set; } + public ISerializer Serializer => this; + public IDeserializer Deserializer => this; - public string ContentType - { - get { return _contentType; } - set { throw new InvalidOperationException("Not allowed to set content type."); } - } + public string[] AcceptedContentTypes => ContentType.JsonAccept; + + public SupportsContentType SupportsContentType => + contentType => + contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) + || contentType.Value.EndsWith( + "javascript", + StringComparison.InvariantCultureIgnoreCase + ); + + public ContentType ContentType { get; set; } = ContentType.Json; + + public DataFormat DataFormat => DataFormat.Json; } + /// /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), /// encapsulating general REST accessor use cases. /// - public partial class ApiClient : ISynchronousClient, IAsynchronousClient + public partial class ApiClient : ISynchronousClient { private readonly string _baseUrl; @@ -170,38 +185,36 @@ public partial class ApiClient : ISynchronousClient, IAsynchronousClient /// Specifies the settings on a object. /// These settings can be adjusted to accommodate custom serialization rules. /// - public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - ContractResolver = new DefaultContractResolver + public JsonSerializerSettings SerializerSettings { get; set; } = + new JsonSerializerSettings { - NamingStrategy = new CamelCaseNamingStrategy + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver { - OverrideSpecifiedNames = false - } - } - }; + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; /// /// Allows for extending request processing for generated code. /// /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); + partial void InterceptRequest(RestRequest request); /// /// Allows for extending response processing for generated code. /// /// The RestSharp request object /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); + partial void InterceptResponse(RestRequest request, RestResponse response); /// /// Initializes a new instance of the , defaulting to the global configurations' base url. /// public ApiClient() { - _baseUrl = freeclimb.Client.GlobalConfiguration.Instance.BasePath; + _baseUrl = GlobalConfiguration.Instance.BasePath; } /// @@ -229,25 +242,25 @@ private RestSharpMethod Method(HttpMethod method) switch (method) { case HttpMethod.Get: - other = RestSharpMethod.GET; + other = RestSharpMethod.Get; break; case HttpMethod.Post: - other = RestSharpMethod.POST; + other = RestSharpMethod.Post; break; case HttpMethod.Put: - other = RestSharpMethod.PUT; + other = RestSharpMethod.Put; break; case HttpMethod.Delete: - other = RestSharpMethod.DELETE; + other = RestSharpMethod.Delete; break; case HttpMethod.Head: - other = RestSharpMethod.HEAD; + other = RestSharpMethod.Head; break; case HttpMethod.Options: - other = RestSharpMethod.OPTIONS; + other = RestSharpMethod.Options; break; case HttpMethod.Patch: - other = RestSharpMethod.PATCH; + other = RestSharpMethod.Patch; break; default: throw new ArgumentOutOfRangeException("method", method, null); @@ -258,31 +271,31 @@ private RestSharpMethod Method(HttpMethod method) /// /// Provides all logic for constructing a new RestSharp . - /// At this point, all information for querying the service is known. Here, it is simply - /// mapped into the RestSharp request. + /// At this point, all information for querying the service is known. + /// Here, it is simply mapped into the RestSharp request. /// /// The http verb. /// The target path (or resource). /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. + /// A per-request configuration object. + /// It is assumed that any merge with GlobalConfiguration has been done before calling this method. /// [private] A new RestRequest instance. /// private RestRequest NewRequest( HttpMethod method, string path, RequestOptions options, - IReadableConfiguration configuration) + IReadableConfiguration configuration + ) { - if (path == null) throw new ArgumentNullException("path"); - if (options == null) throw new ArgumentNullException("options"); - if (configuration == null) throw new ArgumentNullException("configuration"); + if (path == null) + throw new ArgumentNullException("path"); + if (options == null) + throw new ArgumentNullException("options"); + if (configuration == null) + throw new ArgumentNullException("configuration"); - RestRequest request = new RestRequest(Method(method)) - { - Resource = path, - JsonSerializer = new CustomJsonCodec(SerializerSettings, configuration) - }; + RestRequest request = new RestRequest(path, Method(method)); if (options.PathParameters != null) { @@ -349,7 +362,10 @@ private RestRequest NewRequest( if (options.HeaderParameters != null) { var contentTypes = options.HeaderParameters["Content-Type"]; - if (contentTypes == null || contentTypes.Any(header => header.Contains("application/json"))) + if ( + contentTypes == null + || contentTypes.Any(header => header.Contains("application/json")) + ) { request.RequestFormat = DataFormat.Json; } @@ -377,397 +393,257 @@ private RestRequest NewRequest( var bytes = ClientUtils.ReadAsBytes(file); var fileStream = file as FileStream; if (fileStream != null) - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name))); + request.AddFile( + fileParam.Key, + bytes, + Path.GetFileName(fileStream.Name) + ); else - request.Files.Add(FileParameter.Create(fileParam.Key, bytes, "no_file_name_provided")); + request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); } } } - if (options.Cookies != null && options.Cookies.Count > 0) - { - foreach (var cookie in options.Cookies) - { - request.AddCookie(cookie.Name, cookie.Value); - } - } - return request; } - private ApiResponse ToApiResponse(IRestResponse response) + /// + /// Transforms a RestResponse instance into a new ApiResponse instance. + /// At this point, we have a concrete http response from the service. + /// Here, it is simply mapped into the [public] ApiResponse object. + /// + /// The RestSharp response object + /// A new ApiResponse instance. + private ApiResponse ToApiResponse(RestResponse response) { T result = response.Data; string rawContent = response.Content; - var transformed = new ApiResponse(response.StatusCode, new Multimap(), result, rawContent) + var transformed = new ApiResponse( + response.StatusCode, + new Multimap(), + result, + rawContent + ) { ErrorText = response.ErrorMessage, - Cookies = new List() + Cookies = new List(), }; if (response.Headers != null) { foreach (var responseHeader in response.Headers) { - transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value)); + transformed.Headers.Add( + responseHeader.Name, + ClientUtils.ParameterToString(responseHeader.Value) + ); + } + } + + if (response.ContentHeaders != null) + { + foreach (var responseHeader in response.ContentHeaders) + { + transformed.Headers.Add( + responseHeader.Name, + ClientUtils.ParameterToString(responseHeader.Value) + ); } } if (response.Cookies != null) { - foreach (var responseCookies in response.Cookies) + foreach (var responseCookies in response.Cookies.Cast()) { transformed.Cookies.Add( new Cookie( responseCookies.Name, responseCookies.Value, responseCookies.Path, - responseCookies.Domain) - ); + responseCookies.Domain + ) + ); } } return transformed; } - private ApiResponse Exec(RestRequest req, IReadableConfiguration configuration) + /// + /// Executes the HTTP request for the current service. + /// Based on functions received it can be async or sync. + /// + /// Local function that executes http request and returns http response. + /// Local function to specify options for the service. + /// The RestSharp request object + /// The RestSharp options object + /// A per-request configuration object. + /// It is assumed that any merge with GlobalConfiguration has been done before calling this method. + /// A new ApiResponse instance. + private async Task> ExecClientAsync( + Func>> getResponse, + Action setOptions, + RestRequest request, + RequestOptions options, + IReadableConfiguration configuration + ) { - RestClient client = new RestClient(_baseUrl); - - client.ClearHandlers(); - var existingDeserializer = req.JsonSerializer as IDeserializer; - if (existingDeserializer != null) - { - client.AddHandler("application/json", () => existingDeserializer); - client.AddHandler("text/json", () => existingDeserializer); - client.AddHandler("text/x-json", () => existingDeserializer); - client.AddHandler("text/javascript", () => existingDeserializer); - client.AddHandler("*+json", () => existingDeserializer); - } - else - { - var customDeserializer = new CustomJsonCodec(SerializerSettings, configuration); - client.AddHandler("application/json", () => customDeserializer); - client.AddHandler("text/json", () => customDeserializer); - client.AddHandler("text/x-json", () => customDeserializer); - client.AddHandler("text/javascript", () => customDeserializer); - client.AddHandler("*+json", () => customDeserializer); - } - - var xmlDeserializer = new XmlDeserializer(); - client.AddHandler("application/xml", () => xmlDeserializer); - client.AddHandler("text/xml", () => xmlDeserializer); - client.AddHandler("*+xml", () => xmlDeserializer); - client.AddHandler("*", () => xmlDeserializer); - - client.Timeout = configuration.Timeout; - - if (configuration.Proxy != null) - { - client.Proxy = configuration.Proxy; - } + var baseUrl = + configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) + ?? _baseUrl; + var clientOptions = new RestClientOptions(baseUrl) + { + ClientCertificates = configuration.ClientCertificates, + MaxTimeout = configuration.Timeout, + Proxy = configuration.Proxy, + UserAgent = configuration.UserAgent, + UseDefaultCredentials = configuration.UseDefaultCredentials, + RemoteCertificateValidationCallback = + configuration.RemoteCertificateValidationCallback, + }; + setOptions(clientOptions); - if (configuration.UserAgent != null) + using ( + RestClient client = new RestClient( + clientOptions, + configureSerialization: serializerConfig => + serializerConfig.UseSerializer( + () => new CustomJsonCodec(SerializerSettings, configuration) + ) + ) + ) { - client.UserAgent = configuration.UserAgent; - } + InterceptRequest(request); - if (configuration.ClientCertificates != null) - { - client.ClientCertificates = configuration.ClientCertificates; - } + RestResponse response = await getResponse(client); - InterceptRequest(req); - - IRestResponse response; - if (RetryConfiguration.RetryPolicy != null) - { - var policy = RetryConfiguration.RetryPolicy; - var policyResult = policy.ExecuteAndCapture(() => client.Execute(req)); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof(AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) { - Request = req, - ErrorException = policyResult.FinalException - }; - } - else - { - response = client.Execute(req); - } - - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(freeclimb.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - try + try + { + response.Data = (T) + typeof(T) + .GetMethod("FromJson") + .Invoke(null, new object[] { response.Content }); + } + catch (Exception ex) + { + throw ex.InnerException != null ? ex.InnerException : ex; + } + } + else if (typeof(T).Name == "Stream") // for binary response { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + response.Data = (T)(object)new MemoryStream(response.RawBytes); } - catch (Exception ex) + else if (typeof(T).Name == "Byte[]") // for byte response { - throw ex.InnerException != null ? ex.InnerException : ex; + response.Data = (T)(object)response.RawBytes; + } + else if (typeof(T).Name == "String") // for string response + { + response.Data = (T)(object)response.Content; } - } - else if (typeof(T).Name == "Stream") // for binary response - { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } - InterceptResponse(req, response); + InterceptResponse(request, response); - var result = ToApiResponse(response); - if (response.ErrorMessage != null) - { - result.ErrorText = response.ErrorMessage; - } + var result = ToApiResponse(response); + if (response.ErrorMessage != null) + { + result.ErrorText = response.ErrorMessage; + } - if (response.Cookies != null && response.Cookies.Count > 0) - { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies) + if (response.Cookies != null && response.Cookies.Count > 0) { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) + if (result.Cookies == null) + result.Cookies = new List(); + foreach (var restResponseCookie in response.Cookies.Cast()) { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); + var cookie = new Cookie( + restResponseCookie.Name, + restResponseCookie.Value, + restResponseCookie.Path, + restResponseCookie.Domain + ) + { + Comment = restResponseCookie.Comment, + CommentUri = restResponseCookie.CommentUri, + Discard = restResponseCookie.Discard, + Expired = restResponseCookie.Expired, + Expires = restResponseCookie.Expires, + HttpOnly = restResponseCookie.HttpOnly, + Port = restResponseCookie.Port, + Secure = restResponseCookie.Secure, + Version = restResponseCookie.Version, + }; + + result.Cookies.Add(cookie); + } } + return result; } - return result; } - private async Task> ExecAsync(RestRequest req, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + private RestResponse DeserializeRestResponseFromPolicy( + RestClient client, + RestRequest request, + PolicyResult policyResult + ) { - RestClient client = new RestClient(_baseUrl); - - client.ClearHandlers(); - var existingDeserializer = req.JsonSerializer as IDeserializer; - if (existingDeserializer != null) + if (policyResult.Outcome == OutcomeType.Successful) { - client.AddHandler("application/json", () => existingDeserializer); - client.AddHandler("text/json", () => existingDeserializer); - client.AddHandler("text/x-json", () => existingDeserializer); - client.AddHandler("text/javascript", () => existingDeserializer); - client.AddHandler("*+json", () => existingDeserializer); + return client.Deserialize(policyResult.Result); } else { - var customDeserializer = new CustomJsonCodec(SerializerSettings, configuration); - client.AddHandler("application/json", () => customDeserializer); - client.AddHandler("text/json", () => customDeserializer); - client.AddHandler("text/x-json", () => customDeserializer); - client.AddHandler("text/javascript", () => customDeserializer); - client.AddHandler("*+json", () => customDeserializer); - } - - var xmlDeserializer = new XmlDeserializer(); - client.AddHandler("application/xml", () => xmlDeserializer); - client.AddHandler("text/xml", () => xmlDeserializer); - client.AddHandler("*+xml", () => xmlDeserializer); - client.AddHandler("*", () => xmlDeserializer); - - client.Timeout = configuration.Timeout; - - if (configuration.Proxy != null) - { - client.Proxy = configuration.Proxy; - } - - if (configuration.UserAgent != null) - { - client.UserAgent = configuration.UserAgent; - } - - if (configuration.ClientCertificates != null) - { - client.ClientCertificates = configuration.ClientCertificates; - } - - InterceptRequest(req); - - IRestResponse response; - if (RetryConfiguration.AsyncRetryPolicy != null) - { - var policy = RetryConfiguration.AsyncRetryPolicy; - var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(req, ct), cancellationToken).ConfigureAwait(false); - response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse + return new RestResponse(request) { - Request = req, - ErrorException = policyResult.FinalException + ErrorException = policyResult.FinalException, }; } - else - { - response = await client.ExecuteAsync(req, cancellationToken).ConfigureAwait(false); - } - - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(freeclimb.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); - } - else if (typeof(T).Name == "Stream") // for binary response - { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } - - InterceptResponse(req, response); + } - var result = ToApiResponse(response); - if (response.ErrorMessage != null) + private ApiResponse Exec( + RestRequest request, + RequestOptions options, + IReadableConfiguration configuration + ) + { + Action setOptions = (clientOptions) => { - result.ErrorText = response.ErrorMessage; - } + var cookies = new CookieContainer(); - if (response.Cookies != null && response.Cookies.Count > 0) - { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies) + if (options.Cookies != null && options.Cookies.Count > 0) { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) + foreach (var cookie in options.Cookies) { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); + cookies.Add(new Cookie(cookie.Name, cookie.Value)); + } } - } - return result; - } - - #region IAsynchronousClient - /// - /// Make a HTTP GET request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); - } - - /// - /// Make a HTTP POST request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); - } - - /// - /// Make a HTTP PUT request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); - } - - /// - /// Make a HTTP DELETE request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); - } - - /// - /// Make a HTTP HEAD request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); - } + clientOptions.CookieContainer = cookies; + }; - /// - /// Make a HTTP OPTION request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); - } + Func>> getResponse = (client) => + { + if (RetryConfiguration.RetryPolicy != null) + { + var policy = RetryConfiguration.RetryPolicy; + var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); + return Task.FromResult( + DeserializeRestResponseFromPolicy(client, request, policyResult) + ); + } + else + { + return Task.FromResult(client.Execute(request)); + } + }; - /// - /// Make a HTTP PATCH request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), config, cancellationToken); + return ExecClientAsync(getResponse, setOptions, request, options, configuration) + .GetAwaiter() + .GetResult(); } - #endregion IAsynchronousClient #region ISynchronousClient /// @@ -778,10 +654,14 @@ private ApiResponse Exec(RestRequest req, IReadableConfiguration configura /// A per-request configuration object. It is assumed that any merge with /// GlobalConfiguration has been done before calling this method. /// A Task containing ApiResponse - public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) + public ApiResponse Get( + string path, + RequestOptions options, + IReadableConfiguration configuration = null + ) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), config); + return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); } /// @@ -792,10 +672,14 @@ public ApiResponse Get(string path, RequestOptions options, IReadableConfi /// A per-request configuration object. It is assumed that any merge with /// GlobalConfiguration has been done before calling this method. /// A Task containing ApiResponse - public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) + public ApiResponse Post( + string path, + RequestOptions options, + IReadableConfiguration configuration = null + ) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), config); + return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); } /// @@ -806,10 +690,14 @@ public ApiResponse Post(string path, RequestOptions options, IReadableConf /// A per-request configuration object. It is assumed that any merge with /// GlobalConfiguration has been done before calling this method. /// A Task containing ApiResponse - public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) + public ApiResponse Put( + string path, + RequestOptions options, + IReadableConfiguration configuration = null + ) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), config); + return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); } /// @@ -820,10 +708,14 @@ public ApiResponse Put(string path, RequestOptions options, IReadableConfi /// A per-request configuration object. It is assumed that any merge with /// GlobalConfiguration has been done before calling this method. /// A Task containing ApiResponse - public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) + public ApiResponse Delete( + string path, + RequestOptions options, + IReadableConfiguration configuration = null + ) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), config); + return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); } /// @@ -834,10 +726,14 @@ public ApiResponse Delete(string path, RequestOptions options, IReadableCo /// A per-request configuration object. It is assumed that any merge with /// GlobalConfiguration has been done before calling this method. /// A Task containing ApiResponse - public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) + public ApiResponse Head( + string path, + RequestOptions options, + IReadableConfiguration configuration = null + ) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), config); + return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); } /// @@ -848,10 +744,14 @@ public ApiResponse Head(string path, RequestOptions options, IReadableConf /// A per-request configuration object. It is assumed that any merge with /// GlobalConfiguration has been done before calling this method. /// A Task containing ApiResponse - public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) + public ApiResponse Options( + string path, + RequestOptions options, + IReadableConfiguration configuration = null + ) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), config); + return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); } /// @@ -862,10 +762,14 @@ public ApiResponse Options(string path, RequestOptions options, IReadableC /// A per-request configuration object. It is assumed that any merge with /// GlobalConfiguration has been done before calling this method. /// A Task containing ApiResponse - public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) + public ApiResponse Patch( + string path, + RequestOptions options, + IReadableConfiguration configuration = null + ) { var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Patch, path, options, config), config); + return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); } #endregion ISynchronousClient } diff --git a/src/freeclimb/Client/ApiException.cs b/src/freeclimb/Client/ApiException.cs index 3d9c913b..8701bd3c 100644 --- a/src/freeclimb/Client/ApiException.cs +++ b/src/freeclimb/Client/ApiException.cs @@ -46,7 +46,8 @@ public ApiException() { } /// /// HTTP status code. /// Error message. - public ApiException(int errorCode, string message) : base(message) + public ApiException(int errorCode, string message) + : base(message) { this.ErrorCode = errorCode; } @@ -58,12 +59,17 @@ public ApiException(int errorCode, string message) : base(message) /// Error message. /// Error content. /// HTTP Headers. - public ApiException(int errorCode, string message, object errorContent = null, Multimap headers = null) : base(message) + public ApiException( + int errorCode, + string message, + object errorContent = null, + Multimap headers = null + ) + : base(message) { this.ErrorCode = errorCode; this.ErrorContent = errorContent; this.Headers = headers; } } - } diff --git a/src/freeclimb/Client/ApiResponse.cs b/src/freeclimb/Client/ApiResponse.cs index 4d08aa5d..e9d193e9 100644 --- a/src/freeclimb/Client/ApiResponse.cs +++ b/src/freeclimb/Client/ApiResponse.cs @@ -125,7 +125,12 @@ public object Content /// HTTP headers. /// Data (parsed HTTP body) /// Raw content. - public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data, string rawContent) + public ApiResponse( + HttpStatusCode statusCode, + Multimap headers, + T data, + string rawContent + ) { StatusCode = statusCode; Headers = headers; @@ -139,9 +144,8 @@ public ApiResponse(HttpStatusCode statusCode, Multimap headers, /// HTTP status code. /// HTTP headers. /// Data (parsed HTTP body) - public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data) : this(statusCode, headers, data, null) - { - } + public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data) + : this(statusCode, headers, data, null) { } /// /// Initializes a new instance of the class. @@ -149,18 +153,16 @@ public ApiResponse(HttpStatusCode statusCode, Multimap headers, /// HTTP status code. /// Data (parsed HTTP body) /// Raw content. - public ApiResponse(HttpStatusCode statusCode, T data, string rawContent) : this(statusCode, null, data, rawContent) - { - } + public ApiResponse(HttpStatusCode statusCode, T data, string rawContent) + : this(statusCode, null, data, rawContent) { } /// /// Initializes a new instance of the class. /// /// HTTP status code. /// Data (parsed HTTP body) - public ApiResponse(HttpStatusCode statusCode, T data) : this(statusCode, data, null) - { - } + public ApiResponse(HttpStatusCode statusCode, T data) + : this(statusCode, data, null) { } #endregion Constructors } diff --git a/src/freeclimb/Client/ClientUtils.cs b/src/freeclimb/Client/ClientUtils.cs index 31a20b66..7ffc58f3 100644 --- a/src/freeclimb/Client/ClientUtils.cs +++ b/src/freeclimb/Client/ClientUtils.cs @@ -11,12 +11,13 @@ using System; using System.Collections; +using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using freeclimb.Enums; namespace freeclimb.Client { @@ -44,7 +45,11 @@ public static string SanitizeFilename(string filename) /// Key name. /// Value object. /// A multimap of keys with 1..n associated values. - public static Multimap ParameterToMultiMap(string collectionFormat, string name, object value) + public static Multimap ParameterToMultiMap( + string collectionFormat, + string name, + object value + ) { var parameters = new Multimap(); @@ -57,13 +62,18 @@ public static Multimap ParameterToMultiMap(string collectionForm } else if (value is IDictionary dictionary) { - if(collectionFormat == "deepObject") { + if (collectionFormat == "deepObject") + { foreach (DictionaryEntry entry in dictionary) { - parameters.Add(name + "[" + entry.Key + "]", ParameterToString(entry.Value)); + parameters.Add( + name + "[" + entry.Key + "]", + ParameterToString(entry.Value) + ); } } - else { + else + { foreach (DictionaryEntry entry in dictionary) { parameters.Add(entry.Key.ToString(), ParameterToString(entry.Value)); @@ -72,16 +82,7 @@ public static Multimap ParameterToMultiMap(string collectionForm } else { - if (value is Enum) - { - Enum newValue = (Enum)value; - parameters.Add(name, newValue.GetMemberValue()); - } - else - { - parameters.Add(name, ParameterToString(value)); - } - + parameters.Add(name, ParameterToString(value)); } return parameters; @@ -95,61 +96,58 @@ public static Multimap ParameterToMultiMap(string collectionForm /// The parameter (header, path, query, form). /// An optional configuration instance, providing formatting options used in processing. /// Formatted string. - public static string ParameterToString(object obj, IReadableConfiguration configuration = null) + public static string ParameterToString( + object obj, + IReadableConfiguration configuration = null + ) { if (obj is DateTime dateTime) // Return a formatted date string - Can be customized with Configuration.DateTimeFormat // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 - return dateTime.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + return dateTime.ToString( + (configuration ?? GlobalConfiguration.Instance).DateTimeFormat + ); if (obj is DateTimeOffset dateTimeOffset) // Return a formatted date string - Can be customized with Configuration.DateTimeFormat // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 - return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + return dateTimeOffset.ToString( + (configuration ?? GlobalConfiguration.Instance).DateTimeFormat + ); + if (obj is DateOnly dateOnly) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15 + return dateOnly.ToString( + (configuration ?? GlobalConfiguration.Instance).DateTimeFormat + ); if (obj is bool boolean) return boolean ? "true" : "false"; if (obj is ICollection collection) - return string.Join(",", collection.Cast()); + { + List entries = new List(); + foreach (var entry in collection) + entries.Add(ParameterToString(entry, configuration)); + return string.Join(",", entries); + } + if (obj is Enum && HasEnumMemberAttrValue(obj)) + return GetEnumMemberAttrValue(obj); return Convert.ToString(obj, CultureInfo.InvariantCulture); } /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 + /// Serializes the given object when not null. Otherwise return null. /// - /// string to be URL encoded - /// Byte array - public static string UrlEncode(string input) + /// The object to serialize. + /// Serialized string. + public static string Serialize(object obj) { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); + return obj != null ? Newtonsoft.Json.JsonConvert.SerializeObject(obj) : null; } /// @@ -159,7 +157,7 @@ public static string UrlEncode(string input) /// Encoded string. public static string Base64Encode(string text) { - return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + return Convert.ToBase64String(global::System.Text.Encoding.UTF8.GetBytes(text)); } /// @@ -207,7 +205,7 @@ public static string SelectHeaderContentType(string[] contentTypes) public static string SelectHeaderAccept(string[] accepts) { if (accepts.Length == 0) - return ""; + return null; if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) return "application/json"; @@ -218,7 +216,9 @@ public static string SelectHeaderAccept(string[] accepts) /// /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. /// - public static readonly Regex JsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); + public static readonly Regex JsonRegex = new Regex( + "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$" + ); /// /// Check if the given MIME is a JSON MIME. @@ -232,9 +232,58 @@ public static string SelectHeaderAccept(string[] accepts) /// Returns True if MIME type is json. public static bool IsJsonMime(string mime) { - if (string.IsNullOrWhiteSpace(mime)) return false; + if (string.IsNullOrWhiteSpace(mime)) + return false; return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); } + + /// + /// Is the Enum decorated with EnumMember Attribute + /// + /// + /// true if found + private static bool HasEnumMemberAttrValue(object enumVal) + { + if (enumVal == null) + throw new ArgumentNullException(nameof(enumVal)); + var enumType = enumVal.GetType(); + var memInfo = enumType.GetMember( + enumVal.ToString() ?? throw new InvalidOperationException() + ); + var attr = memInfo + .FirstOrDefault() + ?.GetCustomAttributes(false) + .OfType() + .FirstOrDefault(); + if (attr != null) + return true; + return false; + } + + /// + /// Get the EnumMember value + /// + /// + /// EnumMember value as string otherwise null + private static string GetEnumMemberAttrValue(object enumVal) + { + if (enumVal == null) + throw new ArgumentNullException(nameof(enumVal)); + var enumType = enumVal.GetType(); + var memInfo = enumType.GetMember( + enumVal.ToString() ?? throw new InvalidOperationException() + ); + var attr = memInfo + .FirstOrDefault() + ?.GetCustomAttributes(false) + .OfType() + .FirstOrDefault(); + if (attr != null) + { + return attr.Value; + } + return null; + } } } diff --git a/src/freeclimb/Client/Configuration.cs b/src/freeclimb/Client/Configuration.cs index c3194e5a..9b525a1e 100644 --- a/src/freeclimb/Client/Configuration.cs +++ b/src/freeclimb/Client/Configuration.cs @@ -15,6 +15,8 @@ using System.IO; using System.Linq; using System.Net; +using System.Net.Http; +using System.Net.Security; using System.Reflection; using System.Security.Cryptography.X509Certificates; using System.Text; @@ -32,7 +34,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "4.10.0"; + public const string Version = "5.0.0"; /// /// Identifier for ISO 8601 DateTime Format @@ -53,14 +55,20 @@ public class Configuration : IReadableConfiguration var status = (int)response.StatusCode; if (status >= 400) { - return new ApiException(status, + return new ApiException( + status, string.Format("Error calling {0}: {1}", methodName, response.RawContent), - response.RawContent, response.Headers); + response.RawContent, + response.Headers + ); } if (status == 0) { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText); + return new ApiException( + status, + string.Format("Error calling {0}: {1}", methodName, response.ErrorText), + response.ErrorText + ); } return null; }; @@ -75,6 +83,8 @@ public class Configuration : IReadableConfiguration /// private string _basePath; + private bool _useDefaultCredentials = false; + /// /// Gets or sets the API key based on the authentication name. /// This is the key and value comprising the "secret" for accessing an API. @@ -96,6 +106,16 @@ public class Configuration : IReadableConfiguration /// /// The servers private IList> _servers; + + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary< + string, + List> + > _operationServers; + #endregion Private Members #region Constructors @@ -103,11 +123,14 @@ public class Configuration : IReadableConfiguration /// /// Initializes a new instance of the class /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] + [global::System.Diagnostics.CodeAnalysis.SuppressMessage( + "ReSharper", + "VirtualMemberCallInConstructor" + )] public Configuration() { Proxy = null; - UserAgent = "OpenAPI-Generator/4.10.0/csharp"; + UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/5.0.0/csharp"); BasePath = "https://www.freeclimb.com/apiserver"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -115,12 +138,15 @@ public Configuration() Servers = new List>() { { - new Dictionary { - {"url", "https://www.freeclimb.com/apiserver"}, - {"description", "No description provided"}, + new Dictionary + { + { "url", "https://www.freeclimb.com/apiserver" }, + { "description", "No description provided" }, } - } + }, }; + OperationServers = new Dictionary>>() + { }; // Setting Timeout has side effects (forces ApiClient creation). Timeout = 100000; @@ -129,12 +155,17 @@ public Configuration() /// /// Initializes a new instance of the class /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] + [global::System.Diagnostics.CodeAnalysis.SuppressMessage( + "ReSharper", + "VirtualMemberCallInConstructor" + )] public Configuration( IDictionary defaultHeaders, IDictionary apiKey, IDictionary apiKeyPrefix, - string basePath = "https://www.freeclimb.com/apiserver") : this() + string basePath = "https://www.freeclimb.com/apiserver" + ) + : this() { if (string.IsNullOrWhiteSpace(basePath)) throw new ArgumentException("The provided basePath is invalid.", "basePath"); @@ -170,25 +201,29 @@ public Configuration( /// /// Gets or sets the base path for API access. /// - public virtual string BasePath { + public virtual string BasePath + { get { return _basePath; } set { _basePath = value; } } + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + public virtual bool UseDefaultCredentials + { + get { return _useDefaultCredentials; } + set { _useDefaultCredentials = value; } + } + /// /// Gets or sets the default header. /// [Obsolete("Use DefaultHeaders instead.")] public virtual IDictionary DefaultHeader { - get - { - return DefaultHeaders; - } - set - { - DefaultHeaders = value; - } + get { return DefaultHeaders; } + set { DefaultHeaders = value; } } /// @@ -264,7 +299,6 @@ public string GetApiKeyWithPrefix(string apiKeyIdentifier) public virtual string TempFolderPath { get { return _tempFolderPath; } - set { if (string.IsNullOrEmpty(value)) @@ -380,6 +414,26 @@ public virtual IList> Servers } } + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary< + string, + List> + > OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + /// /// Returns URL based on server settings without providing values /// for the variables @@ -388,7 +442,7 @@ public virtual IList> Servers /// The server URL. public string GetServerUrl(int index) { - return GetServerUrl(index, null); + return GetServerUrl(Servers, index, null); } /// @@ -399,9 +453,62 @@ public string GetServerUrl(int index) /// The server URL. public string GetServerUrl(int index, Dictionary inputVariables) { - if (index < 0 || index >= Servers.Count) + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl( + string operation, + int index, + Dictionary inputVariables + ) + { + if ( + operation != null + && OperationServers.TryGetValue(operation, out var operationServer) + ) { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {Servers.Count}."); + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl( + IList> servers, + int index, + Dictionary inputVariables + ) + { + if (index < 0 || index >= servers.Count) + { + throw new InvalidOperationException( + $"Invalid index {index} when selecting the server. Must be less than {servers.Count}." + ); } if (inputVariables == null) @@ -409,36 +516,59 @@ public string GetServerUrl(int index, Dictionary inputVariables) inputVariables = new Dictionary(); } - IReadOnlyDictionary server = Servers[index]; + IReadOnlyDictionary server = servers[index]; string url = (string)server["url"]; - // go through variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + if (server.ContainsKey("variables")) { - - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - - if (inputVariables.ContainsKey(variable.Key)) + // go through each variable and assign a value + foreach ( + KeyValuePair variable in (IReadOnlyDictionary) + server["variables"] + ) { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + IReadOnlyDictionary serverVariables = + (IReadOnlyDictionary)(variable.Value); + + if (inputVariables.ContainsKey(variable.Key)) { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + if ( + ((List)serverVariables["enum_values"]).Contains( + inputVariables[variable.Key] + ) + ) + { + url = url.Replace( + "{" + variable.Key + "}", + inputVariables[variable.Key] + ); + } + else + { + throw new InvalidOperationException( + $"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}" + ); + } } else { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + // use default value + url = url.Replace( + "{" + variable.Key + "}", + (string)serverVariables["default_value"] + ); } } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } } return url; } + /// + /// Gets and Sets the RemoteCertificateValidationCallback + /// + public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; } + #endregion Properties #region Methods @@ -450,9 +580,9 @@ public static string ToDebugReport() { string report = "C# SDK (freeclimb) Debug Report:\n"; report += " OS: " + System.Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + System.Environment.Version + "\n"; + report += " .NET Framework Version: " + System.Environment.Version + "\n"; report += " Version of the API: 1.0.0\n"; - report += " SDK Package Version: 4.10.0\n"; + report += " SDK Package Version: 5.0.0\n"; return report; } @@ -487,17 +617,33 @@ public void AddApiKeyPrefix(string key, string value) /// First configuration. /// Second configuration. /// Merged configuration. - public static IReadableConfiguration MergeConfigurations(IReadableConfiguration first, IReadableConfiguration second) + public static IReadableConfiguration MergeConfigurations( + IReadableConfiguration first, + IReadableConfiguration second + ) { - if (second == null) return first ?? GlobalConfiguration.Instance; - - Dictionary apiKey = first.ApiKey.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - Dictionary apiKeyPrefix = first.ApiKeyPrefix.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - Dictionary defaultHeaders = first.DefaultHeaders.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - - foreach (var kvp in second.ApiKey) apiKey[kvp.Key] = kvp.Value; - foreach (var kvp in second.ApiKeyPrefix) apiKeyPrefix[kvp.Key] = kvp.Value; - foreach (var kvp in second.DefaultHeaders) defaultHeaders[kvp.Key] = kvp.Value; + if (second == null) + return first ?? GlobalConfiguration.Instance; + + Dictionary apiKey = first.ApiKey.ToDictionary( + kvp => kvp.Key, + kvp => kvp.Value + ); + Dictionary apiKeyPrefix = first.ApiKeyPrefix.ToDictionary( + kvp => kvp.Key, + kvp => kvp.Value + ); + Dictionary defaultHeaders = first.DefaultHeaders.ToDictionary( + kvp => kvp.Key, + kvp => kvp.Value + ); + + foreach (var kvp in second.ApiKey) + apiKey[kvp.Key] = kvp.Value; + foreach (var kvp in second.ApiKeyPrefix) + apiKeyPrefix[kvp.Key] = kvp.Value; + foreach (var kvp in second.DefaultHeaders) + defaultHeaders[kvp.Key] = kvp.Value; var config = new Configuration { @@ -512,7 +658,12 @@ public static IReadableConfiguration MergeConfigurations(IReadableConfiguration Password = second.Password ?? first.Password, AccessToken = second.AccessToken ?? first.AccessToken, TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, + UseDefaultCredentials = second.UseDefaultCredentials, + RemoteCertificateValidationCallback = + second.RemoteCertificateValidationCallback + ?? first.RemoteCertificateValidationCallback, }; return config; } diff --git a/src/freeclimb/Client/GlobalConfiguration.cs b/src/freeclimb/Client/GlobalConfiguration.cs index 085f78ca..4f2197b1 100644 --- a/src/freeclimb/Client/GlobalConfiguration.cs +++ b/src/freeclimb/Client/GlobalConfiguration.cs @@ -33,14 +33,16 @@ public partial class GlobalConfiguration : Configuration #region Constructors /// - private GlobalConfiguration() - { - } + private GlobalConfiguration() { } /// - public GlobalConfiguration(IDictionary defaultHeader, IDictionary apiKey, IDictionary apiKeyPrefix, string basePath = "http://localhost:3000/api") : base(defaultHeader, apiKey, apiKeyPrefix, basePath) - { - } + public GlobalConfiguration( + IDictionary defaultHeader, + IDictionary apiKey, + IDictionary apiKeyPrefix, + string basePath = "http://localhost:3000/api" + ) + : base(defaultHeader, apiKey, apiKeyPrefix, basePath) { } static GlobalConfiguration() { diff --git a/src/freeclimb/Client/HttpMethod.cs b/src/freeclimb/Client/HttpMethod.cs index 5a770526..2a91c5fd 100644 --- a/src/freeclimb/Client/HttpMethod.cs +++ b/src/freeclimb/Client/HttpMethod.cs @@ -18,17 +18,23 @@ public enum HttpMethod { /// HTTP GET request. Get, + /// HTTP POST request. Post, + /// HTTP PUT request. Put, + /// HTTP DELETE request. Delete, + /// HTTP HEAD request. Head, + /// HTTP OPTIONS request. Options, + /// HTTP PATCH request. - Patch + Patch, } } diff --git a/src/freeclimb/Client/IAsynchronousClient.cs b/src/freeclimb/Client/IAsynchronousClient.cs index d8fc3d06..ae4545bf 100644 --- a/src/freeclimb/Client/IAsynchronousClient.cs +++ b/src/freeclimb/Client/IAsynchronousClient.cs @@ -30,7 +30,13 @@ public interface IAsynchronousClient /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> GetAsync( + string path, + RequestOptions options, + IReadableConfiguration configuration = null, + System.Threading.CancellationToken cancellationToken = + default(System.Threading.CancellationToken) + ); /// /// Executes a non-blocking call to some using the POST http verb. @@ -41,7 +47,13 @@ public interface IAsynchronousClient /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> PostAsync( + string path, + RequestOptions options, + IReadableConfiguration configuration = null, + System.Threading.CancellationToken cancellationToken = + default(System.Threading.CancellationToken) + ); /// /// Executes a non-blocking call to some using the PUT http verb. @@ -52,7 +64,13 @@ public interface IAsynchronousClient /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> PutAsync( + string path, + RequestOptions options, + IReadableConfiguration configuration = null, + System.Threading.CancellationToken cancellationToken = + default(System.Threading.CancellationToken) + ); /// /// Executes a non-blocking call to some using the DELETE http verb. @@ -63,7 +81,13 @@ public interface IAsynchronousClient /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> DeleteAsync( + string path, + RequestOptions options, + IReadableConfiguration configuration = null, + System.Threading.CancellationToken cancellationToken = + default(System.Threading.CancellationToken) + ); /// /// Executes a non-blocking call to some using the HEAD http verb. @@ -74,7 +98,13 @@ public interface IAsynchronousClient /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> HeadAsync( + string path, + RequestOptions options, + IReadableConfiguration configuration = null, + System.Threading.CancellationToken cancellationToken = + default(System.Threading.CancellationToken) + ); /// /// Executes a non-blocking call to some using the OPTIONS http verb. @@ -85,7 +115,13 @@ public interface IAsynchronousClient /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> OptionsAsync( + string path, + RequestOptions options, + IReadableConfiguration configuration = null, + System.Threading.CancellationToken cancellationToken = + default(System.Threading.CancellationToken) + ); /// /// Executes a non-blocking call to some using the PATCH http verb. @@ -96,6 +132,12 @@ public interface IAsynchronousClient /// Cancellation Token to cancel the request. /// The return type. /// A task eventually representing the response data, decorated with - Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + Task> PatchAsync( + string path, + RequestOptions options, + IReadableConfiguration configuration = null, + System.Threading.CancellationToken cancellationToken = + default(System.Threading.CancellationToken) + ); } } diff --git a/src/freeclimb/Client/IReadableConfiguration.cs b/src/freeclimb/Client/IReadableConfiguration.cs index 9a54a7fa..a145b7ab 100644 --- a/src/freeclimb/Client/IReadableConfiguration.cs +++ b/src/freeclimb/Client/IReadableConfiguration.cs @@ -12,6 +12,7 @@ using System; using System.Collections.Generic; using System.Net; +using System.Net.Security; using System.Security.Cryptography.X509Certificates; namespace freeclimb.Client @@ -100,6 +101,20 @@ public interface IReadableConfiguration /// Password. string Password { get; } + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + bool UseDefaultCredentials { get; } + + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary< + string, + List> + > OperationServers { get; } + /// /// Gets the API key with prefix. /// @@ -107,10 +122,24 @@ public interface IReadableConfiguration /// API key with prefix. string GetApiKeyWithPrefix(string apiKeyIdentifier); + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + /// /// Gets certificate collection to be sent with requests. /// /// X509 Certificate collection. X509CertificateCollection ClientCertificates { get; } + + /// + /// Callback function for handling the validation of remote certificates. Useful for certificate pinning and + /// overriding certificate errors in the scope of a request. + /// + RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; } } } diff --git a/src/freeclimb/Client/ISynchronousClient.cs b/src/freeclimb/Client/ISynchronousClient.cs index 74d4c5d2..c8229e1c 100644 --- a/src/freeclimb/Client/ISynchronousClient.cs +++ b/src/freeclimb/Client/ISynchronousClient.cs @@ -29,7 +29,11 @@ public interface ISynchronousClient /// Per-request configurable settings. /// The return type. /// The response data, decorated with - ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null); + ApiResponse Get( + string path, + RequestOptions options, + IReadableConfiguration configuration = null + ); /// /// Executes a blocking call to some using the POST http verb. @@ -39,7 +43,11 @@ public interface ISynchronousClient /// Per-request configurable settings. /// The return type. /// The response data, decorated with - ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null); + ApiResponse Post( + string path, + RequestOptions options, + IReadableConfiguration configuration = null + ); /// /// Executes a blocking call to some using the PUT http verb. @@ -49,7 +57,11 @@ public interface ISynchronousClient /// Per-request configurable settings. /// The return type. /// The response data, decorated with - ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null); + ApiResponse Put( + string path, + RequestOptions options, + IReadableConfiguration configuration = null + ); /// /// Executes a blocking call to some using the DELETE http verb. @@ -59,7 +71,11 @@ public interface ISynchronousClient /// Per-request configurable settings. /// The return type. /// The response data, decorated with - ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null); + ApiResponse Delete( + string path, + RequestOptions options, + IReadableConfiguration configuration = null + ); /// /// Executes a blocking call to some using the HEAD http verb. @@ -69,7 +85,11 @@ public interface ISynchronousClient /// Per-request configurable settings. /// The return type. /// The response data, decorated with - ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null); + ApiResponse Head( + string path, + RequestOptions options, + IReadableConfiguration configuration = null + ); /// /// Executes a blocking call to some using the OPTIONS http verb. @@ -79,7 +99,11 @@ public interface ISynchronousClient /// Per-request configurable settings. /// The return type. /// The response data, decorated with - ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null); + ApiResponse Options( + string path, + RequestOptions options, + IReadableConfiguration configuration = null + ); /// /// Executes a blocking call to some using the PATCH http verb. @@ -89,6 +113,10 @@ public interface ISynchronousClient /// Per-request configurable settings. /// The return type. /// The response data, decorated with - ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null); + ApiResponse Patch( + string path, + RequestOptions options, + IReadableConfiguration configuration = null + ); } } diff --git a/src/freeclimb/Client/Multimap.cs b/src/freeclimb/Client/Multimap.cs index ec755275..dbe5d55a 100644 --- a/src/freeclimb/Client/Multimap.cs +++ b/src/freeclimb/Client/Multimap.cs @@ -160,7 +160,8 @@ public void Add(TKey key, IList value) { if (_dictionary.TryGetValue(key, out var list)) { - foreach (var k in value) list.Add(k); + foreach (var k in value) + list.Add(k); } else { diff --git a/src/freeclimb/Client/RequestOptions.cs b/src/freeclimb/Client/RequestOptions.cs index 33d1cc67..173899c1 100644 --- a/src/freeclimb/Client/RequestOptions.cs +++ b/src/freeclimb/Client/RequestOptions.cs @@ -34,7 +34,7 @@ public class RequestOptions public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } @@ -54,6 +54,16 @@ public class RequestOptions /// public List Cookies { get; set; } + /// + /// Operation associated with the request path. + /// + public string Operation { get; set; } + + /// + /// Index associated with the operation. + /// + public int OperationIndex { get; set; } + /// /// Any data associated with a request body. /// diff --git a/src/freeclimb/Client/RetryConfiguration.cs b/src/freeclimb/Client/RetryConfiguration.cs index e7d87400..610197aa 100644 --- a/src/freeclimb/Client/RetryConfiguration.cs +++ b/src/freeclimb/Client/RetryConfiguration.cs @@ -22,11 +22,11 @@ public static class RetryConfiguration /// /// Retry policy /// - public static Policy RetryPolicy { get; set; } + public static Policy RetryPolicy { get; set; } /// /// Async retry policy /// - public static AsyncPolicy AsyncRetryPolicy { get; set; } + public static AsyncPolicy AsyncRetryPolicy { get; set; } } } diff --git a/src/freeclimb/Enums/AccountStatus.cs b/src/freeclimb/Enums/AccountStatus.cs index f5b0e6aa..5b879c7a 100644 --- a/src/freeclimb/Enums/AccountStatus.cs +++ b/src/freeclimb/Enums/AccountStatus.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -50,8 +50,52 @@ public enum AccountStatus /// Enum ACTIVE for value: active /// [EnumMember(Value = "active")] - ACTIVE = 3 - + ACTIVE = 3, } + /// + /// Converts to and from the JSON value + /// + public static class AccountStatusValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static AccountStatus FromString(string value) + { + if (value.Equals("closed")) + return AccountStatus.CLOSED; + + if (value.Equals("suspended")) + return AccountStatus.SUSPENDED; + + if (value.Equals("active")) + return AccountStatus.ACTIVE; + + throw new NotImplementedException( + $"Could not convert value to type AccountStatus: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static AccountStatus? FromStringOrDefault(string value) + { + if (value.Equals("closed")) + return AccountStatus.CLOSED; + + if (value.Equals("suspended")) + return AccountStatus.SUSPENDED; + + if (value.Equals("active")) + return AccountStatus.ACTIVE; + + return null; + } + } } diff --git a/src/freeclimb/Enums/AccountType.cs b/src/freeclimb/Enums/AccountType.cs index f0db6648..5bb6975c 100644 --- a/src/freeclimb/Enums/AccountType.cs +++ b/src/freeclimb/Enums/AccountType.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -44,8 +44,46 @@ public enum AccountType /// Enum FULL for value: full /// [EnumMember(Value = "full")] - FULL = 2 - + FULL = 2, } + /// + /// Converts to and from the JSON value + /// + public static class AccountTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static AccountType FromString(string value) + { + if (value.Equals("trial")) + return AccountType.TRIAL; + + if (value.Equals("full")) + return AccountType.FULL; + + throw new NotImplementedException( + $"Could not convert value to type AccountType: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static AccountType? FromStringOrDefault(string value) + { + if (value.Equals("trial")) + return AccountType.TRIAL; + + if (value.Equals("full")) + return AccountType.FULL; + + return null; + } + } } diff --git a/src/freeclimb/Enums/AnsweredBy.cs b/src/freeclimb/Enums/AnsweredBy.cs index 426d8185..32f2660a 100644 --- a/src/freeclimb/Enums/AnsweredBy.cs +++ b/src/freeclimb/Enums/AnsweredBy.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -44,8 +44,46 @@ public enum AnsweredBy /// Enum MACHINE for value: machine /// [EnumMember(Value = "machine")] - MACHINE = 2 - + MACHINE = 2, } + /// + /// Converts to and from the JSON value + /// + public static class AnsweredByValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static AnsweredBy FromString(string value) + { + if (value.Equals("human")) + return AnsweredBy.HUMAN; + + if (value.Equals("machine")) + return AnsweredBy.MACHINE; + + throw new NotImplementedException( + $"Could not convert value to type AnsweredBy: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static AnsweredBy? FromStringOrDefault(string value) + { + if (value.Equals("human")) + return AnsweredBy.HUMAN; + + if (value.Equals("machine")) + return AnsweredBy.MACHINE; + + return null; + } + } } diff --git a/src/freeclimb/Enums/BargeInReason.cs b/src/freeclimb/Enums/BargeInReason.cs new file mode 100644 index 00000000..91e567ea --- /dev/null +++ b/src/freeclimb/Enums/BargeInReason.cs @@ -0,0 +1,100 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Enums +{ + /// + /// Defines BargeInReason + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum BargeInReason + { + /// + /// Enum NO_BARGE_IN for value: noBargeIn + /// + [EnumMember(Value = "noBargeIn")] + NO_BARGE_IN = 1, + + /// + /// Enum BARGE_IN_BY_DTMF for value: bargeInByDTMF + /// + [EnumMember(Value = "bargeInByDTMF")] + BARGE_IN_BY_DTMF = 2, + + /// + /// Enum BARGE_IN_BY_ENERGY for value: bargeInByEnergy + /// + [EnumMember(Value = "bargeInByEnergy")] + BARGE_IN_BY_ENERGY = 3, + } + + /// + /// Converts to and from the JSON value + /// + public static class BargeInReasonValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static BargeInReason FromString(string value) + { + if (value.Equals("noBargeIn")) + return BargeInReason.NO_BARGE_IN; + + if (value.Equals("bargeInByDTMF")) + return BargeInReason.BARGE_IN_BY_DTMF; + + if (value.Equals("bargeInByEnergy")) + return BargeInReason.BARGE_IN_BY_ENERGY; + + throw new NotImplementedException( + $"Could not convert value to type BargeInReason: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static BargeInReason? FromStringOrDefault(string value) + { + if (value.Equals("noBargeIn")) + return BargeInReason.NO_BARGE_IN; + + if (value.Equals("bargeInByDTMF")) + return BargeInReason.BARGE_IN_BY_DTMF; + + if (value.Equals("bargeInByEnergy")) + return BargeInReason.BARGE_IN_BY_ENERGY; + + return null; + } + } +} diff --git a/src/freeclimb/Enums/CallDirection.cs b/src/freeclimb/Enums/CallDirection.cs index d64e9cba..5abcb313 100644 --- a/src/freeclimb/Enums/CallDirection.cs +++ b/src/freeclimb/Enums/CallDirection.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -50,8 +50,52 @@ public enum CallDirection /// Enum OUTBOUND_DIAL for value: outboundDial /// [EnumMember(Value = "outboundDial")] - OUTBOUND_DIAL = 3 - + OUTBOUND_DIAL = 3, } + /// + /// Converts to and from the JSON value + /// + public static class CallDirectionValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static CallDirection FromString(string value) + { + if (value.Equals("inbound")) + return CallDirection.INBOUND; + + if (value.Equals("outboundAPI")) + return CallDirection.OUTBOUND_API; + + if (value.Equals("outboundDial")) + return CallDirection.OUTBOUND_DIAL; + + throw new NotImplementedException( + $"Could not convert value to type CallDirection: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static CallDirection? FromStringOrDefault(string value) + { + if (value.Equals("inbound")) + return CallDirection.INBOUND; + + if (value.Equals("outboundAPI")) + return CallDirection.OUTBOUND_API; + + if (value.Equals("outboundDial")) + return CallDirection.OUTBOUND_DIAL; + + return null; + } + } } diff --git a/src/freeclimb/Enums/CallEndedReason.cs b/src/freeclimb/Enums/CallEndedReason.cs new file mode 100644 index 00000000..cc786fa4 --- /dev/null +++ b/src/freeclimb/Enums/CallEndedReason.cs @@ -0,0 +1,341 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Enums +{ + /// + /// Enhanced status for the Call with additional information where available. + /// + /// Enhanced status for the Call with additional information where available. + [JsonConverter(typeof(StringEnumConverter))] + public enum CallEndedReason + { + /// + /// Enum BUSY for value: busy + /// + [EnumMember(Value = "busy")] + BUSY = 1, + + /// + /// Enum FAILED for value: failed + /// + [EnumMember(Value = "failed")] + FAILED = 2, + + /// + /// Enum NO_ANSWER for value: noAnswer + /// + [EnumMember(Value = "noAnswer")] + NO_ANSWER = 3, + + /// + /// Enum CALL_CANCELED for value: callCanceled + /// + [EnumMember(Value = "callCanceled")] + CALL_CANCELED = 4, + + /// + /// Enum FAR_END_HANGUP for value: farEndHangup + /// + [EnumMember(Value = "farEndHangup")] + FAR_END_HANGUP = 5, + + /// + /// Enum APP_HANGUP for value: appHangup + /// + [EnumMember(Value = "appHangup")] + APP_HANGUP = 6, + + /// + /// Enum APP_REJECT for value: appReject + /// + [EnumMember(Value = "appReject")] + APP_REJECT = 7, + + /// + /// Enum APP_NO_PERCL for value: appNoPercl + /// + [EnumMember(Value = "appNoPercl")] + APP_NO_PERCL = 8, + + /// + /// Enum APP_INVALID_PERCL for value: appInvalidPercl + /// + [EnumMember(Value = "appInvalidPercl")] + APP_INVALID_PERCL = 9, + + /// + /// Enum CONFERENCE_TERMINATED for value: conferenceTerminated + /// + [EnumMember(Value = "conferenceTerminated")] + CONFERENCE_TERMINATED = 10, + + /// + /// Enum CONFERENCE_EMPTIED for value: conferenceEmptied + /// + [EnumMember(Value = "conferenceEmptied")] + CONFERENCE_EMPTIED = 11, + + /// + /// Enum REMOVED_FROM_CONFERENCE for value: removedFromConference + /// + [EnumMember(Value = "removedFromConference")] + REMOVED_FROM_CONFERENCE = 12, + + /// + /// Enum MACHINE_DETECTED for value: machineDetected + /// + [EnumMember(Value = "machineDetected")] + MACHINE_DETECTED = 13, + + /// + /// Enum WEBHOOK_FAILED for value: webhookFailed + /// + [EnumMember(Value = "webhookFailed")] + WEBHOOK_FAILED = 14, + + /// + /// Enum WEBHOOK_INVALID_RESPONSE for value: webhookInvalidResponse + /// + [EnumMember(Value = "webhookInvalidResponse")] + WEBHOOK_INVALID_RESPONSE = 15, + + /// + /// Enum VOICE_DISABLED for value: voiceDisabled + /// + [EnumMember(Value = "voiceDisabled")] + VOICE_DISABLED = 16, + + /// + /// Enum CONFIG_ERROR_NO_APPLICATION for value: configErrorNoApplication + /// + [EnumMember(Value = "configErrorNoApplication")] + CONFIG_ERROR_NO_APPLICATION = 17, + + /// + /// Enum CONFIG_ERROR_NO_VOICE_URL for value: configErrorNoVoiceUrl + /// + [EnumMember(Value = "configErrorNoVoiceUrl")] + CONFIG_ERROR_NO_VOICE_URL = 18, + + /// + /// Enum MAX_REDIRECTS_ERROR for value: maxRedirectsError + /// + [EnumMember(Value = "maxRedirectsError")] + MAX_REDIRECTS_ERROR = 19, + + /// + /// Enum PERCL_PROCESSING_ERROR for value: perclProcessingError + /// + [EnumMember(Value = "perclProcessingError")] + PERCL_PROCESSING_ERROR = 20, + + /// + /// Enum INTERNAL_ERROR for value: internalError + /// + [EnumMember(Value = "internalError")] + INTERNAL_ERROR = 21, + + /// + /// Enum GRPC_HANGUP for value: grpcHangup + /// + [EnumMember(Value = "grpcHangup")] + GRPC_HANGUP = 22, + + /// + /// Enum MAX_DURATION for value: maxDuration + /// + [EnumMember(Value = "maxDuration")] + MAX_DURATION = 23, + } + + /// + /// Converts to and from the JSON value + /// + public static class CallEndedReasonValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static CallEndedReason FromString(string value) + { + if (value.Equals("busy")) + return CallEndedReason.BUSY; + + if (value.Equals("failed")) + return CallEndedReason.FAILED; + + if (value.Equals("noAnswer")) + return CallEndedReason.NO_ANSWER; + + if (value.Equals("callCanceled")) + return CallEndedReason.CALL_CANCELED; + + if (value.Equals("farEndHangup")) + return CallEndedReason.FAR_END_HANGUP; + + if (value.Equals("appHangup")) + return CallEndedReason.APP_HANGUP; + + if (value.Equals("appReject")) + return CallEndedReason.APP_REJECT; + + if (value.Equals("appNoPercl")) + return CallEndedReason.APP_NO_PERCL; + + if (value.Equals("appInvalidPercl")) + return CallEndedReason.APP_INVALID_PERCL; + + if (value.Equals("conferenceTerminated")) + return CallEndedReason.CONFERENCE_TERMINATED; + + if (value.Equals("conferenceEmptied")) + return CallEndedReason.CONFERENCE_EMPTIED; + + if (value.Equals("removedFromConference")) + return CallEndedReason.REMOVED_FROM_CONFERENCE; + + if (value.Equals("machineDetected")) + return CallEndedReason.MACHINE_DETECTED; + + if (value.Equals("webhookFailed")) + return CallEndedReason.WEBHOOK_FAILED; + + if (value.Equals("webhookInvalidResponse")) + return CallEndedReason.WEBHOOK_INVALID_RESPONSE; + + if (value.Equals("voiceDisabled")) + return CallEndedReason.VOICE_DISABLED; + + if (value.Equals("configErrorNoApplication")) + return CallEndedReason.CONFIG_ERROR_NO_APPLICATION; + + if (value.Equals("configErrorNoVoiceUrl")) + return CallEndedReason.CONFIG_ERROR_NO_VOICE_URL; + + if (value.Equals("maxRedirectsError")) + return CallEndedReason.MAX_REDIRECTS_ERROR; + + if (value.Equals("perclProcessingError")) + return CallEndedReason.PERCL_PROCESSING_ERROR; + + if (value.Equals("internalError")) + return CallEndedReason.INTERNAL_ERROR; + + if (value.Equals("grpcHangup")) + return CallEndedReason.GRPC_HANGUP; + + if (value.Equals("maxDuration")) + return CallEndedReason.MAX_DURATION; + + throw new NotImplementedException( + $"Could not convert value to type CallEndedReason: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static CallEndedReason? FromStringOrDefault(string value) + { + if (value.Equals("busy")) + return CallEndedReason.BUSY; + + if (value.Equals("failed")) + return CallEndedReason.FAILED; + + if (value.Equals("noAnswer")) + return CallEndedReason.NO_ANSWER; + + if (value.Equals("callCanceled")) + return CallEndedReason.CALL_CANCELED; + + if (value.Equals("farEndHangup")) + return CallEndedReason.FAR_END_HANGUP; + + if (value.Equals("appHangup")) + return CallEndedReason.APP_HANGUP; + + if (value.Equals("appReject")) + return CallEndedReason.APP_REJECT; + + if (value.Equals("appNoPercl")) + return CallEndedReason.APP_NO_PERCL; + + if (value.Equals("appInvalidPercl")) + return CallEndedReason.APP_INVALID_PERCL; + + if (value.Equals("conferenceTerminated")) + return CallEndedReason.CONFERENCE_TERMINATED; + + if (value.Equals("conferenceEmptied")) + return CallEndedReason.CONFERENCE_EMPTIED; + + if (value.Equals("removedFromConference")) + return CallEndedReason.REMOVED_FROM_CONFERENCE; + + if (value.Equals("machineDetected")) + return CallEndedReason.MACHINE_DETECTED; + + if (value.Equals("webhookFailed")) + return CallEndedReason.WEBHOOK_FAILED; + + if (value.Equals("webhookInvalidResponse")) + return CallEndedReason.WEBHOOK_INVALID_RESPONSE; + + if (value.Equals("voiceDisabled")) + return CallEndedReason.VOICE_DISABLED; + + if (value.Equals("configErrorNoApplication")) + return CallEndedReason.CONFIG_ERROR_NO_APPLICATION; + + if (value.Equals("configErrorNoVoiceUrl")) + return CallEndedReason.CONFIG_ERROR_NO_VOICE_URL; + + if (value.Equals("maxRedirectsError")) + return CallEndedReason.MAX_REDIRECTS_ERROR; + + if (value.Equals("perclProcessingError")) + return CallEndedReason.PERCL_PROCESSING_ERROR; + + if (value.Equals("internalError")) + return CallEndedReason.INTERNAL_ERROR; + + if (value.Equals("grpcHangup")) + return CallEndedReason.GRPC_HANGUP; + + if (value.Equals("maxDuration")) + return CallEndedReason.MAX_DURATION; + + return null; + } + } +} diff --git a/src/freeclimb/Enums/CallStatus.cs b/src/freeclimb/Enums/CallStatus.cs index fcceec7c..266814aa 100644 --- a/src/freeclimb/Enums/CallStatus.cs +++ b/src/freeclimb/Enums/CallStatus.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -80,8 +80,82 @@ public enum CallStatus /// Enum NO_ANSWER for value: noAnswer /// [EnumMember(Value = "noAnswer")] - NO_ANSWER = 8 - + NO_ANSWER = 8, } + /// + /// Converts to and from the JSON value + /// + public static class CallStatusValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static CallStatus FromString(string value) + { + if (value.Equals("queued")) + return CallStatus.QUEUED; + + if (value.Equals("ringing")) + return CallStatus.RINGING; + + if (value.Equals("inProgress")) + return CallStatus.IN_PROGRESS; + + if (value.Equals("canceled")) + return CallStatus.CANCELED; + + if (value.Equals("completed")) + return CallStatus.COMPLETED; + + if (value.Equals("failed")) + return CallStatus.FAILED; + + if (value.Equals("busy")) + return CallStatus.BUSY; + + if (value.Equals("noAnswer")) + return CallStatus.NO_ANSWER; + + throw new NotImplementedException( + $"Could not convert value to type CallStatus: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static CallStatus? FromStringOrDefault(string value) + { + if (value.Equals("queued")) + return CallStatus.QUEUED; + + if (value.Equals("ringing")) + return CallStatus.RINGING; + + if (value.Equals("inProgress")) + return CallStatus.IN_PROGRESS; + + if (value.Equals("canceled")) + return CallStatus.CANCELED; + + if (value.Equals("completed")) + return CallStatus.COMPLETED; + + if (value.Equals("failed")) + return CallStatus.FAILED; + + if (value.Equals("busy")) + return CallStatus.BUSY; + + if (value.Equals("noAnswer")) + return CallStatus.NO_ANSWER; + + return null; + } + } } diff --git a/src/freeclimb/Enums/CompletionResultStatus.cs b/src/freeclimb/Enums/CompletionResultStatus.cs new file mode 100644 index 00000000..0fefa790 --- /dev/null +++ b/src/freeclimb/Enums/CompletionResultStatus.cs @@ -0,0 +1,89 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Enums +{ + /// + /// Completion result status. Possible values: success, no_context + /// + /// Completion result status. Possible values: success, no_context + [JsonConverter(typeof(StringEnumConverter))] + public enum CompletionResultStatus + { + /// + /// Enum SUCCESS for value: success + /// + [EnumMember(Value = "success")] + SUCCESS = 1, + + /// + /// Enum NO_CONTEXT for value: no_context + /// + [EnumMember(Value = "no_context")] + NO_CONTEXT = 2, + } + + /// + /// Converts to and from the JSON value + /// + public static class CompletionResultStatusValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static CompletionResultStatus FromString(string value) + { + if (value.Equals("success")) + return CompletionResultStatus.SUCCESS; + + if (value.Equals("no_context")) + return CompletionResultStatus.NO_CONTEXT; + + throw new NotImplementedException( + $"Could not convert value to type CompletionResultStatus: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static CompletionResultStatus? FromStringOrDefault(string value) + { + if (value.Equals("success")) + return CompletionResultStatus.SUCCESS; + + if (value.Equals("no_context")) + return CompletionResultStatus.NO_CONTEXT; + + return null; + } + } +} diff --git a/src/freeclimb/Enums/ConferenceStatus.cs b/src/freeclimb/Enums/ConferenceStatus.cs index 13052795..4eaad676 100644 --- a/src/freeclimb/Enums/ConferenceStatus.cs +++ b/src/freeclimb/Enums/ConferenceStatus.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -56,8 +56,58 @@ public enum ConferenceStatus /// Enum TERMINATED for value: terminated /// [EnumMember(Value = "terminated")] - TERMINATED = 4 - + TERMINATED = 4, } + /// + /// Converts to and from the JSON value + /// + public static class ConferenceStatusValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static ConferenceStatus FromString(string value) + { + if (value.Equals("empty")) + return ConferenceStatus.EMPTY; + + if (value.Equals("populated")) + return ConferenceStatus.POPULATED; + + if (value.Equals("inProgress")) + return ConferenceStatus.IN_PROGRESS; + + if (value.Equals("terminated")) + return ConferenceStatus.TERMINATED; + + throw new NotImplementedException( + $"Could not convert value to type ConferenceStatus: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static ConferenceStatus? FromStringOrDefault(string value) + { + if (value.Equals("empty")) + return ConferenceStatus.EMPTY; + + if (value.Equals("populated")) + return ConferenceStatus.POPULATED; + + if (value.Equals("inProgress")) + return ConferenceStatus.IN_PROGRESS; + + if (value.Equals("terminated")) + return ConferenceStatus.TERMINATED; + + return null; + } + } } diff --git a/src/freeclimb/Enums/Extensions.cs b/src/freeclimb/Enums/Extensions.cs deleted file mode 100644 index b6a91343..00000000 --- a/src/freeclimb/Enums/Extensions.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Linq; -using System.Reflection; -using System.Runtime.Serialization; -using System.ComponentModel; -using System.Runtime.CompilerServices; - -namespace freeclimb.Enums -{ - - public static partial class Extensions - { - public static string GetMemberValue(this Enum @this) - { - FieldInfo fieldInfo = @this.GetType().GetField(@this.ToString()); - if (fieldInfo == null) return null; - var attribute = (EnumMemberAttribute)fieldInfo.GetCustomAttribute(typeof(EnumMemberAttribute)); - return attribute.Value; - } - } -} \ No newline at end of file diff --git a/src/freeclimb/Enums/GetDigitsReason.cs b/src/freeclimb/Enums/GetDigitsReason.cs new file mode 100644 index 00000000..cab794cc --- /dev/null +++ b/src/freeclimb/Enums/GetDigitsReason.cs @@ -0,0 +1,113 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Enums +{ + /// + /// 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. + /// + /// 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. + [JsonConverter(typeof(StringEnumConverter))] + public enum GetDigitsReason + { + /// + /// Enum FINISH_KEY for value: finishKey + /// + [EnumMember(Value = "finishKey")] + FINISH_KEY = 1, + + /// + /// Enum TIMEOUT for value: timeout + /// + [EnumMember(Value = "timeout")] + TIMEOUT = 2, + + /// + /// Enum MAX_DIGITS for value: maxDigits + /// + [EnumMember(Value = "maxDigits")] + MAX_DIGITS = 3, + + /// + /// Enum TONE for value: tone + /// + [EnumMember(Value = "tone")] + TONE = 4, + } + + /// + /// Converts to and from the JSON value + /// + public static class GetDigitsReasonValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static GetDigitsReason FromString(string value) + { + if (value.Equals("finishKey")) + return GetDigitsReason.FINISH_KEY; + + if (value.Equals("timeout")) + return GetDigitsReason.TIMEOUT; + + if (value.Equals("maxDigits")) + return GetDigitsReason.MAX_DIGITS; + + if (value.Equals("tone")) + return GetDigitsReason.TONE; + + throw new NotImplementedException( + $"Could not convert value to type GetDigitsReason: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static GetDigitsReason? FromStringOrDefault(string value) + { + if (value.Equals("finishKey")) + return GetDigitsReason.FINISH_KEY; + + if (value.Equals("timeout")) + return GetDigitsReason.TIMEOUT; + + if (value.Equals("maxDigits")) + return GetDigitsReason.MAX_DIGITS; + + if (value.Equals("tone")) + return GetDigitsReason.TONE; + + return null; + } + } +} diff --git a/src/freeclimb/Enums/GetSpeechReason.cs b/src/freeclimb/Enums/GetSpeechReason.cs index 3777bbef..b1bd0bd7 100644 --- a/src/freeclimb/Enums/GetSpeechReason.cs +++ b/src/freeclimb/Enums/GetSpeechReason.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -67,8 +67,70 @@ public enum GetSpeechReason /// Enum RECOGNITION for value: recognition /// [EnumMember(Value = "recognition")] - RECOGNITION = 6 - + RECOGNITION = 6, } + /// + /// Converts to and from the JSON value + /// + public static class GetSpeechReasonValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static GetSpeechReason FromString(string value) + { + if (value.Equals("error")) + return GetSpeechReason.ERROR; + + if (value.Equals("hangup")) + return GetSpeechReason.HANGUP; + + if (value.Equals("digit")) + return GetSpeechReason.DIGIT; + + if (value.Equals("noInput")) + return GetSpeechReason.NO_INPUT; + + if (value.Equals("noMatch")) + return GetSpeechReason.NO_MATCH; + + if (value.Equals("recognition")) + return GetSpeechReason.RECOGNITION; + + throw new NotImplementedException( + $"Could not convert value to type GetSpeechReason: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static GetSpeechReason? FromStringOrDefault(string value) + { + if (value.Equals("error")) + return GetSpeechReason.ERROR; + + if (value.Equals("hangup")) + return GetSpeechReason.HANGUP; + + if (value.Equals("digit")) + return GetSpeechReason.DIGIT; + + if (value.Equals("noInput")) + return GetSpeechReason.NO_INPUT; + + if (value.Equals("noMatch")) + return GetSpeechReason.NO_MATCH; + + if (value.Equals("recognition")) + return GetSpeechReason.RECOGNITION; + + return null; + } + } } diff --git a/src/freeclimb/Enums/GrammarFileBuiltIn.cs b/src/freeclimb/Enums/GrammarFileBuiltIn.cs index 7be1cea8..972c7cde 100644 --- a/src/freeclimb/Enums/GrammarFileBuiltIn.cs +++ b/src/freeclimb/Enums/GrammarFileBuiltIn.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -121,8 +121,124 @@ public enum GrammarFileBuiltIn /// Enum VERSAY_YESNO for value: VERSAY_YESNO /// [EnumMember(Value = "VERSAY_YESNO")] - VERSAY_YESNO = 15 - + VERSAY_YESNO = 15, } + /// + /// Converts to and from the JSON value + /// + public static class GrammarFileBuiltInValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static GrammarFileBuiltIn FromString(string value) + { + if (value.Equals("ALPHNUM6")) + return GrammarFileBuiltIn.ALPHNUM6; + + if (value.Equals("ANY_DIG")) + return GrammarFileBuiltIn.ANY_DIG; + + if (value.Equals("DIG1")) + return GrammarFileBuiltIn.DIG1; + + if (value.Equals("DIG2")) + return GrammarFileBuiltIn.DIG2; + + if (value.Equals("DIG3")) + return GrammarFileBuiltIn.DIG3; + + if (value.Equals("DIG4")) + return GrammarFileBuiltIn.DIG4; + + if (value.Equals("DIG5")) + return GrammarFileBuiltIn.DIG5; + + if (value.Equals("DIG6")) + return GrammarFileBuiltIn.DIG6; + + if (value.Equals("DIG7")) + return GrammarFileBuiltIn.DIG7; + + if (value.Equals("DIG8")) + return GrammarFileBuiltIn.DIG8; + + if (value.Equals("DIG9")) + return GrammarFileBuiltIn.DIG9; + + if (value.Equals("DIG10")) + return GrammarFileBuiltIn.DIG10; + + if (value.Equals("DIG11")) + return GrammarFileBuiltIn.DIG11; + + if (value.Equals("UP_TO_20_DIGIT_SEQUENCE")) + return GrammarFileBuiltIn.UP_TO_20_DIGIT_SEQUENCE; + + if (value.Equals("VERSAY_YESNO")) + return GrammarFileBuiltIn.VERSAY_YESNO; + + throw new NotImplementedException( + $"Could not convert value to type GrammarFileBuiltIn: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static GrammarFileBuiltIn? FromStringOrDefault(string value) + { + if (value.Equals("ALPHNUM6")) + return GrammarFileBuiltIn.ALPHNUM6; + + if (value.Equals("ANY_DIG")) + return GrammarFileBuiltIn.ANY_DIG; + + if (value.Equals("DIG1")) + return GrammarFileBuiltIn.DIG1; + + if (value.Equals("DIG2")) + return GrammarFileBuiltIn.DIG2; + + if (value.Equals("DIG3")) + return GrammarFileBuiltIn.DIG3; + + if (value.Equals("DIG4")) + return GrammarFileBuiltIn.DIG4; + + if (value.Equals("DIG5")) + return GrammarFileBuiltIn.DIG5; + + if (value.Equals("DIG6")) + return GrammarFileBuiltIn.DIG6; + + if (value.Equals("DIG7")) + return GrammarFileBuiltIn.DIG7; + + if (value.Equals("DIG8")) + return GrammarFileBuiltIn.DIG8; + + if (value.Equals("DIG9")) + return GrammarFileBuiltIn.DIG9; + + if (value.Equals("DIG10")) + return GrammarFileBuiltIn.DIG10; + + if (value.Equals("DIG11")) + return GrammarFileBuiltIn.DIG11; + + if (value.Equals("UP_TO_20_DIGIT_SEQUENCE")) + return GrammarFileBuiltIn.UP_TO_20_DIGIT_SEQUENCE; + + if (value.Equals("VERSAY_YESNO")) + return GrammarFileBuiltIn.VERSAY_YESNO; + + return null; + } + } } diff --git a/src/freeclimb/Enums/GrammarType.cs b/src/freeclimb/Enums/GrammarType.cs index 1f7fa81a..a66186dd 100644 --- a/src/freeclimb/Enums/GrammarType.cs +++ b/src/freeclimb/Enums/GrammarType.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -44,8 +44,46 @@ public enum GrammarType /// Enum BUILT_IN for value: BUILTIN /// [EnumMember(Value = "BUILTIN")] - BUILT_IN = 2 - + BUILT_IN = 2, } + /// + /// Converts to and from the JSON value + /// + public static class GrammarTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static GrammarType FromString(string value) + { + if (value.Equals("URL")) + return GrammarType.URL; + + if (value.Equals("BUILTIN")) + return GrammarType.BUILT_IN; + + throw new NotImplementedException( + $"Could not convert value to type GrammarType: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static GrammarType? FromStringOrDefault(string value) + { + if (value.Equals("URL")) + return GrammarType.URL; + + if (value.Equals("BUILTIN")) + return GrammarType.BUILT_IN; + + return null; + } + } } diff --git a/src/freeclimb/Enums/IfMachine.cs b/src/freeclimb/Enums/IfMachine.cs index 3963cd5c..89669e7c 100644 --- a/src/freeclimb/Enums/IfMachine.cs +++ b/src/freeclimb/Enums/IfMachine.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -44,8 +44,46 @@ public enum IfMachine /// Enum HANGUP for value: hangup /// [EnumMember(Value = "hangup")] - HANGUP = 2 - + HANGUP = 2, } + /// + /// Converts to and from the JSON value + /// + public static class IfMachineValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static IfMachine FromString(string value) + { + if (value.Equals("redirect")) + return IfMachine.REDIRECT; + + if (value.Equals("hangup")) + return IfMachine.HANGUP; + + throw new NotImplementedException( + $"Could not convert value to type IfMachine: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static IfMachine? FromStringOrDefault(string value) + { + if (value.Equals("redirect")) + return IfMachine.REDIRECT; + + if (value.Equals("hangup")) + return IfMachine.HANGUP; + + return null; + } + } } diff --git a/src/freeclimb/Enums/Language.cs b/src/freeclimb/Enums/Language.cs index 13e0163b..255b5072 100644 --- a/src/freeclimb/Enums/Language.cs +++ b/src/freeclimb/Enums/Language.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -187,8 +187,190 @@ public enum Language /// Enum CHINESE_TW for value: zh-TW /// [EnumMember(Value = "zh-TW")] - CHINESE_TW = 26 - + CHINESE_TW = 26, } + /// + /// Converts to and from the JSON value + /// + public static class LanguageValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static Language FromString(string value) + { + if (value.Equals("ca-ES")) + return Language.CATALAN; + + if (value.Equals("da-DK")) + return Language.DANISH; + + if (value.Equals("de-DE")) + return Language.GERMAN; + + if (value.Equals("en-AU")) + return Language.ENGLISH_AU; + + if (value.Equals("en-CA")) + return Language.ENGLISH_CA; + + if (value.Equals("en-GB")) + return Language.ENGLISH_UK; + + if (value.Equals("en-IN")) + return Language.ENGLISH_IN; + + if (value.Equals("en-US")) + return Language.ENGLISH_US; + + if (value.Equals("es-ES")) + return Language.ENGLISH_ES; + + if (value.Equals("es-MX")) + return Language.ENGLISH_MX; + + if (value.Equals("fi-FI")) + return Language.FINNISH; + + if (value.Equals("fr-CA")) + return Language.FRENCH_CA; + + if (value.Equals("fr-FR")) + return Language.FRENCH_FR; + + if (value.Equals("it-IT")) + return Language.ITALIAN; + + if (value.Equals("ja-JP")) + return Language.JAPANESE; + + if (value.Equals("ko-KR")) + return Language.KOREAN; + + if (value.Equals("nb-NO")) + return Language.NORWEGIAN; + + if (value.Equals("nl-NL")) + return Language.DUTCH; + + if (value.Equals("pl-PL")) + return Language.POLISH; + + if (value.Equals("pt-BR")) + return Language.PORTUGESE_BR; + + if (value.Equals("pt-PT")) + return Language.PORTUGESE_PT; + + if (value.Equals("ru-RU")) + return Language.RUSSIAN; + + if (value.Equals("sv-SE")) + return Language.SWEDISH; + + if (value.Equals("zh-CN")) + return Language.CHINESE_CN; + + if (value.Equals("zh-HK")) + return Language.CHINESE_HK; + + if (value.Equals("zh-TW")) + return Language.CHINESE_TW; + + throw new NotImplementedException( + $"Could not convert value to type Language: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static Language? FromStringOrDefault(string value) + { + if (value.Equals("ca-ES")) + return Language.CATALAN; + + if (value.Equals("da-DK")) + return Language.DANISH; + + if (value.Equals("de-DE")) + return Language.GERMAN; + + if (value.Equals("en-AU")) + return Language.ENGLISH_AU; + + if (value.Equals("en-CA")) + return Language.ENGLISH_CA; + + if (value.Equals("en-GB")) + return Language.ENGLISH_UK; + + if (value.Equals("en-IN")) + return Language.ENGLISH_IN; + + if (value.Equals("en-US")) + return Language.ENGLISH_US; + + if (value.Equals("es-ES")) + return Language.ENGLISH_ES; + + if (value.Equals("es-MX")) + return Language.ENGLISH_MX; + + if (value.Equals("fi-FI")) + return Language.FINNISH; + + if (value.Equals("fr-CA")) + return Language.FRENCH_CA; + + if (value.Equals("fr-FR")) + return Language.FRENCH_FR; + + if (value.Equals("it-IT")) + return Language.ITALIAN; + + if (value.Equals("ja-JP")) + return Language.JAPANESE; + + if (value.Equals("ko-KR")) + return Language.KOREAN; + + if (value.Equals("nb-NO")) + return Language.NORWEGIAN; + + if (value.Equals("nl-NL")) + return Language.DUTCH; + + if (value.Equals("pl-PL")) + return Language.POLISH; + + if (value.Equals("pt-BR")) + return Language.PORTUGESE_BR; + + if (value.Equals("pt-PT")) + return Language.PORTUGESE_PT; + + if (value.Equals("ru-RU")) + return Language.RUSSIAN; + + if (value.Equals("sv-SE")) + return Language.SWEDISH; + + if (value.Equals("zh-CN")) + return Language.CHINESE_CN; + + if (value.Equals("zh-HK")) + return Language.CHINESE_HK; + + if (value.Equals("zh-TW")) + return Language.CHINESE_TW; + + return null; + } + } } diff --git a/src/freeclimb/Enums/LogLevel.cs b/src/freeclimb/Enums/LogLevel.cs index cab0a5e5..e2c658b4 100644 --- a/src/freeclimb/Enums/LogLevel.cs +++ b/src/freeclimb/Enums/LogLevel.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -50,8 +50,52 @@ public enum LogLevel /// Enum ERROR for value: error /// [EnumMember(Value = "error")] - ERROR = 3 - + ERROR = 3, } + /// + /// Converts to and from the JSON value + /// + public static class LogLevelValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static LogLevel FromString(string value) + { + if (value.Equals("info")) + return LogLevel.INFO; + + if (value.Equals("warning")) + return LogLevel.WARNING; + + if (value.Equals("error")) + return LogLevel.ERROR; + + throw new NotImplementedException( + $"Could not convert value to type LogLevel: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static LogLevel? FromStringOrDefault(string value) + { + if (value.Equals("info")) + return LogLevel.INFO; + + if (value.Equals("warning")) + return LogLevel.WARNING; + + if (value.Equals("error")) + return LogLevel.ERROR; + + return null; + } + } } diff --git a/src/freeclimb/Enums/MachineType.cs b/src/freeclimb/Enums/MachineType.cs index 8c93b9a1..800fd963 100644 --- a/src/freeclimb/Enums/MachineType.cs +++ b/src/freeclimb/Enums/MachineType.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -34,17 +34,55 @@ namespace freeclimb.Enums public enum MachineType { /// - /// Enum ANSWERING_MACHINE for value: answeringMachine + /// Enum ANSWERING_MACHINE for value: answering machine /// - [EnumMember(Value = "answeringMachine")] + [EnumMember(Value = "answering machine")] ANSWERING_MACHINE = 1, /// - /// Enum FAX_MACHINE for value: faxMachine + /// Enum FAX_MODEM for value: fax modem /// - [EnumMember(Value = "faxMachine")] - FAX_MACHINE = 2 - + [EnumMember(Value = "fax modem")] + FAX_MODEM = 2, } + /// + /// Converts to and from the JSON value + /// + public static class MachineTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static MachineType FromString(string value) + { + if (value.Equals("answering machine")) + return MachineType.ANSWERING_MACHINE; + + if (value.Equals("fax modem")) + return MachineType.FAX_MODEM; + + throw new NotImplementedException( + $"Could not convert value to type MachineType: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static MachineType? FromStringOrDefault(string value) + { + if (value.Equals("answering machine")) + return MachineType.ANSWERING_MACHINE; + + if (value.Equals("fax modem")) + return MachineType.FAX_MODEM; + + return null; + } + } } diff --git a/src/freeclimb/Enums/MessageDirection.cs b/src/freeclimb/Enums/MessageDirection.cs index 6eabb1fe..e3b85f38 100644 --- a/src/freeclimb/Enums/MessageDirection.cs +++ b/src/freeclimb/Enums/MessageDirection.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -43,8 +43,46 @@ public enum MessageDirection /// Enum OUTBOUND for value: outbound /// [EnumMember(Value = "outbound")] - OUTBOUND = 2 - + OUTBOUND = 2, } + /// + /// Converts to and from the JSON value + /// + public static class MessageDirectionValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static MessageDirection FromString(string value) + { + if (value.Equals("inbound")) + return MessageDirection.INBOUND; + + if (value.Equals("outbound")) + return MessageDirection.OUTBOUND; + + throw new NotImplementedException( + $"Could not convert value to type MessageDirection: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static MessageDirection? FromStringOrDefault(string value) + { + if (value.Equals("inbound")) + return MessageDirection.INBOUND; + + if (value.Equals("outbound")) + return MessageDirection.OUTBOUND; + + return null; + } + } } diff --git a/src/freeclimb/Enums/MessageStatus.cs b/src/freeclimb/Enums/MessageStatus.cs index b2745902..4411192d 100644 --- a/src/freeclimb/Enums/MessageStatus.cs +++ b/src/freeclimb/Enums/MessageStatus.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -98,8 +98,100 @@ public enum MessageStatus /// Enum UNKNOWN for value: unknown /// [EnumMember(Value = "unknown")] - UNKNOWN = 11 - + UNKNOWN = 11, } + /// + /// Converts to and from the JSON value + /// + public static class MessageStatusValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static MessageStatus FromString(string value) + { + if (value.Equals("new")) + return MessageStatus.NEW; + + if (value.Equals("queued")) + return MessageStatus.QUEUED; + + if (value.Equals("rejected")) + return MessageStatus.REJECTED; + + if (value.Equals("sending")) + return MessageStatus.SENDING; + + if (value.Equals("sent")) + return MessageStatus.SENT; + + if (value.Equals("failed")) + return MessageStatus.FAILED; + + if (value.Equals("received")) + return MessageStatus.RECEIVED; + + if (value.Equals("undelivered")) + return MessageStatus.UNDELIVERED; + + if (value.Equals("expired")) + return MessageStatus.EXPIRED; + + if (value.Equals("deleted")) + return MessageStatus.DELETED; + + if (value.Equals("unknown")) + return MessageStatus.UNKNOWN; + + throw new NotImplementedException( + $"Could not convert value to type MessageStatus: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static MessageStatus? FromStringOrDefault(string value) + { + if (value.Equals("new")) + return MessageStatus.NEW; + + if (value.Equals("queued")) + return MessageStatus.QUEUED; + + if (value.Equals("rejected")) + return MessageStatus.REJECTED; + + if (value.Equals("sending")) + return MessageStatus.SENDING; + + if (value.Equals("sent")) + return MessageStatus.SENT; + + if (value.Equals("failed")) + return MessageStatus.FAILED; + + if (value.Equals("received")) + return MessageStatus.RECEIVED; + + if (value.Equals("undelivered")) + return MessageStatus.UNDELIVERED; + + if (value.Equals("expired")) + return MessageStatus.EXPIRED; + + if (value.Equals("deleted")) + return MessageStatus.DELETED; + + if (value.Equals("unknown")) + return MessageStatus.UNKNOWN; + + return null; + } + } } diff --git a/src/freeclimb/Enums/PlayBeep.cs b/src/freeclimb/Enums/PlayBeep.cs index 2236086f..93a48ba6 100644 --- a/src/freeclimb/Enums/PlayBeep.cs +++ b/src/freeclimb/Enums/PlayBeep.cs @@ -13,22 +13,22 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { /// - /// 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` + /// 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` /// /// 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` [JsonConverter(typeof(StringEnumConverter))] @@ -56,8 +56,58 @@ public enum PlayBeep /// Enum EXIT_ONLY for value: exitOnly /// [EnumMember(Value = "exitOnly")] - EXIT_ONLY = 4 - + EXIT_ONLY = 4, } + /// + /// Converts to and from the JSON value + /// + public static class PlayBeepValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static PlayBeep FromString(string value) + { + if (value.Equals("always")) + return PlayBeep.ALWAYS; + + if (value.Equals("never")) + return PlayBeep.NEVER; + + if (value.Equals("entryOnly")) + return PlayBeep.ENTRY_ONLY; + + if (value.Equals("exitOnly")) + return PlayBeep.EXIT_ONLY; + + throw new NotImplementedException( + $"Could not convert value to type PlayBeep: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static PlayBeep? FromStringOrDefault(string value) + { + if (value.Equals("always")) + return PlayBeep.ALWAYS; + + if (value.Equals("never")) + return PlayBeep.NEVER; + + if (value.Equals("entryOnly")) + return PlayBeep.ENTRY_ONLY; + + if (value.Equals("exitOnly")) + return PlayBeep.EXIT_ONLY; + + return null; + } + } } diff --git a/src/freeclimb/Enums/QueueResultStatus.cs b/src/freeclimb/Enums/QueueResultStatus.cs index c4e170f2..4a20a524 100644 --- a/src/freeclimb/Enums/QueueResultStatus.cs +++ b/src/freeclimb/Enums/QueueResultStatus.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -55,8 +55,58 @@ public enum QueueResultStatus /// Enum SYSTEM_ERROR for value: systemError /// [EnumMember(Value = "systemError")] - SYSTEM_ERROR = 4 - + SYSTEM_ERROR = 4, } + /// + /// Converts to and from the JSON value + /// + public static class QueueResultStatusValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static QueueResultStatus FromString(string value) + { + if (value.Equals("queueFull")) + return QueueResultStatus.QUEUE_FULL; + + if (value.Equals("dequeued")) + return QueueResultStatus.DEQUEUED; + + if (value.Equals("hangup")) + return QueueResultStatus.HANGUP; + + if (value.Equals("systemError")) + return QueueResultStatus.SYSTEM_ERROR; + + throw new NotImplementedException( + $"Could not convert value to type QueueResultStatus: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static QueueResultStatus? FromStringOrDefault(string value) + { + if (value.Equals("queueFull")) + return QueueResultStatus.QUEUE_FULL; + + if (value.Equals("dequeued")) + return QueueResultStatus.DEQUEUED; + + if (value.Equals("hangup")) + return QueueResultStatus.HANGUP; + + if (value.Equals("systemError")) + return QueueResultStatus.SYSTEM_ERROR; + + return null; + } + } } diff --git a/src/freeclimb/Enums/RecordUtteranceTermReason.cs b/src/freeclimb/Enums/RecordUtteranceTermReason.cs index a9b4e5bc..df617fce 100644 --- a/src/freeclimb/Enums/RecordUtteranceTermReason.cs +++ b/src/freeclimb/Enums/RecordUtteranceTermReason.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -55,8 +55,58 @@ public enum RecordUtteranceTermReason /// Enum MAX_LENGTH for value: maxLength /// [EnumMember(Value = "maxLength")] - MAX_LENGTH = 4 - + MAX_LENGTH = 4, } + /// + /// Converts to and from the JSON value + /// + public static class RecordUtteranceTermReasonValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RecordUtteranceTermReason FromString(string value) + { + if (value.Equals("finishKey")) + return RecordUtteranceTermReason.FINISH_KEY; + + if (value.Equals("timeout")) + return RecordUtteranceTermReason.TIMEOUT; + + if (value.Equals("hangup")) + return RecordUtteranceTermReason.HANGUP; + + if (value.Equals("maxLength")) + return RecordUtteranceTermReason.MAX_LENGTH; + + throw new NotImplementedException( + $"Could not convert value to type RecordUtteranceTermReason: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RecordUtteranceTermReason? FromStringOrDefault(string value) + { + if (value.Equals("finishKey")) + return RecordUtteranceTermReason.FINISH_KEY; + + if (value.Equals("timeout")) + return RecordUtteranceTermReason.TIMEOUT; + + if (value.Equals("hangup")) + return RecordUtteranceTermReason.HANGUP; + + if (value.Equals("maxLength")) + return RecordUtteranceTermReason.MAX_LENGTH; + + return null; + } + } } diff --git a/src/freeclimb/Enums/Reflection.cs b/src/freeclimb/Enums/Reflection.cs deleted file mode 100644 index 0f7fd69f..00000000 --- a/src/freeclimb/Enums/Reflection.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System; -using System.Linq; -using System.Reflection; -using System.Runtime.Serialization; -using System.ComponentModel; -using System.Runtime.CompilerServices; - -namespace freeclimb.Enums -{ - - public static class Reflection - { - /// - /// Retrieves an enum item from a specified string by matching the string to the EnumMemberAttribute - /// elements assigned to each enum item - /// - /// The enum type that should be returned - /// The value that should be searched - /// Whether string comparison of values should be case-sensitive or not - /// The matched enum item - /// Thrown if no enum item could be found with the corresponding value - public static TEnum GetEnumByValue(String value, Boolean ignoreCase = false) - // Add a condition to the generic type - where TEnum : Enum - { - // Loop through all the items in the specified enum - foreach (var item in typeof(TEnum).GetFields()) - { - // Check to see if the enum item has a value attribute - if (Attribute.GetCustomAttribute(item, typeof(EnumMemberAttribute)) is - EnumMemberAttribute attribute) - { - // If the enum item has a value attribute, then check if - // the value matches the given value parameter - if (string.Equals(attribute.Value, value, - ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal)) - return (TEnum)item.GetValue(null); - } - } - - // If no enum item was found with the specified value , throw an - // exception - throw new ArgumentException($"Enum item with value \"{value}\" could not be found", - nameof(value)); - } - - /// - /// Tries to retrieve an enum item from the specified string by matching the string to the EnumMemberAttribute - /// elements assigned to each enum item - /// - /// The enum type that should be retrieved - /// The value that should be searched - /// Whether string comparison of values should be case-sensitive or not - /// The matched enum item if it was found - /// Whether or not the enum item was found or not - public static bool TryGetEnumByValue(String value, Boolean ignoreCase, out TEnum result) - where TEnum : Enum - { - try - { - // We try to get the enum using our original method - result = GetEnumByValue(value, ignoreCase); - return true; - } - catch (ArgumentException) - { - // If we cannot retrieve the enum item, set it to the default and - // return false - result = default(TEnum); - return false; - } - } - - /// - /// Tries to retrieve an enum item from the specified string by matching the string to the EnumMemberAttribute - /// elements assigned to each enum item - /// - /// The enum type that should be retrieved - /// The value that should be searched - /// The matched enum item if it was found - /// Whether or not the enum item was found or not - public static bool TryGetEnumByValue(String value, out TEnum result) - where TEnum : Enum - { - return TryGetEnumByValue(value, false, out result); - } - } - -} \ No newline at end of file diff --git a/src/freeclimb/Enums/RequestType.cs b/src/freeclimb/Enums/RequestType.cs index 0a5642d6..9a0d2387 100644 --- a/src/freeclimb/Enums/RequestType.cs +++ b/src/freeclimb/Enums/RequestType.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -169,8 +169,172 @@ public enum RequestType /// Enum MESSAGE_STATUS for value: messageStatus /// [EnumMember(Value = "messageStatus")] - MESSAGE_STATUS = 23 - + MESSAGE_STATUS = 23, } + /// + /// Converts to and from the JSON value + /// + public static class RequestTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RequestType FromString(string value) + { + if (value.Equals("inboundCall")) + return RequestType.INBOUND_CALL; + + if (value.Equals("record")) + return RequestType.RECORD; + + if (value.Equals("getDigits")) + return RequestType.GET_DIGITS; + + if (value.Equals("getSpeech")) + return RequestType.GET_SPEECH; + + if (value.Equals("redirect")) + return RequestType.REDIRECT; + + if (value.Equals("pause")) + return RequestType.PAUSE; + + if (value.Equals("outDialStart")) + return RequestType.OUT_DIAL_START; + + if (value.Equals("outDialConnect")) + return RequestType.OUT_DIAL_CONNECT; + + if (value.Equals("outDialApiConnect")) + return RequestType.OUT_DIAL_API_CONNECT; + + if (value.Equals("machineDetected")) + return RequestType.MACHINE_DETECTED; + + if (value.Equals("dequeue")) + return RequestType.DEQUEUE; + + if (value.Equals("queueWait")) + return RequestType.QUEUE_WAIT; + + if (value.Equals("addToQueueNotification")) + return RequestType.ADD_TO_QUEUE_NOTIFICATION; + + if (value.Equals("removeFromQueueNotification")) + return RequestType.REMOVE_FROM_QUEUE_NOTIFICATION; + + if (value.Equals("callStatus")) + return RequestType.CALL_STATUS; + + if (value.Equals("createConference")) + return RequestType.CREATE_CONFERENCE; + + if (value.Equals("conferenceStatus")) + return RequestType.CONFERENCE_STATUS; + + if (value.Equals("leaveConference")) + return RequestType.LEAVE_CONFERENCE; + + if (value.Equals("addToConferenceNotification")) + return RequestType.ADD_TO_CONFERENCE_NOTIFICATION; + + if (value.Equals("conferenceRecordingStatus")) + return RequestType.CONFERENCE_RECORDING_STATUS; + + if (value.Equals("conferenceCallControl")) + return RequestType.CONFERENCE_CALL_CONTROL; + + if (value.Equals("messageDelivery")) + return RequestType.MESSAGE_DELIVERY; + + if (value.Equals("messageStatus")) + return RequestType.MESSAGE_STATUS; + + throw new NotImplementedException( + $"Could not convert value to type RequestType: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RequestType? FromStringOrDefault(string value) + { + if (value.Equals("inboundCall")) + return RequestType.INBOUND_CALL; + + if (value.Equals("record")) + return RequestType.RECORD; + + if (value.Equals("getDigits")) + return RequestType.GET_DIGITS; + + if (value.Equals("getSpeech")) + return RequestType.GET_SPEECH; + + if (value.Equals("redirect")) + return RequestType.REDIRECT; + + if (value.Equals("pause")) + return RequestType.PAUSE; + + if (value.Equals("outDialStart")) + return RequestType.OUT_DIAL_START; + + if (value.Equals("outDialConnect")) + return RequestType.OUT_DIAL_CONNECT; + + if (value.Equals("outDialApiConnect")) + return RequestType.OUT_DIAL_API_CONNECT; + + if (value.Equals("machineDetected")) + return RequestType.MACHINE_DETECTED; + + if (value.Equals("dequeue")) + return RequestType.DEQUEUE; + + if (value.Equals("queueWait")) + return RequestType.QUEUE_WAIT; + + if (value.Equals("addToQueueNotification")) + return RequestType.ADD_TO_QUEUE_NOTIFICATION; + + if (value.Equals("removeFromQueueNotification")) + return RequestType.REMOVE_FROM_QUEUE_NOTIFICATION; + + if (value.Equals("callStatus")) + return RequestType.CALL_STATUS; + + if (value.Equals("createConference")) + return RequestType.CREATE_CONFERENCE; + + if (value.Equals("conferenceStatus")) + return RequestType.CONFERENCE_STATUS; + + if (value.Equals("leaveConference")) + return RequestType.LEAVE_CONFERENCE; + + if (value.Equals("addToConferenceNotification")) + return RequestType.ADD_TO_CONFERENCE_NOTIFICATION; + + if (value.Equals("conferenceRecordingStatus")) + return RequestType.CONFERENCE_RECORDING_STATUS; + + if (value.Equals("conferenceCallControl")) + return RequestType.CONFERENCE_CALL_CONTROL; + + if (value.Equals("messageDelivery")) + return RequestType.MESSAGE_DELIVERY; + + if (value.Equals("messageStatus")) + return RequestType.MESSAGE_STATUS; + + return null; + } + } } diff --git a/src/freeclimb/Enums/SMSTenDLCBrandAltBusinessIdType.cs b/src/freeclimb/Enums/SMSTenDLCBrandAltBusinessIdType.cs new file mode 100644 index 00000000..30dfd84f --- /dev/null +++ b/src/freeclimb/Enums/SMSTenDLCBrandAltBusinessIdType.cs @@ -0,0 +1,113 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Enums +{ + /// + /// The type of the Alternative business identifier + /// + /// The type of the Alternative business identifier + [JsonConverter(typeof(StringEnumConverter))] + public enum SMSTenDLCBrandAltBusinessIdType + { + /// + /// Enum NONE for value: NONE + /// + [EnumMember(Value = "NONE")] + NONE = 1, + + /// + /// Enum DUNS for value: DUNS + /// + [EnumMember(Value = "DUNS")] + DUNS = 2, + + /// + /// Enum GIIN for value: GIIN + /// + [EnumMember(Value = "GIIN")] + GIIN = 3, + + /// + /// Enum LEI for value: LEI + /// + [EnumMember(Value = "LEI")] + LEI = 4, + } + + /// + /// Converts to and from the JSON value + /// + public static class SMSTenDLCBrandAltBusinessIdTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static SMSTenDLCBrandAltBusinessIdType FromString(string value) + { + if (value.Equals("NONE")) + return SMSTenDLCBrandAltBusinessIdType.NONE; + + if (value.Equals("DUNS")) + return SMSTenDLCBrandAltBusinessIdType.DUNS; + + if (value.Equals("GIIN")) + return SMSTenDLCBrandAltBusinessIdType.GIIN; + + if (value.Equals("LEI")) + return SMSTenDLCBrandAltBusinessIdType.LEI; + + throw new NotImplementedException( + $"Could not convert value to type SMSTenDLCBrandAltBusinessIdType: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static SMSTenDLCBrandAltBusinessIdType? FromStringOrDefault(string value) + { + if (value.Equals("NONE")) + return SMSTenDLCBrandAltBusinessIdType.NONE; + + if (value.Equals("DUNS")) + return SMSTenDLCBrandAltBusinessIdType.DUNS; + + if (value.Equals("GIIN")) + return SMSTenDLCBrandAltBusinessIdType.GIIN; + + if (value.Equals("LEI")) + return SMSTenDLCBrandAltBusinessIdType.LEI; + + return null; + } + } +} diff --git a/src/freeclimb/Enums/SMSTenDLCBrandEntityType.cs b/src/freeclimb/Enums/SMSTenDLCBrandEntityType.cs new file mode 100644 index 00000000..30972122 --- /dev/null +++ b/src/freeclimb/Enums/SMSTenDLCBrandEntityType.cs @@ -0,0 +1,125 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Enums +{ + /// + /// Entity type behind the brand. This is the form of business establishment. + /// + /// Entity type behind the brand. This is the form of business establishment. + [JsonConverter(typeof(StringEnumConverter))] + public enum SMSTenDLCBrandEntityType + { + /// + /// Enum PRIVATE_PROFIT for value: PRIVATE_PROFIT + /// + [EnumMember(Value = "PRIVATE_PROFIT")] + PRIVATE_PROFIT = 1, + + /// + /// Enum PUBLIC_PROFIT for value: PUBLIC_PROFIT + /// + [EnumMember(Value = "PUBLIC_PROFIT")] + PUBLIC_PROFIT = 2, + + /// + /// Enum NON_PROFIT for value: NON_PROFIT + /// + [EnumMember(Value = "NON_PROFIT")] + NON_PROFIT = 3, + + /// + /// Enum GOVERNMENT for value: GOVERNMENT + /// + [EnumMember(Value = "GOVERNMENT")] + GOVERNMENT = 4, + + /// + /// Enum SOLE_PROPRIETOR for value: SOLE_PROPRIETOR + /// + [EnumMember(Value = "SOLE_PROPRIETOR")] + SOLE_PROPRIETOR = 5, + } + + /// + /// Converts to and from the JSON value + /// + public static class SMSTenDLCBrandEntityTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static SMSTenDLCBrandEntityType FromString(string value) + { + if (value.Equals("PRIVATE_PROFIT")) + return SMSTenDLCBrandEntityType.PRIVATE_PROFIT; + + if (value.Equals("PUBLIC_PROFIT")) + return SMSTenDLCBrandEntityType.PUBLIC_PROFIT; + + if (value.Equals("NON_PROFIT")) + return SMSTenDLCBrandEntityType.NON_PROFIT; + + if (value.Equals("GOVERNMENT")) + return SMSTenDLCBrandEntityType.GOVERNMENT; + + if (value.Equals("SOLE_PROPRIETOR")) + return SMSTenDLCBrandEntityType.SOLE_PROPRIETOR; + + throw new NotImplementedException( + $"Could not convert value to type SMSTenDLCBrandEntityType: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static SMSTenDLCBrandEntityType? FromStringOrDefault(string value) + { + if (value.Equals("PRIVATE_PROFIT")) + return SMSTenDLCBrandEntityType.PRIVATE_PROFIT; + + if (value.Equals("PUBLIC_PROFIT")) + return SMSTenDLCBrandEntityType.PUBLIC_PROFIT; + + if (value.Equals("NON_PROFIT")) + return SMSTenDLCBrandEntityType.NON_PROFIT; + + if (value.Equals("GOVERNMENT")) + return SMSTenDLCBrandEntityType.GOVERNMENT; + + if (value.Equals("SOLE_PROPRIETOR")) + return SMSTenDLCBrandEntityType.SOLE_PROPRIETOR; + + return null; + } + } +} diff --git a/src/freeclimb/Enums/SMSTenDLCBrandIdentityStatus.cs b/src/freeclimb/Enums/SMSTenDLCBrandIdentityStatus.cs new file mode 100644 index 00000000..d840e8a8 --- /dev/null +++ b/src/freeclimb/Enums/SMSTenDLCBrandIdentityStatus.cs @@ -0,0 +1,113 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Enums +{ + /// + /// TCR assessment of the brand identification status. + /// + /// TCR assessment of the brand identification status. + [JsonConverter(typeof(StringEnumConverter))] + public enum SMSTenDLCBrandIdentityStatus + { + /// + /// Enum SELF_DECLARED for value: SELF_DECLARED + /// + [EnumMember(Value = "SELF_DECLARED")] + SELF_DECLARED = 1, + + /// + /// Enum UNVERIFIED for value: UNVERIFIED + /// + [EnumMember(Value = "UNVERIFIED")] + UNVERIFIED = 2, + + /// + /// Enum VERIFIED for value: VERIFIED + /// + [EnumMember(Value = "VERIFIED")] + VERIFIED = 3, + + /// + /// Enum VETTED_VERIFIED for value: VETTED_VERIFIED + /// + [EnumMember(Value = "VETTED_VERIFIED")] + VETTED_VERIFIED = 4, + } + + /// + /// Converts to and from the JSON value + /// + public static class SMSTenDLCBrandIdentityStatusValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static SMSTenDLCBrandIdentityStatus FromString(string value) + { + if (value.Equals("SELF_DECLARED")) + return SMSTenDLCBrandIdentityStatus.SELF_DECLARED; + + if (value.Equals("UNVERIFIED")) + return SMSTenDLCBrandIdentityStatus.UNVERIFIED; + + if (value.Equals("VERIFIED")) + return SMSTenDLCBrandIdentityStatus.VERIFIED; + + if (value.Equals("VETTED_VERIFIED")) + return SMSTenDLCBrandIdentityStatus.VETTED_VERIFIED; + + throw new NotImplementedException( + $"Could not convert value to type SMSTenDLCBrandIdentityStatus: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static SMSTenDLCBrandIdentityStatus? FromStringOrDefault(string value) + { + if (value.Equals("SELF_DECLARED")) + return SMSTenDLCBrandIdentityStatus.SELF_DECLARED; + + if (value.Equals("UNVERIFIED")) + return SMSTenDLCBrandIdentityStatus.UNVERIFIED; + + if (value.Equals("VERIFIED")) + return SMSTenDLCBrandIdentityStatus.VERIFIED; + + if (value.Equals("VETTED_VERIFIED")) + return SMSTenDLCBrandIdentityStatus.VETTED_VERIFIED; + + return null; + } + } +} diff --git a/src/freeclimb/Enums/SMSTenDLCBrandRelationship.cs b/src/freeclimb/Enums/SMSTenDLCBrandRelationship.cs new file mode 100644 index 00000000..fa606901 --- /dev/null +++ b/src/freeclimb/Enums/SMSTenDLCBrandRelationship.cs @@ -0,0 +1,125 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Enums +{ + /// + /// Brand relationship to the CSP + /// + /// Brand relationship to the CSP + [JsonConverter(typeof(StringEnumConverter))] + public enum SMSTenDLCBrandRelationship + { + /// + /// Enum BASIC_ACCOUNT for value: BASIC_ACCOUNT + /// + [EnumMember(Value = "BASIC_ACCOUNT")] + BASIC_ACCOUNT = 1, + + /// + /// Enum SMALL_ACCOUNT for value: SMALL_ACCOUNT + /// + [EnumMember(Value = "SMALL_ACCOUNT")] + SMALL_ACCOUNT = 2, + + /// + /// Enum MEDIUM_ACCOUNT for value: MEDIUM_ACCOUNT + /// + [EnumMember(Value = "MEDIUM_ACCOUNT")] + MEDIUM_ACCOUNT = 3, + + /// + /// Enum LARGE_ACCOUNT for value: LARGE_ACCOUNT + /// + [EnumMember(Value = "LARGE_ACCOUNT")] + LARGE_ACCOUNT = 4, + + /// + /// Enum KEY_ACCOUNT for value: KEY_ACCOUNT + /// + [EnumMember(Value = "KEY_ACCOUNT")] + KEY_ACCOUNT = 5, + } + + /// + /// Converts to and from the JSON value + /// + public static class SMSTenDLCBrandRelationshipValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static SMSTenDLCBrandRelationship FromString(string value) + { + if (value.Equals("BASIC_ACCOUNT")) + return SMSTenDLCBrandRelationship.BASIC_ACCOUNT; + + if (value.Equals("SMALL_ACCOUNT")) + return SMSTenDLCBrandRelationship.SMALL_ACCOUNT; + + if (value.Equals("MEDIUM_ACCOUNT")) + return SMSTenDLCBrandRelationship.MEDIUM_ACCOUNT; + + if (value.Equals("LARGE_ACCOUNT")) + return SMSTenDLCBrandRelationship.LARGE_ACCOUNT; + + if (value.Equals("KEY_ACCOUNT")) + return SMSTenDLCBrandRelationship.KEY_ACCOUNT; + + throw new NotImplementedException( + $"Could not convert value to type SMSTenDLCBrandRelationship: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static SMSTenDLCBrandRelationship? FromStringOrDefault(string value) + { + if (value.Equals("BASIC_ACCOUNT")) + return SMSTenDLCBrandRelationship.BASIC_ACCOUNT; + + if (value.Equals("SMALL_ACCOUNT")) + return SMSTenDLCBrandRelationship.SMALL_ACCOUNT; + + if (value.Equals("MEDIUM_ACCOUNT")) + return SMSTenDLCBrandRelationship.MEDIUM_ACCOUNT; + + if (value.Equals("LARGE_ACCOUNT")) + return SMSTenDLCBrandRelationship.LARGE_ACCOUNT; + + if (value.Equals("KEY_ACCOUNT")) + return SMSTenDLCBrandRelationship.KEY_ACCOUNT; + + return null; + } + } +} diff --git a/src/freeclimb/Enums/SMSTenDLCBrandStockExchange.cs b/src/freeclimb/Enums/SMSTenDLCBrandStockExchange.cs new file mode 100644 index 00000000..183f6cc7 --- /dev/null +++ b/src/freeclimb/Enums/SMSTenDLCBrandStockExchange.cs @@ -0,0 +1,389 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Enums +{ + /// + /// (Required for public company) stock exchange. + /// + /// (Required for public company) stock exchange. + [JsonConverter(typeof(StringEnumConverter))] + public enum SMSTenDLCBrandStockExchange + { + /// + /// Enum NONE for value: NONE + /// + [EnumMember(Value = "NONE")] + NONE = 1, + + /// + /// Enum NASDAQ for value: NASDAQ + /// + [EnumMember(Value = "NASDAQ")] + NASDAQ = 2, + + /// + /// Enum NYSE for value: NYSE + /// + [EnumMember(Value = "NYSE")] + NYSE = 3, + + /// + /// Enum AMEX for value: AMEX + /// + [EnumMember(Value = "AMEX")] + AMEX = 4, + + /// + /// Enum AMX for value: AMX + /// + [EnumMember(Value = "AMX")] + AMX = 5, + + /// + /// Enum ASX for value: ASX + /// + [EnumMember(Value = "ASX")] + ASX = 6, + + /// + /// Enum B3 for value: B3 + /// + [EnumMember(Value = "B3")] + B3 = 7, + + /// + /// Enum BME for value: BME + /// + [EnumMember(Value = "BME")] + BME = 8, + + /// + /// Enum BSE for value: BSE + /// + [EnumMember(Value = "BSE")] + BSE = 9, + + /// + /// Enum FRA for value: FRA + /// + [EnumMember(Value = "FRA")] + FRA = 10, + + /// + /// Enum ICEX for value: ICEX + /// + [EnumMember(Value = "ICEX")] + ICEX = 11, + + /// + /// Enum JPX for value: JPX + /// + [EnumMember(Value = "JPX")] + JPX = 12, + + /// + /// Enum JSE for value: JSE + /// + [EnumMember(Value = "JSE")] + JSE = 13, + + /// + /// Enum KRX for value: KRX + /// + [EnumMember(Value = "KRX")] + KRX = 14, + + /// + /// Enum LON for value: LON + /// + [EnumMember(Value = "LON")] + LON = 15, + + /// + /// Enum NSE for value: NSE + /// + [EnumMember(Value = "NSE")] + NSE = 16, + + /// + /// Enum OMX for value: OMX + /// + [EnumMember(Value = "OMX")] + OMX = 17, + + /// + /// Enum SEHK for value: SEHK + /// + [EnumMember(Value = "SEHK")] + SEHK = 18, + + /// + /// Enum SGX for value: SGX + /// + [EnumMember(Value = "SGX")] + SGX = 19, + + /// + /// Enum SSE for value: SSE + /// + [EnumMember(Value = "SSE")] + SSE = 20, + + /// + /// Enum STO for value: STO + /// + [EnumMember(Value = "STO")] + STO = 21, + + /// + /// Enum SWX for value: SWX + /// + [EnumMember(Value = "SWX")] + SWX = 22, + + /// + /// Enum SZSE for value: SZSE + /// + [EnumMember(Value = "SZSE")] + SZSE = 23, + + /// + /// Enum TSX for value: TSX + /// + [EnumMember(Value = "TSX")] + TSX = 24, + + /// + /// Enum TWSE for value: TWSE + /// + [EnumMember(Value = "TWSE")] + TWSE = 25, + + /// + /// Enum VSE for value: VSE + /// + [EnumMember(Value = "VSE")] + VSE = 26, + + /// + /// Enum OTHER for value: OTHER + /// + [EnumMember(Value = "OTHER")] + OTHER = 27, + } + + /// + /// Converts to and from the JSON value + /// + public static class SMSTenDLCBrandStockExchangeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static SMSTenDLCBrandStockExchange FromString(string value) + { + if (value.Equals("NONE")) + return SMSTenDLCBrandStockExchange.NONE; + + if (value.Equals("NASDAQ")) + return SMSTenDLCBrandStockExchange.NASDAQ; + + if (value.Equals("NYSE")) + return SMSTenDLCBrandStockExchange.NYSE; + + if (value.Equals("AMEX")) + return SMSTenDLCBrandStockExchange.AMEX; + + if (value.Equals("AMX")) + return SMSTenDLCBrandStockExchange.AMX; + + if (value.Equals("ASX")) + return SMSTenDLCBrandStockExchange.ASX; + + if (value.Equals("B3")) + return SMSTenDLCBrandStockExchange.B3; + + if (value.Equals("BME")) + return SMSTenDLCBrandStockExchange.BME; + + if (value.Equals("BSE")) + return SMSTenDLCBrandStockExchange.BSE; + + if (value.Equals("FRA")) + return SMSTenDLCBrandStockExchange.FRA; + + if (value.Equals("ICEX")) + return SMSTenDLCBrandStockExchange.ICEX; + + if (value.Equals("JPX")) + return SMSTenDLCBrandStockExchange.JPX; + + if (value.Equals("JSE")) + return SMSTenDLCBrandStockExchange.JSE; + + if (value.Equals("KRX")) + return SMSTenDLCBrandStockExchange.KRX; + + if (value.Equals("LON")) + return SMSTenDLCBrandStockExchange.LON; + + if (value.Equals("NSE")) + return SMSTenDLCBrandStockExchange.NSE; + + if (value.Equals("OMX")) + return SMSTenDLCBrandStockExchange.OMX; + + if (value.Equals("SEHK")) + return SMSTenDLCBrandStockExchange.SEHK; + + if (value.Equals("SGX")) + return SMSTenDLCBrandStockExchange.SGX; + + if (value.Equals("SSE")) + return SMSTenDLCBrandStockExchange.SSE; + + if (value.Equals("STO")) + return SMSTenDLCBrandStockExchange.STO; + + if (value.Equals("SWX")) + return SMSTenDLCBrandStockExchange.SWX; + + if (value.Equals("SZSE")) + return SMSTenDLCBrandStockExchange.SZSE; + + if (value.Equals("TSX")) + return SMSTenDLCBrandStockExchange.TSX; + + if (value.Equals("TWSE")) + return SMSTenDLCBrandStockExchange.TWSE; + + if (value.Equals("VSE")) + return SMSTenDLCBrandStockExchange.VSE; + + if (value.Equals("OTHER")) + return SMSTenDLCBrandStockExchange.OTHER; + + throw new NotImplementedException( + $"Could not convert value to type SMSTenDLCBrandStockExchange: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static SMSTenDLCBrandStockExchange? FromStringOrDefault(string value) + { + if (value.Equals("NONE")) + return SMSTenDLCBrandStockExchange.NONE; + + if (value.Equals("NASDAQ")) + return SMSTenDLCBrandStockExchange.NASDAQ; + + if (value.Equals("NYSE")) + return SMSTenDLCBrandStockExchange.NYSE; + + if (value.Equals("AMEX")) + return SMSTenDLCBrandStockExchange.AMEX; + + if (value.Equals("AMX")) + return SMSTenDLCBrandStockExchange.AMX; + + if (value.Equals("ASX")) + return SMSTenDLCBrandStockExchange.ASX; + + if (value.Equals("B3")) + return SMSTenDLCBrandStockExchange.B3; + + if (value.Equals("BME")) + return SMSTenDLCBrandStockExchange.BME; + + if (value.Equals("BSE")) + return SMSTenDLCBrandStockExchange.BSE; + + if (value.Equals("FRA")) + return SMSTenDLCBrandStockExchange.FRA; + + if (value.Equals("ICEX")) + return SMSTenDLCBrandStockExchange.ICEX; + + if (value.Equals("JPX")) + return SMSTenDLCBrandStockExchange.JPX; + + if (value.Equals("JSE")) + return SMSTenDLCBrandStockExchange.JSE; + + if (value.Equals("KRX")) + return SMSTenDLCBrandStockExchange.KRX; + + if (value.Equals("LON")) + return SMSTenDLCBrandStockExchange.LON; + + if (value.Equals("NSE")) + return SMSTenDLCBrandStockExchange.NSE; + + if (value.Equals("OMX")) + return SMSTenDLCBrandStockExchange.OMX; + + if (value.Equals("SEHK")) + return SMSTenDLCBrandStockExchange.SEHK; + + if (value.Equals("SGX")) + return SMSTenDLCBrandStockExchange.SGX; + + if (value.Equals("SSE")) + return SMSTenDLCBrandStockExchange.SSE; + + if (value.Equals("STO")) + return SMSTenDLCBrandStockExchange.STO; + + if (value.Equals("SWX")) + return SMSTenDLCBrandStockExchange.SWX; + + if (value.Equals("SZSE")) + return SMSTenDLCBrandStockExchange.SZSE; + + if (value.Equals("TSX")) + return SMSTenDLCBrandStockExchange.TSX; + + if (value.Equals("TWSE")) + return SMSTenDLCBrandStockExchange.TWSE; + + if (value.Equals("VSE")) + return SMSTenDLCBrandStockExchange.VSE; + + if (value.Equals("OTHER")) + return SMSTenDLCBrandStockExchange.OTHER; + + return null; + } + } +} diff --git a/src/freeclimb/Enums/SMSTenDLCCampaignStatus.cs b/src/freeclimb/Enums/SMSTenDLCCampaignStatus.cs new file mode 100644 index 00000000..41aa49db --- /dev/null +++ b/src/freeclimb/Enums/SMSTenDLCCampaignStatus.cs @@ -0,0 +1,89 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Enums +{ + /// + /// Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. + /// + /// Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. + [JsonConverter(typeof(StringEnumConverter))] + public enum SMSTenDLCCampaignStatus + { + /// + /// Enum ACTIVE for value: ACTIVE + /// + [EnumMember(Value = "ACTIVE")] + ACTIVE = 1, + + /// + /// Enum EXPIRED for value: EXPIRED + /// + [EnumMember(Value = "EXPIRED")] + EXPIRED = 2, + } + + /// + /// Converts to and from the JSON value + /// + public static class SMSTenDLCCampaignStatusValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static SMSTenDLCCampaignStatus FromString(string value) + { + if (value.Equals("ACTIVE")) + return SMSTenDLCCampaignStatus.ACTIVE; + + if (value.Equals("EXPIRED")) + return SMSTenDLCCampaignStatus.EXPIRED; + + throw new NotImplementedException( + $"Could not convert value to type SMSTenDLCCampaignStatus: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static SMSTenDLCCampaignStatus? FromStringOrDefault(string value) + { + if (value.Equals("ACTIVE")) + return SMSTenDLCCampaignStatus.ACTIVE; + + if (value.Equals("EXPIRED")) + return SMSTenDLCCampaignStatus.EXPIRED; + + return null; + } + } +} diff --git a/src/freeclimb/Enums/SMSTenDLCPartnerCampaignStatus.cs b/src/freeclimb/Enums/SMSTenDLCPartnerCampaignStatus.cs new file mode 100644 index 00000000..43ccc54f --- /dev/null +++ b/src/freeclimb/Enums/SMSTenDLCPartnerCampaignStatus.cs @@ -0,0 +1,89 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Enums +{ + /// + /// Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. + /// + /// Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. + [JsonConverter(typeof(StringEnumConverter))] + public enum SMSTenDLCPartnerCampaignStatus + { + /// + /// Enum ACTIVE for value: ACTIVE + /// + [EnumMember(Value = "ACTIVE")] + ACTIVE = 1, + + /// + /// Enum EXPIRED for value: EXPIRED + /// + [EnumMember(Value = "EXPIRED")] + EXPIRED = 2, + } + + /// + /// Converts to and from the JSON value + /// + public static class SMSTenDLCPartnerCampaignStatusValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static SMSTenDLCPartnerCampaignStatus FromString(string value) + { + if (value.Equals("ACTIVE")) + return SMSTenDLCPartnerCampaignStatus.ACTIVE; + + if (value.Equals("EXPIRED")) + return SMSTenDLCPartnerCampaignStatus.EXPIRED; + + throw new NotImplementedException( + $"Could not convert value to type SMSTenDLCPartnerCampaignStatus: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static SMSTenDLCPartnerCampaignStatus? FromStringOrDefault(string value) + { + if (value.Equals("ACTIVE")) + return SMSTenDLCPartnerCampaignStatus.ACTIVE; + + if (value.Equals("EXPIRED")) + return SMSTenDLCPartnerCampaignStatus.EXPIRED; + + return null; + } + } +} diff --git a/src/freeclimb/Enums/SMSTollFreeCampaignRegistrationStatus.cs b/src/freeclimb/Enums/SMSTollFreeCampaignRegistrationStatus.cs new file mode 100644 index 00000000..e0961301 --- /dev/null +++ b/src/freeclimb/Enums/SMSTollFreeCampaignRegistrationStatus.cs @@ -0,0 +1,125 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Enums +{ + /// + /// Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. + /// + /// Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. + [JsonConverter(typeof(StringEnumConverter))] + public enum SMSTollFreeCampaignRegistrationStatus + { + /// + /// Enum UNREGISTERED for value: UNREGISTERED + /// + [EnumMember(Value = "UNREGISTERED")] + UNREGISTERED = 1, + + /// + /// Enum INITIATED for value: INITIATED + /// + [EnumMember(Value = "INITIATED")] + INITIATED = 2, + + /// + /// Enum PENDING for value: PENDING + /// + [EnumMember(Value = "PENDING")] + PENDING = 3, + + /// + /// Enum DECLINED for value: DECLINED + /// + [EnumMember(Value = "DECLINED")] + DECLINED = 4, + + /// + /// Enum REGISTERED for value: REGISTERED + /// + [EnumMember(Value = "REGISTERED")] + REGISTERED = 5, + } + + /// + /// Converts to and from the JSON value + /// + public static class SMSTollFreeCampaignRegistrationStatusValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static SMSTollFreeCampaignRegistrationStatus FromString(string value) + { + if (value.Equals("UNREGISTERED")) + return SMSTollFreeCampaignRegistrationStatus.UNREGISTERED; + + if (value.Equals("INITIATED")) + return SMSTollFreeCampaignRegistrationStatus.INITIATED; + + if (value.Equals("PENDING")) + return SMSTollFreeCampaignRegistrationStatus.PENDING; + + if (value.Equals("DECLINED")) + return SMSTollFreeCampaignRegistrationStatus.DECLINED; + + if (value.Equals("REGISTERED")) + return SMSTollFreeCampaignRegistrationStatus.REGISTERED; + + throw new NotImplementedException( + $"Could not convert value to type SMSTollFreeCampaignRegistrationStatus: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static SMSTollFreeCampaignRegistrationStatus? FromStringOrDefault(string value) + { + if (value.Equals("UNREGISTERED")) + return SMSTollFreeCampaignRegistrationStatus.UNREGISTERED; + + if (value.Equals("INITIATED")) + return SMSTollFreeCampaignRegistrationStatus.INITIATED; + + if (value.Equals("PENDING")) + return SMSTollFreeCampaignRegistrationStatus.PENDING; + + if (value.Equals("DECLINED")) + return SMSTollFreeCampaignRegistrationStatus.DECLINED; + + if (value.Equals("REGISTERED")) + return SMSTollFreeCampaignRegistrationStatus.REGISTERED; + + return null; + } + } +} diff --git a/src/freeclimb/Enums/TranscribeReason.cs b/src/freeclimb/Enums/TranscribeReason.cs new file mode 100644 index 00000000..351be6ca --- /dev/null +++ b/src/freeclimb/Enums/TranscribeReason.cs @@ -0,0 +1,124 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Enums +{ + /// + /// Defines TranscribeReason + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TranscribeReason + { + /// + /// Enum INTERNAL_ERROR for value: internalError + /// + [EnumMember(Value = "internalError")] + INTERNAL_ERROR = 1, + + /// + /// Enum HANGUP for value: hangup + /// + [EnumMember(Value = "hangup")] + HANGUP = 2, + + /// + /// Enum MAX_LENGTH for value: maxLength + /// + [EnumMember(Value = "maxLength")] + MAX_LENGTH = 3, + + /// + /// Enum DIGIT for value: digit + /// + [EnumMember(Value = "digit")] + DIGIT = 4, + + /// + /// Enum NO_INPUT for value: noInput + /// + [EnumMember(Value = "noInput")] + NO_INPUT = 5, + } + + /// + /// Converts to and from the JSON value + /// + public static class TranscribeReasonValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static TranscribeReason FromString(string value) + { + if (value.Equals("internalError")) + return TranscribeReason.INTERNAL_ERROR; + + if (value.Equals("hangup")) + return TranscribeReason.HANGUP; + + if (value.Equals("maxLength")) + return TranscribeReason.MAX_LENGTH; + + if (value.Equals("digit")) + return TranscribeReason.DIGIT; + + if (value.Equals("noInput")) + return TranscribeReason.NO_INPUT; + + throw new NotImplementedException( + $"Could not convert value to type TranscribeReason: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static TranscribeReason? FromStringOrDefault(string value) + { + if (value.Equals("internalError")) + return TranscribeReason.INTERNAL_ERROR; + + if (value.Equals("hangup")) + return TranscribeReason.HANGUP; + + if (value.Equals("maxLength")) + return TranscribeReason.MAX_LENGTH; + + if (value.Equals("digit")) + return TranscribeReason.DIGIT; + + if (value.Equals("noInput")) + return TranscribeReason.NO_INPUT; + + return null; + } + } +} diff --git a/src/freeclimb/Enums/TranscribeTermReason.cs b/src/freeclimb/Enums/TranscribeTermReason.cs new file mode 100644 index 00000000..d0b0cc3f --- /dev/null +++ b/src/freeclimb/Enums/TranscribeTermReason.cs @@ -0,0 +1,88 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Enums +{ + /// + /// Defines TranscribeTermReason + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TranscribeTermReason + { + /// + /// Enum ERROR for value: error + /// + [EnumMember(Value = "error")] + ERROR = 1, + + /// + /// Enum COMPLETED for value: completed + /// + [EnumMember(Value = "completed")] + COMPLETED = 2, + } + + /// + /// Converts to and from the JSON value + /// + public static class TranscribeTermReasonValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static TranscribeTermReason FromString(string value) + { + if (value.Equals("error")) + return TranscribeTermReason.ERROR; + + if (value.Equals("completed")) + return TranscribeTermReason.COMPLETED; + + throw new NotImplementedException( + $"Could not convert value to type TranscribeTermReason: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static TranscribeTermReason? FromStringOrDefault(string value) + { + if (value.Equals("error")) + return TranscribeTermReason.ERROR; + + if (value.Equals("completed")) + return TranscribeTermReason.COMPLETED; + + return null; + } + } +} diff --git a/src/freeclimb/Enums/UpdateCallRequestStatus.cs b/src/freeclimb/Enums/UpdateCallRequestStatus.cs index 64365964..bed6b81a 100644 --- a/src/freeclimb/Enums/UpdateCallRequestStatus.cs +++ b/src/freeclimb/Enums/UpdateCallRequestStatus.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -44,8 +44,46 @@ public enum UpdateCallRequestStatus /// Enum COMPLETED for value: completed /// [EnumMember(Value = "completed")] - COMPLETED = 2 - + COMPLETED = 2, } + /// + /// Converts to and from the JSON value + /// + public static class UpdateCallRequestStatusValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static UpdateCallRequestStatus FromString(string value) + { + if (value.Equals("canceled")) + return UpdateCallRequestStatus.CANCELED; + + if (value.Equals("completed")) + return UpdateCallRequestStatus.COMPLETED; + + throw new NotImplementedException( + $"Could not convert value to type UpdateCallRequestStatus: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static UpdateCallRequestStatus? FromStringOrDefault(string value) + { + if (value.Equals("canceled")) + return UpdateCallRequestStatus.CANCELED; + + if (value.Equals("completed")) + return UpdateCallRequestStatus.COMPLETED; + + return null; + } + } } diff --git a/src/freeclimb/Enums/UpdateConferenceRequestStatus.cs b/src/freeclimb/Enums/UpdateConferenceRequestStatus.cs index a4a95a6a..6a2ba78d 100644 --- a/src/freeclimb/Enums/UpdateConferenceRequestStatus.cs +++ b/src/freeclimb/Enums/UpdateConferenceRequestStatus.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Enums { @@ -44,8 +44,46 @@ public enum UpdateConferenceRequestStatus /// Enum TERMINATED for value: terminated /// [EnumMember(Value = "terminated")] - TERMINATED = 2 - + TERMINATED = 2, } + /// + /// Converts to and from the JSON value + /// + public static class UpdateConferenceRequestStatusValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static UpdateConferenceRequestStatus FromString(string value) + { + if (value.Equals("empty")) + return UpdateConferenceRequestStatus.EMPTY; + + if (value.Equals("terminated")) + return UpdateConferenceRequestStatus.TERMINATED; + + throw new NotImplementedException( + $"Could not convert value to type UpdateConferenceRequestStatus: '{value}'" + ); + } + + /// + /// Parses a given value to + /// + /// + /// + public static UpdateConferenceRequestStatus? FromStringOrDefault(string value) + { + if (value.Equals("empty")) + return UpdateConferenceRequestStatus.EMPTY; + + if (value.Equals("terminated")) + return UpdateConferenceRequestStatus.TERMINATED; + + return null; + } + } } diff --git a/src/freeclimb/Model/AbstractOpenAPISchema.cs b/src/freeclimb/Model/AbstractOpenAPISchema.cs index fce9e961..e66771e1 100644 --- a/src/freeclimb/Model/AbstractOpenAPISchema.cs +++ b/src/freeclimb/Model/AbstractOpenAPISchema.cs @@ -23,36 +23,32 @@ public abstract partial class AbstractOpenAPISchema /// /// Custom JSON serializer /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Error, - ContractResolver = new DefaultContractResolver + static public readonly JsonSerializerSettings SerializerSettings = + new JsonSerializerSettings { - NamingStrategy = new CamelCaseNamingStrategy + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + MissingMemberHandling = MissingMemberHandling.Error, + ContractResolver = new DefaultContractResolver { - OverrideSpecifiedNames = false - } - } - }; + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; /// /// Custom JSON serializer for objects with additional properties /// - static public readonly JsonSerializerSettings AdditionalPropertiesSerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver + static public readonly JsonSerializerSettings AdditionalPropertiesSerializerSettings = + new JsonSerializerSettings { - NamingStrategy = new CamelCaseNamingStrategy + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + MissingMemberHandling = MissingMemberHandling.Ignore, + ContractResolver = new DefaultContractResolver { - OverrideSpecifiedNames = false - } - } - }; + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; /// /// Gets or Sets the actual instance diff --git a/src/freeclimb/Model/AccountRequest.cs b/src/freeclimb/Model/AccountRequest.cs index 1cbfea8c..0bb85451 100644 --- a/src/freeclimb/Model/AccountRequest.cs +++ b/src/freeclimb/Model/AccountRequest.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// AccountRequest /// [DataContract(Name = "AccountRequest")] - public partial class AccountRequest : IEquatable, IValidatableObject + public partial class AccountRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,6 +41,7 @@ public partial class AccountRequest : IEquatable, IValidatableOb public AccountRequest(string alias = default(string), string label = default(string)) { this.Alias = alias; + this.Label = label; } @@ -78,85 +79,34 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the AccountRequest instance. + /// Retrieve the KVP Dictionary for the AccountRequest instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("alias", Alias); - props.Add("label", Label); + props.Add("alias", Alias); + props.Add("label", Label); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountRequest); - } - - /// - /// Returns true if AccountRequest instances are equal - /// - /// Instance of AccountRequest to be compared - /// Boolean - public bool Equals(AccountRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.Label == input.Label || - (this.Label != null && - this.Label.Equals(input.Label)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.Label != null) - { - hashCode = (hashCode * 59) + this.Label.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/AccountResult.cs b/src/freeclimb/Model/AccountResult.cs index 91a7fb88..79ee27cb 100644 --- a/src/freeclimb/Model/AccountResult.cs +++ b/src/freeclimb/Model/AccountResult.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,9 +31,8 @@ namespace freeclimb.Model /// AccountResult /// [DataContract(Name = "AccountResult")] - public partial class AccountResult : IEquatable, IValidatableObject + public partial class AccountResult : IValidatableObject { - /// /// Gets or Sets Type /// @@ -45,6 +44,7 @@ public partial class AccountResult : IEquatable, IValidatableObje /// [DataMember(Name = "status", EmitDefaultValue = true)] public AccountStatus? Status { get; set; } + /// /// Initializes a new instance of the class. /// @@ -59,18 +59,40 @@ public partial class AccountResult : IEquatable, IValidatableObje /// type. /// status. /// The list of subresources for this account.. - public AccountResult(string uri = default(string), string dateCreated = default(string), string dateUpdated = default(string), int revision = default(int), string accountId = default(string), string apiKey = default(string), string alias = default(string), string label = default(string), AccountType? type = default(AccountType?), AccountStatus? status = default(AccountStatus?), Object subresourceUris = default(Object)) + public AccountResult( + string uri = default(string), + string dateCreated = default(string), + string dateUpdated = default(string), + int revision = default(int), + string accountId = default(string), + string apiKey = default(string), + string alias = default(string), + string label = default(string), + AccountType? type = default(AccountType?), + AccountStatus? status = default(AccountStatus?), + Object subresourceUris = default(Object) + ) { this.Uri = uri; + this.DateCreated = dateCreated; + this.DateUpdated = dateUpdated; + this.Revision = revision; + this.AccountId = accountId; + this.ApiKey = apiKey; + this.Alias = alias; + this.Label = label; + this.Type = type; + this.Status = status; + this.SubresourceUris = subresourceUris; } @@ -166,163 +188,43 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the AccountResult instance. + /// Retrieve the KVP Dictionary for the AccountResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("uri", Uri); - props.Add("dateCreated", DateCreated); - props.Add("dateUpdated", DateUpdated); - props.Add("revision", Revision); - props.Add("accountId", AccountId); - props.Add("apiKey", ApiKey); - props.Add("alias", Alias); - props.Add("label", Label); - props.Add("type", Type); - props.Add("status", Status); - props.Add("subresourceUris", SubresourceUris); + props.Add("uri", Uri); + props.Add("dateCreated", DateCreated); + props.Add("dateUpdated", DateUpdated); + props.Add("revision", Revision); + props.Add("accountId", AccountId); + props.Add("apiKey", ApiKey); + props.Add("alias", Alias); + props.Add("label", Label); + props.Add("type", Type); + props.Add("status", Status); + props.Add("subresourceUris", SubresourceUris); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountResult); - } - - /// - /// Returns true if AccountResult instances are equal - /// - /// Instance of AccountResult to be compared - /// Boolean - public bool Equals(AccountResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DateCreated == input.DateCreated || - (this.DateCreated != null && - this.DateCreated.Equals(input.DateCreated)) - ) && - ( - this.DateUpdated == input.DateUpdated || - (this.DateUpdated != null && - this.DateUpdated.Equals(input.DateUpdated)) - ) && - ( - this.Revision == input.Revision || - this.Revision.Equals(input.Revision) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.ApiKey == input.ApiKey || - (this.ApiKey != null && - this.ApiKey.Equals(input.ApiKey)) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.Label == input.Label || - (this.Label != null && - this.Label.Equals(input.Label)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.SubresourceUris == input.SubresourceUris || - (this.SubresourceUris != null && - this.SubresourceUris.Equals(input.SubresourceUris)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DateCreated != null) - { - hashCode = (hashCode * 59) + this.DateCreated.GetHashCode(); - } - if (this.DateUpdated != null) - { - hashCode = (hashCode * 59) + this.DateUpdated.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Revision.GetHashCode(); - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.ApiKey != null) - { - hashCode = (hashCode * 59) + this.ApiKey.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.Label != null) - { - hashCode = (hashCode * 59) + this.Label.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.SubresourceUris != null) - { - hashCode = (hashCode * 59) + this.SubresourceUris.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/AccountResultAllOf.cs b/src/freeclimb/Model/AccountResultAllOf.cs deleted file mode 100644 index 38427d65..00000000 --- a/src/freeclimb/Model/AccountResultAllOf.cs +++ /dev/null @@ -1,252 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// AccountResultAllOf - /// - [DataContract(Name = "AccountResult_allOf")] - public partial class AccountResultAllOf : IEquatable, IValidatableObject - { - - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = true)] - public AccountType? Type { get; set; } - - /// - /// Gets or Sets Status - /// - [DataMember(Name = "status", EmitDefaultValue = true)] - public AccountStatus? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// String that uniquely identifies this account resource.. - /// The API key assigned to this account. This key must be kept a secret by the customer.. - /// A description for this account.. - /// A string that identifies a category or group to which the account belongs.. - /// type. - /// status. - /// The list of subresources for this account.. - public AccountResultAllOf(string accountId = default(string), string apiKey = default(string), string alias = default(string), string label = default(string), AccountType? type = default(AccountType?), AccountStatus? status = default(AccountStatus?), Object subresourceUris = default(Object)) - { - this.AccountId = accountId; - this.ApiKey = apiKey; - this.Alias = alias; - this.Label = label; - this.Type = type; - this.Status = status; - this.SubresourceUris = subresourceUris; - } - - /// - /// String that uniquely identifies this account resource. - /// - /// String that uniquely identifies this account resource. - [DataMember(Name = "accountId", EmitDefaultValue = true)] - public string AccountId { get; set; } - - /// - /// The API key assigned to this account. This key must be kept a secret by the customer. - /// - /// The API key assigned to this account. This key must be kept a secret by the customer. - [DataMember(Name = "apiKey", EmitDefaultValue = true)] - public string ApiKey { get; set; } - - /// - /// A description for this account. - /// - /// A description for this account. - [DataMember(Name = "alias", EmitDefaultValue = true)] - public string Alias { get; set; } - - /// - /// A string that identifies a category or group to which the account belongs. - /// - /// A string that identifies a category or group to which the account belongs. - [DataMember(Name = "label", EmitDefaultValue = true)] - public string Label { get; set; } - - /// - /// The list of subresources for this account. - /// - /// The list of subresources for this account. - [DataMember(Name = "subresourceUris", EmitDefaultValue = true)] - public Object SubresourceUris { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountResultAllOf {\n"); - sb.Append(" AccountId: ").Append(AccountId).Append("\n"); - sb.Append(" ApiKey: ").Append(ApiKey).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Label: ").Append(Label).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" SubresourceUris: ").Append(SubresourceUris).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the AccountResultAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("accountId", AccountId); - props.Add("apiKey", ApiKey); - props.Add("alias", Alias); - props.Add("label", Label); - props.Add("type", Type); - props.Add("status", Status); - props.Add("subresourceUris", SubresourceUris); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountResultAllOf); - } - - /// - /// Returns true if AccountResultAllOf instances are equal - /// - /// Instance of AccountResultAllOf to be compared - /// Boolean - public bool Equals(AccountResultAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.ApiKey == input.ApiKey || - (this.ApiKey != null && - this.ApiKey.Equals(input.ApiKey)) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.Label == input.Label || - (this.Label != null && - this.Label.Equals(input.Label)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.SubresourceUris == input.SubresourceUris || - (this.SubresourceUris != null && - this.SubresourceUris.Equals(input.SubresourceUris)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.ApiKey != null) - { - hashCode = (hashCode * 59) + this.ApiKey.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.Label != null) - { - hashCode = (hashCode * 59) + this.Label.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.SubresourceUris != null) - { - hashCode = (hashCode * 59) + this.SubresourceUris.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/AddToConference.cs b/src/freeclimb/Model/AddToConference.cs index bd7a097a..1261cd3a 100644 --- a/src/freeclimb/Model/AddToConference.cs +++ b/src/freeclimb/Model/AddToConference.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,39 +33,14 @@ namespace freeclimb.Model /// [DataContract(Name = "AddToConference")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class AddToConference : PerclCommand, IEquatable, IValidatableObject + public partial class AddToConference : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected AddToConference() { } + /// /// Initializes a new instance of the class. /// @@ -80,21 +55,46 @@ protected AddToConference() { } /// If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. . /// If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. . /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "AddToConference"). - public AddToConference(bool allowCallControl = default(bool), string callControlSequence = default(string), string callControlUrl = default(string), string conferenceId = default(string), string leaveConferenceUrl = default(string), bool listen = default(bool), string notificationUrl = default(string), bool startConfOnEnter = default(bool), bool talk = default(bool), bool dtmfPassThrough = default(bool), string command = "AddToConference") : base(command) + public AddToConference( + bool allowCallControl = default(bool), + string callControlSequence = default(string), + string callControlUrl = default(string), + string conferenceId = default(string), + string leaveConferenceUrl = default(string), + bool listen = default(bool), + string notificationUrl = default(string), + bool startConfOnEnter = default(bool), + bool talk = default(bool), + bool dtmfPassThrough = default(bool), + string command = @"AddToConference" + ) + : base(command) { // to ensure "conferenceId" is required (not null) - if (conferenceId == null) { - throw new ArgumentNullException("conferenceId is a required property for AddToConference and cannot be null"); + if (conferenceId == null) + { + throw new ArgumentNullException( + "conferenceId is a required property for AddToConference and cannot be null" + ); } this.ConferenceId = conferenceId; + this.AllowCallControl = allowCallControl; + this.CallControlSequence = callControlSequence; + this.CallControlUrl = callControlUrl; + this.LeaveConferenceUrl = leaveConferenceUrl; + this.Listen = listen; + this.NotificationUrl = notificationUrl; + this.StartConfOnEnter = startConfOnEnter; + this.Talk = talk; + this.DtmfPassThrough = dtmfPassThrough; } @@ -123,11 +123,11 @@ protected AddToConference() { } /// ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result. /// /// ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result. - [DataMember(Name = "conferenceId", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "conferenceId", IsRequired = true, EmitDefaultValue = true)] public string ConferenceId { get; set; } /// - /// URL to be invoked when the Participant leaves the Conference. + /// URL to be invoked when the Participant leaves the Conference. /// /// URL to be invoked when the Participant leaves the Conference. [DataMember(Name = "leaveConferenceUrl", EmitDefaultValue = false)] @@ -155,14 +155,14 @@ protected AddToConference() { } public bool StartConfOnEnter { get; set; } /// - /// If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. + /// If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. /// /// If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. [DataMember(Name = "talk", EmitDefaultValue = true)] public bool Talk { get; set; } /// - /// If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. + /// If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. /// /// If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. [DataMember(Name = "dtmfPassThrough", EmitDefaultValue = true)] @@ -207,140 +207,35 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the AddToConference instance. + /// Retrieve the KVP Dictionary for the AddToConference instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("allowCallControl", AllowCallControl); - props.Add("callControlSequence", CallControlSequence); - props.Add("callControlUrl", CallControlUrl); - props.Add("conferenceId", ConferenceId); - props.Add("leaveConferenceUrl", LeaveConferenceUrl); - props.Add("listen", Listen); - props.Add("notificationUrl", NotificationUrl); - props.Add("startConfOnEnter", StartConfOnEnter); - props.Add("talk", Talk); - props.Add("dtmfPassThrough", DtmfPassThrough); + props.Add("allowCallControl", AllowCallControl); + props.Add("callControlSequence", CallControlSequence); + props.Add("callControlUrl", CallControlUrl); + props.Add("conferenceId", ConferenceId); + props.Add("leaveConferenceUrl", LeaveConferenceUrl); + props.Add("listen", Listen); + props.Add("notificationUrl", NotificationUrl); + props.Add("startConfOnEnter", StartConfOnEnter); + props.Add("talk", Talk); + props.Add("dtmfPassThrough", DtmfPassThrough); IDictionary command = new Dictionary(); - command.Add("AddToConference",props); + command.Add("AddToConference", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AddToConference); - } - - /// - /// Returns true if AddToConference instances are equal - /// - /// Instance of AddToConference to be compared - /// Boolean - public bool Equals(AddToConference input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.AllowCallControl == input.AllowCallControl || - this.AllowCallControl.Equals(input.AllowCallControl) - ) && base.Equals(input) && - ( - this.CallControlSequence == input.CallControlSequence || - (this.CallControlSequence != null && - this.CallControlSequence.Equals(input.CallControlSequence)) - ) && base.Equals(input) && - ( - this.CallControlUrl == input.CallControlUrl || - (this.CallControlUrl != null && - this.CallControlUrl.Equals(input.CallControlUrl)) - ) && base.Equals(input) && - ( - this.ConferenceId == input.ConferenceId || - (this.ConferenceId != null && - this.ConferenceId.Equals(input.ConferenceId)) - ) && base.Equals(input) && - ( - this.LeaveConferenceUrl == input.LeaveConferenceUrl || - (this.LeaveConferenceUrl != null && - this.LeaveConferenceUrl.Equals(input.LeaveConferenceUrl)) - ) && base.Equals(input) && - ( - this.Listen == input.Listen || - this.Listen.Equals(input.Listen) - ) && base.Equals(input) && - ( - this.NotificationUrl == input.NotificationUrl || - (this.NotificationUrl != null && - this.NotificationUrl.Equals(input.NotificationUrl)) - ) && base.Equals(input) && - ( - this.StartConfOnEnter == input.StartConfOnEnter || - this.StartConfOnEnter.Equals(input.StartConfOnEnter) - ) && base.Equals(input) && - ( - this.Talk == input.Talk || - this.Talk.Equals(input.Talk) - ) && base.Equals(input) && - ( - this.DtmfPassThrough == input.DtmfPassThrough || - this.DtmfPassThrough.Equals(input.DtmfPassThrough) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.AllowCallControl.GetHashCode(); - if (this.CallControlSequence != null) - { - hashCode = (hashCode * 59) + this.CallControlSequence.GetHashCode(); - } - if (this.CallControlUrl != null) - { - hashCode = (hashCode * 59) + this.CallControlUrl.GetHashCode(); - } - if (this.ConferenceId != null) - { - hashCode = (hashCode * 59) + this.ConferenceId.GetHashCode(); - } - if (this.LeaveConferenceUrl != null) - { - hashCode = (hashCode * 59) + this.LeaveConferenceUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Listen.GetHashCode(); - if (this.NotificationUrl != null) - { - hashCode = (hashCode * 59) + this.NotificationUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StartConfOnEnter.GetHashCode(); - hashCode = (hashCode * 59) + this.Talk.GetHashCode(); - hashCode = (hashCode * 59) + this.DtmfPassThrough.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -350,14 +245,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/AddToConferenceAllOf.cs b/src/freeclimb/Model/AddToConferenceAllOf.cs deleted file mode 100644 index c9c96460..00000000 --- a/src/freeclimb/Model/AddToConferenceAllOf.cs +++ /dev/null @@ -1,311 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// AddToConferenceAllOf - /// - [DataContract(Name = "AddToConference_allOf")] - public partial class AddToConferenceAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AddToConferenceAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// If `true`, Call control will be enabled for this Participant's Call leg.. - /// Defines a sequence of digits that, when entered by this caller, invokes the `callControlUrl`. Only digits plus '*', and '#' may be used.. - /// URL to be invoked when this Participant enters the digit sequence defined in the `callControlSequence` attribute.. - /// ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result. (required). - /// URL to be invoked when the Participant leaves the Conference. . - /// If `true`, the Participant joins the Conference with listen privileges. This may be modified later via the REST API or `SetListen` PerCL command.. - /// When the Participant enters the Conference, this URL will be invoked using an HTTP POST request with the standard request parameters.. - /// 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.. - /// If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. . - /// If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. . - public AddToConferenceAllOf(bool allowCallControl = default(bool), string callControlSequence = default(string), string callControlUrl = default(string), string conferenceId = default(string), string leaveConferenceUrl = default(string), bool listen = default(bool), string notificationUrl = default(string), bool startConfOnEnter = default(bool), bool talk = default(bool), bool dtmfPassThrough = default(bool)) - { - // to ensure "conferenceId" is required (not null) - if (conferenceId == null) { - throw new ArgumentNullException("conferenceId is a required property for AddToConferenceAllOf and cannot be null"); - } - this.ConferenceId = conferenceId; - this.AllowCallControl = allowCallControl; - this.CallControlSequence = callControlSequence; - this.CallControlUrl = callControlUrl; - this.LeaveConferenceUrl = leaveConferenceUrl; - this.Listen = listen; - this.NotificationUrl = notificationUrl; - this.StartConfOnEnter = startConfOnEnter; - this.Talk = talk; - this.DtmfPassThrough = dtmfPassThrough; - } - - /// - /// If `true`, Call control will be enabled for this Participant's Call leg. - /// - /// If `true`, Call control will be enabled for this Participant's Call leg. - [DataMember(Name = "allowCallControl", EmitDefaultValue = true)] - public bool AllowCallControl { get; set; } - - /// - /// Defines a sequence of digits that, when entered by this caller, invokes the `callControlUrl`. Only digits plus '*', and '#' may be used. - /// - /// Defines a sequence of digits that, when entered by this caller, invokes the `callControlUrl`. Only digits plus '*', and '#' may be used. - [DataMember(Name = "callControlSequence", EmitDefaultValue = false)] - public string CallControlSequence { get; set; } - - /// - /// URL to be invoked when this Participant enters the digit sequence defined in the `callControlSequence` attribute. - /// - /// URL to be invoked when this Participant enters the digit sequence defined in the `callControlSequence` attribute. - [DataMember(Name = "callControlUrl", EmitDefaultValue = false)] - public string CallControlUrl { get; set; } - - /// - /// ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result. - /// - /// ID of the Conference to which to add the Participant (Call leg). Conference must exist or an error will result. - [DataMember(Name = "conferenceId", IsRequired = true, EmitDefaultValue = false)] - public string ConferenceId { get; set; } - - /// - /// URL to be invoked when the Participant leaves the Conference. - /// - /// URL to be invoked when the Participant leaves the Conference. - [DataMember(Name = "leaveConferenceUrl", EmitDefaultValue = false)] - public string LeaveConferenceUrl { get; set; } - - /// - /// If `true`, the Participant joins the Conference with listen privileges. This may be modified later via the REST API or `SetListen` PerCL command. - /// - /// If `true`, the Participant joins the Conference with listen privileges. This may be modified later via the REST API or `SetListen` PerCL command. - [DataMember(Name = "listen", EmitDefaultValue = true)] - public bool Listen { get; set; } - - /// - /// When the Participant enters the Conference, this URL will be invoked using an HTTP POST request with the standard request parameters. - /// - /// When the Participant enters the Conference, this URL will be invoked using an HTTP POST request with the standard request parameters. - [DataMember(Name = "notificationUrl", EmitDefaultValue = false)] - public string NotificationUrl { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "startConfOnEnter", EmitDefaultValue = true)] - public bool StartConfOnEnter { get; set; } - - /// - /// If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. - /// - /// If `true`, the Participant joins the Conference with talk privileges. This may be modified later via the REST API or `SetTalk` PerCL command. - [DataMember(Name = "talk", EmitDefaultValue = true)] - public bool Talk { get; set; } - - /// - /// If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. - /// - /// If `true`, the Participant joins the Conference with dtmfPassThrough privileges. This may be modified later via the REST API or `SetDTMFPassThrough` PerCL command. - [DataMember(Name = "dtmfPassThrough", EmitDefaultValue = true)] - public bool DtmfPassThrough { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AddToConferenceAllOf {\n"); - sb.Append(" AllowCallControl: ").Append(AllowCallControl).Append("\n"); - sb.Append(" CallControlSequence: ").Append(CallControlSequence).Append("\n"); - sb.Append(" CallControlUrl: ").Append(CallControlUrl).Append("\n"); - sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); - sb.Append(" LeaveConferenceUrl: ").Append(LeaveConferenceUrl).Append("\n"); - sb.Append(" Listen: ").Append(Listen).Append("\n"); - sb.Append(" NotificationUrl: ").Append(NotificationUrl).Append("\n"); - sb.Append(" StartConfOnEnter: ").Append(StartConfOnEnter).Append("\n"); - sb.Append(" Talk: ").Append(Talk).Append("\n"); - sb.Append(" DtmfPassThrough: ").Append(DtmfPassThrough).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the AddToConferenceAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("allowCallControl", AllowCallControl); - props.Add("callControlSequence", CallControlSequence); - props.Add("callControlUrl", CallControlUrl); - props.Add("conferenceId", ConferenceId); - props.Add("leaveConferenceUrl", LeaveConferenceUrl); - props.Add("listen", Listen); - props.Add("notificationUrl", NotificationUrl); - props.Add("startConfOnEnter", StartConfOnEnter); - props.Add("talk", Talk); - props.Add("dtmfPassThrough", DtmfPassThrough); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AddToConferenceAllOf); - } - - /// - /// Returns true if AddToConferenceAllOf instances are equal - /// - /// Instance of AddToConferenceAllOf to be compared - /// Boolean - public bool Equals(AddToConferenceAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowCallControl == input.AllowCallControl || - this.AllowCallControl.Equals(input.AllowCallControl) - ) && - ( - this.CallControlSequence == input.CallControlSequence || - (this.CallControlSequence != null && - this.CallControlSequence.Equals(input.CallControlSequence)) - ) && - ( - this.CallControlUrl == input.CallControlUrl || - (this.CallControlUrl != null && - this.CallControlUrl.Equals(input.CallControlUrl)) - ) && - ( - this.ConferenceId == input.ConferenceId || - (this.ConferenceId != null && - this.ConferenceId.Equals(input.ConferenceId)) - ) && - ( - this.LeaveConferenceUrl == input.LeaveConferenceUrl || - (this.LeaveConferenceUrl != null && - this.LeaveConferenceUrl.Equals(input.LeaveConferenceUrl)) - ) && - ( - this.Listen == input.Listen || - this.Listen.Equals(input.Listen) - ) && - ( - this.NotificationUrl == input.NotificationUrl || - (this.NotificationUrl != null && - this.NotificationUrl.Equals(input.NotificationUrl)) - ) && - ( - this.StartConfOnEnter == input.StartConfOnEnter || - this.StartConfOnEnter.Equals(input.StartConfOnEnter) - ) && - ( - this.Talk == input.Talk || - this.Talk.Equals(input.Talk) - ) && - ( - this.DtmfPassThrough == input.DtmfPassThrough || - this.DtmfPassThrough.Equals(input.DtmfPassThrough) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AllowCallControl.GetHashCode(); - if (this.CallControlSequence != null) - { - hashCode = (hashCode * 59) + this.CallControlSequence.GetHashCode(); - } - if (this.CallControlUrl != null) - { - hashCode = (hashCode * 59) + this.CallControlUrl.GetHashCode(); - } - if (this.ConferenceId != null) - { - hashCode = (hashCode * 59) + this.ConferenceId.GetHashCode(); - } - if (this.LeaveConferenceUrl != null) - { - hashCode = (hashCode * 59) + this.LeaveConferenceUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Listen.GetHashCode(); - if (this.NotificationUrl != null) - { - hashCode = (hashCode * 59) + this.NotificationUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StartConfOnEnter.GetHashCode(); - hashCode = (hashCode * 59) + this.Talk.GetHashCode(); - hashCode = (hashCode * 59) + this.DtmfPassThrough.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/AddToConferenceNotificationWebhook.cs b/src/freeclimb/Model/AddToConferenceNotificationWebhook.cs new file mode 100644 index 00000000..55ac88f4 --- /dev/null +++ b/src/freeclimb/Model/AddToConferenceNotificationWebhook.cs @@ -0,0 +1,293 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// 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. + /// + [DataContract(Name = "AddToConferenceNotificationWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class AddToConferenceNotificationWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", EmitDefaultValue = true)] + public ConferenceStatus? Status { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (default to "AddToConferenceNotificationWebhook"). + /// Unique ID for this Call, generated by FreeClimb.. + /// Account ID associated with your account.. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to you and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// Unique ID of the Conference.. + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null.. + /// status. + /// URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied.. + /// Unique ID of the Recording from this Conference. Populated only if a recording exists and the Conference was emptied.. + /// Duration of the recorded audio (in seconds), rounded up to the nearest second. Populated only if a Recording exists and the Conference was emptied.. + public AddToConferenceNotificationWebhook( + string requestType = @"AddToConferenceNotificationWebhook", + string callId = default(string), + string accountId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + ConferenceStatus? status = default(ConferenceStatus?), + string recordingUrl = default(string), + string recordingId = default(string), + int recordingDurationSec = default(int) + ) + : base() + { + base.RequestType = requestType; + + this.CallId = callId; + + this.AccountId = accountId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.Status = status; + + this.RecordingUrl = recordingUrl; + + this.RecordingId = recordingId; + + this.RecordingDurationSec = recordingDurationSec; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance AddToConferenceNotificationWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static AddToConferenceNotificationWebhook Deserialize(string jsonPayload) + { + return (AddToConferenceNotificationWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(AddToConferenceNotificationWebhook), + _serializerSettings + ); + } + + /// + /// Unique ID for this Call, generated by FreeClimb. + /// + /// Unique ID for this Call, generated by FreeClimb. + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// Unique ID of the Conference. + /// + /// Unique ID of the Conference. + [DataMember(Name = "conferenceId", EmitDefaultValue = false)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied. + /// + /// URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied. + [DataMember(Name = "recordingUrl", EmitDefaultValue = false)] + public string RecordingUrl { get; set; } + + /// + /// Unique ID of the Recording from this Conference. Populated only if a recording exists and the Conference was emptied. + /// + /// Unique ID of the Recording from this Conference. Populated only if a recording exists and the Conference was emptied. + [DataMember(Name = "recordingId", EmitDefaultValue = false)] + public string RecordingId { get; set; } + + /// + /// Duration of the recorded audio (in seconds), rounded up to the nearest second. Populated only if a Recording exists and the Conference was emptied. + /// + /// Duration of the recorded audio (in seconds), rounded up to the nearest second. Populated only if a Recording exists and the Conference was emptied. + [DataMember(Name = "recordingDurationSec", EmitDefaultValue = false)] + public int RecordingDurationSec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AddToConferenceNotificationWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" RecordingUrl: ").Append(RecordingUrl).Append("\n"); + sb.Append(" RecordingId: ").Append(RecordingId).Append("\n"); + sb.Append(" RecordingDurationSec: ").Append(RecordingDurationSec).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the AddToConferenceNotificationWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("callId", CallId); + props.Add("accountId", AccountId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("status", Status); + props.Add("recordingUrl", RecordingUrl); + props.Add("recordingId", RecordingId); + props.Add("recordingDurationSec", RecordingDurationSec); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/AddToQueueNotificationWebhook.cs b/src/freeclimb/Model/AddToQueueNotificationWebhook.cs new file mode 100644 index 00000000..cc0b6eff --- /dev/null +++ b/src/freeclimb/Model/AddToQueueNotificationWebhook.cs @@ -0,0 +1,242 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// 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. + /// + [DataContract(Name = "AddToQueueNotificationWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class AddToQueueNotificationWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (default to "AddToQueueNotificationWebhook"). + /// Unique ID for this Call, generated by FreeClimb.. + /// Account ID associated with your account.. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to you and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// Unique ID of the Conference.. + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null.. + public AddToQueueNotificationWebhook( + string requestType = @"AddToQueueNotificationWebhook", + string callId = default(string), + string accountId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string) + ) + : base() + { + base.RequestType = requestType; + + this.CallId = callId; + + this.AccountId = accountId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance AddToQueueNotificationWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static AddToQueueNotificationWebhook Deserialize(string jsonPayload) + { + return (AddToQueueNotificationWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(AddToQueueNotificationWebhook), + _serializerSettings + ); + } + + /// + /// Unique ID for this Call, generated by FreeClimb. + /// + /// Unique ID for this Call, generated by FreeClimb. + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// Unique ID of the Conference. + /// + /// Unique ID of the Conference. + [DataMember(Name = "conferenceId", EmitDefaultValue = false)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AddToQueueNotificationWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the AddToQueueNotificationWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("callId", CallId); + props.Add("accountId", AccountId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/ApplicationList.cs b/src/freeclimb/Model/ApplicationList.cs index 62dab7b5..d1e30cc8 100644 --- a/src/freeclimb/Model/ApplicationList.cs +++ b/src/freeclimb/Model/ApplicationList.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// ApplicationList /// [DataContract(Name = "ApplicationList")] - public partial class ApplicationList : IPagination, IEquatable, IValidatableObject + public partial class ApplicationList : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,31 @@ public partial class ApplicationList : IPagination, IEquatable, /// Number of items per page. /// Uri to retrieve the next page of items. /// applications. - public ApplicationList(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List applications = default(List)) + public ApplicationList( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List applications = default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.Applications = applications; } @@ -138,151 +154,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the ApplicationList instance. + /// Retrieve the KVP Dictionary for the ApplicationList instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in Applications) { nested.Add(item); } - props.Add("applications", nested); + props.Add("applications", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApplicationList); - } - - /// - /// Returns true if ApplicationList instances are equal - /// - /// Instance of ApplicationList to be compared - /// Boolean - public bool Equals(ApplicationList input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.Applications == input.Applications || - this.Applications != null && - input.Applications != null && - this.Applications.SequenceEqual(input.Applications) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.Applications != null) - { - hashCode = (hashCode * 59) + this.Applications.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/ApplicationListAllOf.cs b/src/freeclimb/Model/ApplicationListAllOf.cs deleted file mode 100644 index 1f13aa87..00000000 --- a/src/freeclimb/Model/ApplicationListAllOf.cs +++ /dev/null @@ -1,147 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// ApplicationListAllOf - /// - [DataContract(Name = "ApplicationList_allOf")] - public partial class ApplicationListAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// applications. - public ApplicationListAllOf(List applications = default(List)) - { - this.Applications = applications; - } - - /// - /// Gets or Sets Applications - /// - [DataMember(Name = "applications", EmitDefaultValue = true)] - public List Applications { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ApplicationListAllOf {\n"); - sb.Append(" Applications: ").Append(Applications).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the ApplicationListAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in Applications) - { - nested.Add(item); - } - props.Add("applications", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApplicationListAllOf); - } - - /// - /// Returns true if ApplicationListAllOf instances are equal - /// - /// Instance of ApplicationListAllOf to be compared - /// Boolean - public bool Equals(ApplicationListAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Applications == input.Applications || - this.Applications != null && - input.Applications != null && - this.Applications.SequenceEqual(input.Applications) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Applications != null) - { - hashCode = (hashCode * 59) + this.Applications.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/ApplicationRequest.cs b/src/freeclimb/Model/ApplicationRequest.cs index 4bec4509..724b691e 100644 --- a/src/freeclimb/Model/ApplicationRequest.cs +++ b/src/freeclimb/Model/ApplicationRequest.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// ApplicationRequest /// [DataContract(Name = "ApplicationRequest")] - public partial class ApplicationRequest : IEquatable, IValidatableObject + public partial class ApplicationRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -43,14 +43,28 @@ public partial class ApplicationRequest : IEquatable, IValid /// 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.. /// 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.. /// 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.. - public ApplicationRequest(string alias = default(string), string voiceUrl = default(string), string voiceFallbackUrl = default(string), string callConnectUrl = default(string), string statusCallbackUrl = default(string), string smsUrl = default(string), string smsFallbackUrl = default(string)) + public ApplicationRequest( + string alias = default(string), + string voiceUrl = default(string), + string voiceFallbackUrl = default(string), + string callConnectUrl = default(string), + string statusCallbackUrl = default(string), + string smsUrl = default(string), + string smsFallbackUrl = default(string) + ) { this.Alias = alias; + this.VoiceUrl = voiceUrl; + this.VoiceFallbackUrl = voiceFallbackUrl; + this.CallConnectUrl = callConnectUrl; + this.StatusCallbackUrl = statusCallbackUrl; + this.SmsUrl = smsUrl; + this.SmsFallbackUrl = smsFallbackUrl; } @@ -128,135 +142,39 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the ApplicationRequest instance. + /// Retrieve the KVP Dictionary for the ApplicationRequest instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("alias", Alias); - props.Add("voiceUrl", VoiceUrl); - props.Add("voiceFallbackUrl", VoiceFallbackUrl); - props.Add("callConnectUrl", CallConnectUrl); - props.Add("statusCallbackUrl", StatusCallbackUrl); - props.Add("smsUrl", SmsUrl); - props.Add("smsFallbackUrl", SmsFallbackUrl); + props.Add("alias", Alias); + props.Add("voiceUrl", VoiceUrl); + props.Add("voiceFallbackUrl", VoiceFallbackUrl); + props.Add("callConnectUrl", CallConnectUrl); + props.Add("statusCallbackUrl", StatusCallbackUrl); + props.Add("smsUrl", SmsUrl); + props.Add("smsFallbackUrl", SmsFallbackUrl); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApplicationRequest); - } - - /// - /// Returns true if ApplicationRequest instances are equal - /// - /// Instance of ApplicationRequest to be compared - /// Boolean - public bool Equals(ApplicationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.VoiceUrl == input.VoiceUrl || - (this.VoiceUrl != null && - this.VoiceUrl.Equals(input.VoiceUrl)) - ) && - ( - this.VoiceFallbackUrl == input.VoiceFallbackUrl || - (this.VoiceFallbackUrl != null && - this.VoiceFallbackUrl.Equals(input.VoiceFallbackUrl)) - ) && - ( - this.CallConnectUrl == input.CallConnectUrl || - (this.CallConnectUrl != null && - this.CallConnectUrl.Equals(input.CallConnectUrl)) - ) && - ( - this.StatusCallbackUrl == input.StatusCallbackUrl || - (this.StatusCallbackUrl != null && - this.StatusCallbackUrl.Equals(input.StatusCallbackUrl)) - ) && - ( - this.SmsUrl == input.SmsUrl || - (this.SmsUrl != null && - this.SmsUrl.Equals(input.SmsUrl)) - ) && - ( - this.SmsFallbackUrl == input.SmsFallbackUrl || - (this.SmsFallbackUrl != null && - this.SmsFallbackUrl.Equals(input.SmsFallbackUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.VoiceUrl != null) - { - hashCode = (hashCode * 59) + this.VoiceUrl.GetHashCode(); - } - if (this.VoiceFallbackUrl != null) - { - hashCode = (hashCode * 59) + this.VoiceFallbackUrl.GetHashCode(); - } - if (this.CallConnectUrl != null) - { - hashCode = (hashCode * 59) + this.CallConnectUrl.GetHashCode(); - } - if (this.StatusCallbackUrl != null) - { - hashCode = (hashCode * 59) + this.StatusCallbackUrl.GetHashCode(); - } - if (this.SmsUrl != null) - { - hashCode = (hashCode * 59) + this.SmsUrl.GetHashCode(); - } - if (this.SmsFallbackUrl != null) - { - hashCode = (hashCode * 59) + this.SmsFallbackUrl.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/ApplicationResult.cs b/src/freeclimb/Model/ApplicationResult.cs index e6b0b020..b87718aa 100644 --- a/src/freeclimb/Model/ApplicationResult.cs +++ b/src/freeclimb/Model/ApplicationResult.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// ApplicationResult /// [DataContract(Name = "ApplicationResult")] - public partial class ApplicationResult : IEquatable, IValidatableObject + public partial class ApplicationResult : IValidatableObject { /// /// Initializes a new instance of the class. @@ -49,20 +49,46 @@ public partial class ApplicationResult : IEquatable, IValidat /// A URL to which FreeClimb will make a POST request when the Call ends to notify this app.. /// The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only.. /// The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only.. - public ApplicationResult(string uri = default(string), string dateCreated = default(string), string dateUpdated = default(string), int revision = default(int), string accountId = default(string), string applicationId = default(string), string alias = default(string), string voiceUrl = default(string), string voiceFallbackUrl = default(string), string callConnectUrl = default(string), string statusCallbackUrl = default(string), string smsUrl = default(string), string smsFallbackUrl = default(string)) + public ApplicationResult( + string uri = default(string), + string dateCreated = default(string), + string dateUpdated = default(string), + int revision = default(int), + string accountId = default(string), + string applicationId = default(string), + string alias = default(string), + string voiceUrl = default(string), + string voiceFallbackUrl = default(string), + string callConnectUrl = default(string), + string statusCallbackUrl = default(string), + string smsUrl = default(string), + string smsFallbackUrl = default(string) + ) { this.Uri = uri; + this.DateCreated = dateCreated; + this.DateUpdated = dateUpdated; + this.Revision = revision; + this.AccountId = accountId; + this.ApplicationId = applicationId; + this.Alias = alias; + this.VoiceUrl = voiceUrl; + this.VoiceFallbackUrl = voiceFallbackUrl; + this.CallConnectUrl = callConnectUrl; + this.StatusCallbackUrl = statusCallbackUrl; + this.SmsUrl = smsUrl; + this.SmsFallbackUrl = smsFallbackUrl; } @@ -188,191 +214,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the ApplicationResult instance. + /// Retrieve the KVP Dictionary for the ApplicationResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("uri", Uri); - props.Add("dateCreated", DateCreated); - props.Add("dateUpdated", DateUpdated); - props.Add("revision", Revision); - props.Add("accountId", AccountId); - props.Add("applicationId", ApplicationId); - props.Add("alias", Alias); - props.Add("voiceUrl", VoiceUrl); - props.Add("voiceFallbackUrl", VoiceFallbackUrl); - props.Add("callConnectUrl", CallConnectUrl); - props.Add("statusCallbackUrl", StatusCallbackUrl); - props.Add("smsUrl", SmsUrl); - props.Add("smsFallbackUrl", SmsFallbackUrl); + props.Add("uri", Uri); + props.Add("dateCreated", DateCreated); + props.Add("dateUpdated", DateUpdated); + props.Add("revision", Revision); + props.Add("accountId", AccountId); + props.Add("applicationId", ApplicationId); + props.Add("alias", Alias); + props.Add("voiceUrl", VoiceUrl); + props.Add("voiceFallbackUrl", VoiceFallbackUrl); + props.Add("callConnectUrl", CallConnectUrl); + props.Add("statusCallbackUrl", StatusCallbackUrl); + props.Add("smsUrl", SmsUrl); + props.Add("smsFallbackUrl", SmsFallbackUrl); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApplicationResult); - } - - /// - /// Returns true if ApplicationResult instances are equal - /// - /// Instance of ApplicationResult to be compared - /// Boolean - public bool Equals(ApplicationResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DateCreated == input.DateCreated || - (this.DateCreated != null && - this.DateCreated.Equals(input.DateCreated)) - ) && - ( - this.DateUpdated == input.DateUpdated || - (this.DateUpdated != null && - this.DateUpdated.Equals(input.DateUpdated)) - ) && - ( - this.Revision == input.Revision || - this.Revision.Equals(input.Revision) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.ApplicationId == input.ApplicationId || - (this.ApplicationId != null && - this.ApplicationId.Equals(input.ApplicationId)) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.VoiceUrl == input.VoiceUrl || - (this.VoiceUrl != null && - this.VoiceUrl.Equals(input.VoiceUrl)) - ) && - ( - this.VoiceFallbackUrl == input.VoiceFallbackUrl || - (this.VoiceFallbackUrl != null && - this.VoiceFallbackUrl.Equals(input.VoiceFallbackUrl)) - ) && - ( - this.CallConnectUrl == input.CallConnectUrl || - (this.CallConnectUrl != null && - this.CallConnectUrl.Equals(input.CallConnectUrl)) - ) && - ( - this.StatusCallbackUrl == input.StatusCallbackUrl || - (this.StatusCallbackUrl != null && - this.StatusCallbackUrl.Equals(input.StatusCallbackUrl)) - ) && - ( - this.SmsUrl == input.SmsUrl || - (this.SmsUrl != null && - this.SmsUrl.Equals(input.SmsUrl)) - ) && - ( - this.SmsFallbackUrl == input.SmsFallbackUrl || - (this.SmsFallbackUrl != null && - this.SmsFallbackUrl.Equals(input.SmsFallbackUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DateCreated != null) - { - hashCode = (hashCode * 59) + this.DateCreated.GetHashCode(); - } - if (this.DateUpdated != null) - { - hashCode = (hashCode * 59) + this.DateUpdated.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Revision.GetHashCode(); - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.ApplicationId != null) - { - hashCode = (hashCode * 59) + this.ApplicationId.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.VoiceUrl != null) - { - hashCode = (hashCode * 59) + this.VoiceUrl.GetHashCode(); - } - if (this.VoiceFallbackUrl != null) - { - hashCode = (hashCode * 59) + this.VoiceFallbackUrl.GetHashCode(); - } - if (this.CallConnectUrl != null) - { - hashCode = (hashCode * 59) + this.CallConnectUrl.GetHashCode(); - } - if (this.StatusCallbackUrl != null) - { - hashCode = (hashCode * 59) + this.StatusCallbackUrl.GetHashCode(); - } - if (this.SmsUrl != null) - { - hashCode = (hashCode * 59) + this.SmsUrl.GetHashCode(); - } - if (this.SmsFallbackUrl != null) - { - hashCode = (hashCode * 59) + this.SmsFallbackUrl.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/ApplicationResultAllOf.cs b/src/freeclimb/Model/ApplicationResultAllOf.cs deleted file mode 100644 index 65958e77..00000000 --- a/src/freeclimb/Model/ApplicationResultAllOf.cs +++ /dev/null @@ -1,302 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// ApplicationResultAllOf - /// - [DataContract(Name = "ApplicationResult_allOf")] - public partial class ApplicationResultAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// ID of the account that owns this phone number.. - /// 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.. - /// Description for this phone number. Typically the conventionally-formatted version of the phone number.. - /// The URL FreeClimb will request when a phone number assigned to this Application receives a Call. Used for inbound calls only.. - /// The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only.. - /// 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.. - /// A URL to which FreeClimb will make a POST request when the Call ends to notify this app.. - /// The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only.. - /// The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only.. - public ApplicationResultAllOf(string accountId = default(string), string applicationId = default(string), string alias = default(string), string voiceUrl = default(string), string voiceFallbackUrl = default(string), string callConnectUrl = default(string), string statusCallbackUrl = default(string), string smsUrl = default(string), string smsFallbackUrl = default(string)) - { - this.AccountId = accountId; - this.ApplicationId = applicationId; - this.Alias = alias; - this.VoiceUrl = voiceUrl; - this.VoiceFallbackUrl = voiceFallbackUrl; - this.CallConnectUrl = callConnectUrl; - this.StatusCallbackUrl = statusCallbackUrl; - this.SmsUrl = smsUrl; - this.SmsFallbackUrl = smsFallbackUrl; - } - - /// - /// ID of the account that owns this phone number. - /// - /// ID of the account that owns this phone number. - [DataMember(Name = "accountId", EmitDefaultValue = true)] - public string AccountId { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "applicationId", EmitDefaultValue = true)] - public string ApplicationId { get; set; } - - /// - /// Description for this phone number. Typically the conventionally-formatted version of the phone number. - /// - /// Description for this phone number. Typically the conventionally-formatted version of the phone number. - [DataMember(Name = "alias", EmitDefaultValue = true)] - public string Alias { get; set; } - - /// - /// The URL FreeClimb will request when a phone number assigned to this Application receives a Call. Used for inbound calls only. - /// - /// The URL FreeClimb will request when a phone number assigned to this Application receives a Call. Used for inbound calls only. - [DataMember(Name = "voiceUrl", EmitDefaultValue = true)] - public string VoiceUrl { get; set; } - - /// - /// The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only. - /// - /// The URL that FreeClimb will request if it times out waiting for a response from the voiceUrl. Used for inbound calls only. - [DataMember(Name = "voiceFallbackUrl", EmitDefaultValue = true)] - public string VoiceFallbackUrl { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "callConnectUrl", EmitDefaultValue = true)] - public string CallConnectUrl { get; set; } - - /// - /// A URL to which FreeClimb will make a POST request when the Call ends to notify this app. - /// - /// A URL to which FreeClimb will make a POST request when the Call ends to notify this app. - [DataMember(Name = "statusCallbackUrl", EmitDefaultValue = true)] - public string StatusCallbackUrl { get; set; } - - /// - /// The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only. - /// - /// The URL FreeClimb will request when a phone number assigned to this Application receives an incoming SMS message. Used for inbound SMS only. - [DataMember(Name = "smsUrl", EmitDefaultValue = true)] - public string SmsUrl { get; set; } - - /// - /// The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only. - /// - /// The URL that FreeClimb will request if it times out waiting for a response from the smsUrl. Used for inbound SMS only. - [DataMember(Name = "smsFallbackUrl", EmitDefaultValue = true)] - public string SmsFallbackUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ApplicationResultAllOf {\n"); - sb.Append(" AccountId: ").Append(AccountId).Append("\n"); - sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" VoiceUrl: ").Append(VoiceUrl).Append("\n"); - sb.Append(" VoiceFallbackUrl: ").Append(VoiceFallbackUrl).Append("\n"); - sb.Append(" CallConnectUrl: ").Append(CallConnectUrl).Append("\n"); - sb.Append(" StatusCallbackUrl: ").Append(StatusCallbackUrl).Append("\n"); - sb.Append(" SmsUrl: ").Append(SmsUrl).Append("\n"); - sb.Append(" SmsFallbackUrl: ").Append(SmsFallbackUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the ApplicationResultAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("accountId", AccountId); - props.Add("applicationId", ApplicationId); - props.Add("alias", Alias); - props.Add("voiceUrl", VoiceUrl); - props.Add("voiceFallbackUrl", VoiceFallbackUrl); - props.Add("callConnectUrl", CallConnectUrl); - props.Add("statusCallbackUrl", StatusCallbackUrl); - props.Add("smsUrl", SmsUrl); - props.Add("smsFallbackUrl", SmsFallbackUrl); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApplicationResultAllOf); - } - - /// - /// Returns true if ApplicationResultAllOf instances are equal - /// - /// Instance of ApplicationResultAllOf to be compared - /// Boolean - public bool Equals(ApplicationResultAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.ApplicationId == input.ApplicationId || - (this.ApplicationId != null && - this.ApplicationId.Equals(input.ApplicationId)) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.VoiceUrl == input.VoiceUrl || - (this.VoiceUrl != null && - this.VoiceUrl.Equals(input.VoiceUrl)) - ) && - ( - this.VoiceFallbackUrl == input.VoiceFallbackUrl || - (this.VoiceFallbackUrl != null && - this.VoiceFallbackUrl.Equals(input.VoiceFallbackUrl)) - ) && - ( - this.CallConnectUrl == input.CallConnectUrl || - (this.CallConnectUrl != null && - this.CallConnectUrl.Equals(input.CallConnectUrl)) - ) && - ( - this.StatusCallbackUrl == input.StatusCallbackUrl || - (this.StatusCallbackUrl != null && - this.StatusCallbackUrl.Equals(input.StatusCallbackUrl)) - ) && - ( - this.SmsUrl == input.SmsUrl || - (this.SmsUrl != null && - this.SmsUrl.Equals(input.SmsUrl)) - ) && - ( - this.SmsFallbackUrl == input.SmsFallbackUrl || - (this.SmsFallbackUrl != null && - this.SmsFallbackUrl.Equals(input.SmsFallbackUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.ApplicationId != null) - { - hashCode = (hashCode * 59) + this.ApplicationId.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.VoiceUrl != null) - { - hashCode = (hashCode * 59) + this.VoiceUrl.GetHashCode(); - } - if (this.VoiceFallbackUrl != null) - { - hashCode = (hashCode * 59) + this.VoiceFallbackUrl.GetHashCode(); - } - if (this.CallConnectUrl != null) - { - hashCode = (hashCode * 59) + this.CallConnectUrl.GetHashCode(); - } - if (this.StatusCallbackUrl != null) - { - hashCode = (hashCode * 59) + this.StatusCallbackUrl.GetHashCode(); - } - if (this.SmsUrl != null) - { - hashCode = (hashCode * 59) + this.SmsUrl.GetHashCode(); - } - if (this.SmsFallbackUrl != null) - { - hashCode = (hashCode * 59) + this.SmsFallbackUrl.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/AvailableNumber.cs b/src/freeclimb/Model/AvailableNumber.cs index 39e14a93..b61f3b2c 100644 --- a/src/freeclimb/Model/AvailableNumber.cs +++ b/src/freeclimb/Model/AvailableNumber.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// AvailableNumber /// [DataContract(Name = "AvailableNumber")] - public partial class AvailableNumber : IEquatable, IValidatableObject + public partial class AvailableNumber : IValidatableObject { /// /// Initializes a new instance of the class. @@ -43,14 +43,28 @@ public partial class AvailableNumber : IEquatable, IValidatable /// Indicates whether the phone number can send and receive SMS messages.. /// The state or province of this phone number.. /// The country of this phone number.. - public AvailableNumber(Capabilities capabilities = default(Capabilities), string campaignId = default(string), string phoneNumber = default(string), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), string region = default(string), string country = default(string)) + public AvailableNumber( + Capabilities capabilities = default(Capabilities), + string campaignId = default(string), + string phoneNumber = default(string), + bool? voiceEnabled = default(bool?), + bool? smsEnabled = default(bool?), + string region = default(string), + string country = default(string) + ) { this.Capabilities = capabilities; + this.CampaignId = campaignId; + this.PhoneNumber = phoneNumber; + this.VoiceEnabled = voiceEnabled; + this.SmsEnabled = smsEnabled; + this.Region = region; + this.Country = country; } @@ -129,135 +143,39 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the AvailableNumber instance. + /// Retrieve the KVP Dictionary for the AvailableNumber instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("capabilities", Capabilities); - props.Add("campaignId", CampaignId); - props.Add("phoneNumber", PhoneNumber); - props.Add("voiceEnabled", VoiceEnabled); - props.Add("smsEnabled", SmsEnabled); - props.Add("region", Region); - props.Add("country", Country); + props.Add("capabilities", Capabilities); + props.Add("campaignId", CampaignId); + props.Add("phoneNumber", PhoneNumber); + props.Add("voiceEnabled", VoiceEnabled); + props.Add("smsEnabled", SmsEnabled); + props.Add("region", Region); + props.Add("country", Country); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AvailableNumber); - } - - /// - /// Returns true if AvailableNumber instances are equal - /// - /// Instance of AvailableNumber to be compared - /// Boolean - public bool Equals(AvailableNumber input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - (this.Capabilities != null && - this.Capabilities.Equals(input.Capabilities)) - ) && - ( - this.CampaignId == input.CampaignId || - (this.CampaignId != null && - this.CampaignId.Equals(input.CampaignId)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.VoiceEnabled == input.VoiceEnabled || - (this.VoiceEnabled != null && - this.VoiceEnabled.Equals(input.VoiceEnabled)) - ) && - ( - this.SmsEnabled == input.SmsEnabled || - (this.SmsEnabled != null && - this.SmsEnabled.Equals(input.SmsEnabled)) - ) && - ( - this.Region == input.Region || - (this.Region != null && - this.Region.Equals(input.Region)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Capabilities != null) - { - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - } - if (this.CampaignId != null) - { - hashCode = (hashCode * 59) + this.CampaignId.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.VoiceEnabled != null) - { - hashCode = (hashCode * 59) + this.VoiceEnabled.GetHashCode(); - } - if (this.SmsEnabled != null) - { - hashCode = (hashCode * 59) + this.SmsEnabled.GetHashCode(); - } - if (this.Region != null) - { - hashCode = (hashCode * 59) + this.Region.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/AvailableNumberList.cs b/src/freeclimb/Model/AvailableNumberList.cs index 719e59a4..2abbef94 100644 --- a/src/freeclimb/Model/AvailableNumberList.cs +++ b/src/freeclimb/Model/AvailableNumberList.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// AvailableNumberList /// [DataContract(Name = "AvailableNumberList")] - public partial class AvailableNumberList : IPagination, IEquatable, IValidatableObject + public partial class AvailableNumberList : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,31 @@ public partial class AvailableNumberList : IPagination, IEquatableNumber of items per page. /// Uri to retrieve the next page of items. /// availablePhoneNumbers. - public AvailableNumberList(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List availablePhoneNumbers = default(List)) + public AvailableNumberList( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List availablePhoneNumbers = default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.AvailablePhoneNumbers = availablePhoneNumbers; } @@ -138,151 +154,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the AvailableNumberList instance. + /// Retrieve the KVP Dictionary for the AvailableNumberList instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in AvailablePhoneNumbers) { nested.Add(item); } - props.Add("availablePhoneNumbers", nested); + props.Add("availablePhoneNumbers", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AvailableNumberList); - } - - /// - /// Returns true if AvailableNumberList instances are equal - /// - /// Instance of AvailableNumberList to be compared - /// Boolean - public bool Equals(AvailableNumberList input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.AvailablePhoneNumbers == input.AvailablePhoneNumbers || - this.AvailablePhoneNumbers != null && - input.AvailablePhoneNumbers != null && - this.AvailablePhoneNumbers.SequenceEqual(input.AvailablePhoneNumbers) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.AvailablePhoneNumbers != null) - { - hashCode = (hashCode * 59) + this.AvailablePhoneNumbers.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/AvailableNumberListAllOf.cs b/src/freeclimb/Model/AvailableNumberListAllOf.cs deleted file mode 100644 index 6565c809..00000000 --- a/src/freeclimb/Model/AvailableNumberListAllOf.cs +++ /dev/null @@ -1,147 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// AvailableNumberListAllOf - /// - [DataContract(Name = "AvailableNumberList_allOf")] - public partial class AvailableNumberListAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// availablePhoneNumbers. - public AvailableNumberListAllOf(List availablePhoneNumbers = default(List)) - { - this.AvailablePhoneNumbers = availablePhoneNumbers; - } - - /// - /// Gets or Sets AvailablePhoneNumbers - /// - [DataMember(Name = "availablePhoneNumbers", EmitDefaultValue = true)] - public List AvailablePhoneNumbers { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AvailableNumberListAllOf {\n"); - sb.Append(" AvailablePhoneNumbers: ").Append(AvailablePhoneNumbers).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the AvailableNumberListAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in AvailablePhoneNumbers) - { - nested.Add(item); - } - props.Add("availablePhoneNumbers", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AvailableNumberListAllOf); - } - - /// - /// Returns true if AvailableNumberListAllOf instances are equal - /// - /// Instance of AvailableNumberListAllOf to be compared - /// Boolean - public bool Equals(AvailableNumberListAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.AvailablePhoneNumbers == input.AvailablePhoneNumbers || - this.AvailablePhoneNumbers != null && - input.AvailablePhoneNumbers != null && - this.AvailablePhoneNumbers.SequenceEqual(input.AvailablePhoneNumbers) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AvailablePhoneNumbers != null) - { - hashCode = (hashCode * 59) + this.AvailablePhoneNumbers.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/BuyIncomingNumberRequest.cs b/src/freeclimb/Model/BuyIncomingNumberRequest.cs index bbf8ec82..80f4ba1c 100644 --- a/src/freeclimb/Model/BuyIncomingNumberRequest.cs +++ b/src/freeclimb/Model/BuyIncomingNumberRequest.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,27 +31,37 @@ namespace freeclimb.Model /// BuyIncomingNumberRequest /// [DataContract(Name = "BuyIncomingNumberRequest")] - public partial class BuyIncomingNumberRequest : IEquatable, IValidatableObject + public partial class BuyIncomingNumberRequest : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected BuyIncomingNumberRequest() { } + /// /// Initializes a new instance of the class. /// /// Phone number to purchase in E.164 format (as returned in the list of Available Phone Numbers). (required). /// Description for this new incoming phone number (max 64 characters).. /// ID of the application that should handle phone calls to the number.. - public BuyIncomingNumberRequest(string phoneNumber = default(string), string alias = default(string), string applicationId = default(string)) + public BuyIncomingNumberRequest( + string phoneNumber = default(string), + string alias = default(string), + string applicationId = default(string) + ) { // to ensure "phoneNumber" is required (not null) - if (phoneNumber == null) { - throw new ArgumentNullException("phoneNumber is a required property for BuyIncomingNumberRequest and cannot be null"); + if (phoneNumber == null) + { + throw new ArgumentNullException( + "phoneNumber is a required property for BuyIncomingNumberRequest and cannot be null" + ); } this.PhoneNumber = phoneNumber; + this.Alias = alias; + this.ApplicationId = applicationId; } @@ -59,7 +69,7 @@ protected BuyIncomingNumberRequest() { } /// Phone number to purchase in E.164 format (as returned in the list of Available Phone Numbers). /// /// Phone number to purchase in E.164 format (as returned in the list of Available Phone Numbers). - [DataMember(Name = "phoneNumber", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "phoneNumber", IsRequired = true, EmitDefaultValue = true)] public string PhoneNumber { get; set; } /// @@ -97,95 +107,35 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the BuyIncomingNumberRequest instance. + /// Retrieve the KVP Dictionary for the BuyIncomingNumberRequest instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("phoneNumber", PhoneNumber); - props.Add("alias", Alias); - props.Add("applicationId", ApplicationId); + props.Add("phoneNumber", PhoneNumber); + props.Add("alias", Alias); + props.Add("applicationId", ApplicationId); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BuyIncomingNumberRequest); - } - - /// - /// Returns true if BuyIncomingNumberRequest instances are equal - /// - /// Instance of BuyIncomingNumberRequest to be compared - /// Boolean - public bool Equals(BuyIncomingNumberRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.ApplicationId == input.ApplicationId || - (this.ApplicationId != null && - this.ApplicationId.Equals(input.ApplicationId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.ApplicationId != null) - { - hashCode = (hashCode * 59) + this.ApplicationId.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/CallControlWebhook.cs b/src/freeclimb/Model/CallControlWebhook.cs new file mode 100644 index 00000000..3b6c18cc --- /dev/null +++ b/src/freeclimb/Model/CallControlWebhook.cs @@ -0,0 +1,192 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// 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. + /// + [DataContract(Name = "CallControlWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class CallControlWebhook : Webhook, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Context or reason why this request is being made. Will be callControl. (default to "CallControlWebhook"). + /// Unique ID for this Call, generated by FreeClimb.. + /// Account ID associated with your account.. + /// Unique ID of the Conference.. + /// String of digits entered by the participant.. + public CallControlWebhook( + string requestType = @"CallControlWebhook", + string callId = default(string), + string accountId = default(string), + string conferenceId = default(string), + string digits = default(string) + ) + : base() + { + base.RequestType = requestType; + + this.CallId = callId; + + this.AccountId = accountId; + + this.ConferenceId = conferenceId; + + this.Digits = digits; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance CallControlWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static CallControlWebhook Deserialize(string jsonPayload) + { + return (CallControlWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(CallControlWebhook), + _serializerSettings + ); + } + + /// + /// Unique ID for this Call, generated by FreeClimb. + /// + /// Unique ID for this Call, generated by FreeClimb. + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Unique ID of the Conference. + /// + /// Unique ID of the Conference. + [DataMember(Name = "conferenceId", EmitDefaultValue = false)] + public string ConferenceId { get; set; } + + /// + /// String of digits entered by the participant. + /// + /// String of digits entered by the participant. + [DataMember(Name = "digits", EmitDefaultValue = false)] + public string Digits { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CallControlWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" Digits: ").Append(Digits).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the CallControlWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("callId", CallId); + props.Add("accountId", AccountId); + props.Add("conferenceId", ConferenceId); + props.Add("digits", Digits); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/CallList.cs b/src/freeclimb/Model/CallList.cs index c4d3ba15..5be75bb8 100644 --- a/src/freeclimb/Model/CallList.cs +++ b/src/freeclimb/Model/CallList.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// CallList /// [DataContract(Name = "CallList")] - public partial class CallList : IPagination, IEquatable, IValidatableObject + public partial class CallList : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,31 @@ public partial class CallList : IPagination, IEquatable, IValidatableO /// Number of items per page. /// Uri to retrieve the next page of items. /// calls. - public CallList(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List calls = default(List)) + public CallList( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List calls = default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.Calls = calls; } @@ -138,151 +154,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the CallList instance. + /// Retrieve the KVP Dictionary for the CallList instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in Calls) { nested.Add(item); } - props.Add("calls", nested); + props.Add("calls", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CallList); - } - - /// - /// Returns true if CallList instances are equal - /// - /// Instance of CallList to be compared - /// Boolean - public bool Equals(CallList input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.Calls == input.Calls || - this.Calls != null && - input.Calls != null && - this.Calls.SequenceEqual(input.Calls) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.Calls != null) - { - hashCode = (hashCode * 59) + this.Calls.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/CallListAllOf.cs b/src/freeclimb/Model/CallListAllOf.cs deleted file mode 100644 index 15df08dc..00000000 --- a/src/freeclimb/Model/CallListAllOf.cs +++ /dev/null @@ -1,147 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// CallListAllOf - /// - [DataContract(Name = "CallList_allOf")] - public partial class CallListAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// calls. - public CallListAllOf(List calls = default(List)) - { - this.Calls = calls; - } - - /// - /// Gets or Sets Calls - /// - [DataMember(Name = "calls", EmitDefaultValue = true)] - public List Calls { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CallListAllOf {\n"); - sb.Append(" Calls: ").Append(Calls).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the CallListAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in Calls) - { - nested.Add(item); - } - props.Add("calls", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CallListAllOf); - } - - /// - /// Returns true if CallListAllOf instances are equal - /// - /// Instance of CallListAllOf to be compared - /// Boolean - public bool Equals(CallListAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Calls == input.Calls || - this.Calls != null && - input.Calls != null && - this.Calls.SequenceEqual(input.Calls) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Calls != null) - { - hashCode = (hashCode * 59) + this.Calls.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/CallResult.cs b/src/freeclimb/Model/CallResult.cs index 4ac90ef1..08cf1c4b 100644 --- a/src/freeclimb/Model/CallResult.cs +++ b/src/freeclimb/Model/CallResult.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,9 +31,8 @@ namespace freeclimb.Model /// CallResult /// [DataContract(Name = "CallResult")] - public partial class CallResult : IEquatable, IValidatableObject + public partial class CallResult : IValidatableObject { - /// /// Gets or Sets CallStatus /// @@ -51,6 +50,7 @@ public partial class CallResult : IEquatable, IValidatableObject /// [DataMember(Name = "answeredBy", EmitDefaultValue = true)] public AnsweredBy? AnsweredBy { get; set; } + /// /// Initializes a new instance of the class. /// @@ -74,27 +74,67 @@ public partial class CallResult : IEquatable, IValidatableObject /// answeredBy. /// The list of subresources for this Call. These include things like logs and recordings associated with the Call.. /// ApplicationId associated with the Call.. - public CallResult(string uri = default(string), string dateCreated = default(string), string dateUpdated = default(string), int revision = default(int), string callId = default(string), string parentCallId = default(string), string accountId = default(string), string from = default(string), string to = default(string), string phoneNumberId = default(string), CallStatus? callStatus = default(CallStatus?), string startTime = default(string), string connectTime = default(string), string endTime = default(string), int? duration = default(int?), int? connectDuration = default(int?), CallDirection? direction = default(CallDirection?), AnsweredBy? answeredBy = default(AnsweredBy?), Object subresourceUris = default(Object), string applicationId = default(string)) + public CallResult( + string uri = default(string), + string dateCreated = default(string), + string dateUpdated = default(string), + int revision = default(int), + string callId = default(string), + string parentCallId = default(string), + string accountId = default(string), + string from = default(string), + string to = default(string), + string phoneNumberId = default(string), + CallStatus? callStatus = default(CallStatus?), + string startTime = default(string), + string connectTime = default(string), + string endTime = default(string), + int? duration = default(int?), + int? connectDuration = default(int?), + CallDirection? direction = default(CallDirection?), + AnsweredBy? answeredBy = default(AnsweredBy?), + Object subresourceUris = default(Object), + string applicationId = default(string) + ) { this.Uri = uri; + this.DateCreated = dateCreated; + this.DateUpdated = dateUpdated; + this.Revision = revision; + this.CallId = callId; + this.ParentCallId = parentCallId; + this.AccountId = accountId; + this.From = from; + this.To = to; + this.PhoneNumberId = phoneNumberId; + this.CallStatus = callStatus; + this.StartTime = startTime; + this.ConnectTime = connectTime; + this.EndTime = endTime; + this.Duration = duration; + this.ConnectDuration = connectDuration; + this.Direction = direction; + this.AnsweredBy = answeredBy; + this.SubresourceUris = subresourceUris; + this.ApplicationId = applicationId; } @@ -255,249 +295,52 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the CallResult instance. + /// Retrieve the KVP Dictionary for the CallResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("uri", Uri); - props.Add("dateCreated", DateCreated); - props.Add("dateUpdated", DateUpdated); - props.Add("revision", Revision); - props.Add("callId", CallId); - props.Add("parentCallId", ParentCallId); - props.Add("accountId", AccountId); - props.Add("from", From); - props.Add("to", To); - props.Add("phoneNumberId", PhoneNumberId); - props.Add("callStatus", CallStatus); - props.Add("startTime", StartTime); - props.Add("connectTime", ConnectTime); - props.Add("endTime", EndTime); - props.Add("duration", Duration); - props.Add("connectDuration", ConnectDuration); - props.Add("direction", Direction); - props.Add("answeredBy", AnsweredBy); - props.Add("subresourceUris", SubresourceUris); - props.Add("applicationId", ApplicationId); + props.Add("uri", Uri); + props.Add("dateCreated", DateCreated); + props.Add("dateUpdated", DateUpdated); + props.Add("revision", Revision); + props.Add("callId", CallId); + props.Add("parentCallId", ParentCallId); + props.Add("accountId", AccountId); + props.Add("from", From); + props.Add("to", To); + props.Add("phoneNumberId", PhoneNumberId); + props.Add("callStatus", CallStatus); + props.Add("startTime", StartTime); + props.Add("connectTime", ConnectTime); + props.Add("endTime", EndTime); + props.Add("duration", Duration); + props.Add("connectDuration", ConnectDuration); + props.Add("direction", Direction); + props.Add("answeredBy", AnsweredBy); + props.Add("subresourceUris", SubresourceUris); + props.Add("applicationId", ApplicationId); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CallResult); - } - - /// - /// Returns true if CallResult instances are equal - /// - /// Instance of CallResult to be compared - /// Boolean - public bool Equals(CallResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DateCreated == input.DateCreated || - (this.DateCreated != null && - this.DateCreated.Equals(input.DateCreated)) - ) && - ( - this.DateUpdated == input.DateUpdated || - (this.DateUpdated != null && - this.DateUpdated.Equals(input.DateUpdated)) - ) && - ( - this.Revision == input.Revision || - this.Revision.Equals(input.Revision) - ) && - ( - this.CallId == input.CallId || - (this.CallId != null && - this.CallId.Equals(input.CallId)) - ) && - ( - this.ParentCallId == input.ParentCallId || - (this.ParentCallId != null && - this.ParentCallId.Equals(input.ParentCallId)) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && - ( - this.To == input.To || - (this.To != null && - this.To.Equals(input.To)) - ) && - ( - this.PhoneNumberId == input.PhoneNumberId || - (this.PhoneNumberId != null && - this.PhoneNumberId.Equals(input.PhoneNumberId)) - ) && - ( - this.CallStatus == input.CallStatus || - this.CallStatus.Equals(input.CallStatus) - ) && - ( - this.StartTime == input.StartTime || - (this.StartTime != null && - this.StartTime.Equals(input.StartTime)) - ) && - ( - this.ConnectTime == input.ConnectTime || - (this.ConnectTime != null && - this.ConnectTime.Equals(input.ConnectTime)) - ) && - ( - this.EndTime == input.EndTime || - (this.EndTime != null && - this.EndTime.Equals(input.EndTime)) - ) && - ( - this.Duration == input.Duration || - (this.Duration != null && - this.Duration.Equals(input.Duration)) - ) && - ( - this.ConnectDuration == input.ConnectDuration || - (this.ConnectDuration != null && - this.ConnectDuration.Equals(input.ConnectDuration)) - ) && - ( - this.Direction == input.Direction || - this.Direction.Equals(input.Direction) - ) && - ( - this.AnsweredBy == input.AnsweredBy || - this.AnsweredBy.Equals(input.AnsweredBy) - ) && - ( - this.SubresourceUris == input.SubresourceUris || - (this.SubresourceUris != null && - this.SubresourceUris.Equals(input.SubresourceUris)) - ) && - ( - this.ApplicationId == input.ApplicationId || - (this.ApplicationId != null && - this.ApplicationId.Equals(input.ApplicationId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DateCreated != null) - { - hashCode = (hashCode * 59) + this.DateCreated.GetHashCode(); - } - if (this.DateUpdated != null) - { - hashCode = (hashCode * 59) + this.DateUpdated.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Revision.GetHashCode(); - if (this.CallId != null) - { - hashCode = (hashCode * 59) + this.CallId.GetHashCode(); - } - if (this.ParentCallId != null) - { - hashCode = (hashCode * 59) + this.ParentCallId.GetHashCode(); - } - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.From != null) - { - hashCode = (hashCode * 59) + this.From.GetHashCode(); - } - if (this.To != null) - { - hashCode = (hashCode * 59) + this.To.GetHashCode(); - } - if (this.PhoneNumberId != null) - { - hashCode = (hashCode * 59) + this.PhoneNumberId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CallStatus.GetHashCode(); - if (this.StartTime != null) - { - hashCode = (hashCode * 59) + this.StartTime.GetHashCode(); - } - if (this.ConnectTime != null) - { - hashCode = (hashCode * 59) + this.ConnectTime.GetHashCode(); - } - if (this.EndTime != null) - { - hashCode = (hashCode * 59) + this.EndTime.GetHashCode(); - } - if (this.Duration != null) - { - hashCode = (hashCode * 59) + this.Duration.GetHashCode(); - } - if (this.ConnectDuration != null) - { - hashCode = (hashCode * 59) + this.ConnectDuration.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Direction.GetHashCode(); - hashCode = (hashCode * 59) + this.AnsweredBy.GetHashCode(); - if (this.SubresourceUris != null) - { - hashCode = (hashCode * 59) + this.SubresourceUris.GetHashCode(); - } - if (this.ApplicationId != null) - { - hashCode = (hashCode * 59) + this.ApplicationId.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/CallResultAllOf.cs b/src/freeclimb/Model/CallResultAllOf.cs deleted file mode 100644 index a6e7e1c4..00000000 --- a/src/freeclimb/Model/CallResultAllOf.cs +++ /dev/null @@ -1,427 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// CallResultAllOf - /// - [DataContract(Name = "CallResult_allOf")] - public partial class CallResultAllOf : IEquatable, IValidatableObject - { - - /// - /// Gets or Sets CallStatus - /// - [DataMember(Name = "callStatus", EmitDefaultValue = true)] - public CallStatus? CallStatus { get; set; } - - /// - /// Gets or Sets Direction - /// - [DataMember(Name = "direction", EmitDefaultValue = true)] - public CallDirection? Direction { get; set; } - - /// - /// Gets or Sets AnsweredBy - /// - [DataMember(Name = "answeredBy", EmitDefaultValue = true)] - public AnsweredBy? AnsweredBy { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// String that uniquely identifies this Call resource.. - /// ID of the Call that created this leg (child Call).. - /// ID of the account that owns this Call.. - /// Phone number that initiated this Call.. - /// Phone number that received this Call.. - /// 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).. - /// callStatus. - /// 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.. - /// 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.. - /// 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.. - /// Total length of the Call in seconds. Measures time between startTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls.. - /// 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.. - /// direction. - /// answeredBy. - /// The list of subresources for this Call. These include things like logs and recordings associated with the Call.. - /// ApplicationId associated with the Call.. - public CallResultAllOf(string callId = default(string), string parentCallId = default(string), string accountId = default(string), string from = default(string), string to = default(string), string phoneNumberId = default(string), CallStatus? callStatus = default(CallStatus?), string startTime = default(string), string connectTime = default(string), string endTime = default(string), int? duration = default(int?), int? connectDuration = default(int?), CallDirection? direction = default(CallDirection?), AnsweredBy? answeredBy = default(AnsweredBy?), Object subresourceUris = default(Object), string applicationId = default(string)) - { - this.CallId = callId; - this.ParentCallId = parentCallId; - this.AccountId = accountId; - this.From = from; - this.To = to; - this.PhoneNumberId = phoneNumberId; - this.CallStatus = callStatus; - this.StartTime = startTime; - this.ConnectTime = connectTime; - this.EndTime = endTime; - this.Duration = duration; - this.ConnectDuration = connectDuration; - this.Direction = direction; - this.AnsweredBy = answeredBy; - this.SubresourceUris = subresourceUris; - this.ApplicationId = applicationId; - } - - /// - /// String that uniquely identifies this Call resource. - /// - /// String that uniquely identifies this Call resource. - [DataMember(Name = "callId", EmitDefaultValue = true)] - public string CallId { get; set; } - - /// - /// ID of the Call that created this leg (child Call). - /// - /// ID of the Call that created this leg (child Call). - [DataMember(Name = "parentCallId", EmitDefaultValue = true)] - public string ParentCallId { get; set; } - - /// - /// ID of the account that owns this Call. - /// - /// ID of the account that owns this Call. - [DataMember(Name = "accountId", EmitDefaultValue = true)] - public string AccountId { get; set; } - - /// - /// Phone number that initiated this Call. - /// - /// Phone number that initiated this Call. - [DataMember(Name = "from", EmitDefaultValue = true)] - public string From { get; set; } - - /// - /// Phone number that received this Call. - /// - /// Phone number that received this Call. - [DataMember(Name = "to", EmitDefaultValue = true)] - public string To { get; set; } - - /// - /// 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). - /// - /// 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). - [DataMember(Name = "phoneNumberId", EmitDefaultValue = true)] - public string PhoneNumberId { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "startTime", EmitDefaultValue = true)] - public string StartTime { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "connectTime", EmitDefaultValue = true)] - public string ConnectTime { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "endTime", EmitDefaultValue = true)] - public string EndTime { get; set; } - - /// - /// Total length of the Call in seconds. Measures time between startTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls. - /// - /// Total length of the Call in seconds. Measures time between startTime and endTime. This value is empty for busy, failed, unanswered or ongoing Calls. - [DataMember(Name = "duration", EmitDefaultValue = true)] - public int? Duration { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "connectDuration", EmitDefaultValue = true)] - public int? ConnectDuration { get; set; } - - /// - /// The list of subresources for this Call. These include things like logs and recordings associated with the Call. - /// - /// The list of subresources for this Call. These include things like logs and recordings associated with the Call. - [DataMember(Name = "subresourceUris", EmitDefaultValue = true)] - public Object SubresourceUris { get; set; } - - /// - /// ApplicationId associated with the Call. - /// - /// ApplicationId associated with the Call. - [DataMember(Name = "applicationId", EmitDefaultValue = true)] - public string ApplicationId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CallResultAllOf {\n"); - sb.Append(" CallId: ").Append(CallId).Append("\n"); - sb.Append(" ParentCallId: ").Append(ParentCallId).Append("\n"); - sb.Append(" AccountId: ").Append(AccountId).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" To: ").Append(To).Append("\n"); - sb.Append(" PhoneNumberId: ").Append(PhoneNumberId).Append("\n"); - sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); - sb.Append(" StartTime: ").Append(StartTime).Append("\n"); - sb.Append(" ConnectTime: ").Append(ConnectTime).Append("\n"); - sb.Append(" EndTime: ").Append(EndTime).Append("\n"); - sb.Append(" Duration: ").Append(Duration).Append("\n"); - sb.Append(" ConnectDuration: ").Append(ConnectDuration).Append("\n"); - sb.Append(" Direction: ").Append(Direction).Append("\n"); - sb.Append(" AnsweredBy: ").Append(AnsweredBy).Append("\n"); - sb.Append(" SubresourceUris: ").Append(SubresourceUris).Append("\n"); - sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the CallResultAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("callId", CallId); - props.Add("parentCallId", ParentCallId); - props.Add("accountId", AccountId); - props.Add("from", From); - props.Add("to", To); - props.Add("phoneNumberId", PhoneNumberId); - props.Add("callStatus", CallStatus); - props.Add("startTime", StartTime); - props.Add("connectTime", ConnectTime); - props.Add("endTime", EndTime); - props.Add("duration", Duration); - props.Add("connectDuration", ConnectDuration); - props.Add("direction", Direction); - props.Add("answeredBy", AnsweredBy); - props.Add("subresourceUris", SubresourceUris); - props.Add("applicationId", ApplicationId); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CallResultAllOf); - } - - /// - /// Returns true if CallResultAllOf instances are equal - /// - /// Instance of CallResultAllOf to be compared - /// Boolean - public bool Equals(CallResultAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.CallId == input.CallId || - (this.CallId != null && - this.CallId.Equals(input.CallId)) - ) && - ( - this.ParentCallId == input.ParentCallId || - (this.ParentCallId != null && - this.ParentCallId.Equals(input.ParentCallId)) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && - ( - this.To == input.To || - (this.To != null && - this.To.Equals(input.To)) - ) && - ( - this.PhoneNumberId == input.PhoneNumberId || - (this.PhoneNumberId != null && - this.PhoneNumberId.Equals(input.PhoneNumberId)) - ) && - ( - this.CallStatus == input.CallStatus || - this.CallStatus.Equals(input.CallStatus) - ) && - ( - this.StartTime == input.StartTime || - (this.StartTime != null && - this.StartTime.Equals(input.StartTime)) - ) && - ( - this.ConnectTime == input.ConnectTime || - (this.ConnectTime != null && - this.ConnectTime.Equals(input.ConnectTime)) - ) && - ( - this.EndTime == input.EndTime || - (this.EndTime != null && - this.EndTime.Equals(input.EndTime)) - ) && - ( - this.Duration == input.Duration || - (this.Duration != null && - this.Duration.Equals(input.Duration)) - ) && - ( - this.ConnectDuration == input.ConnectDuration || - (this.ConnectDuration != null && - this.ConnectDuration.Equals(input.ConnectDuration)) - ) && - ( - this.Direction == input.Direction || - this.Direction.Equals(input.Direction) - ) && - ( - this.AnsweredBy == input.AnsweredBy || - this.AnsweredBy.Equals(input.AnsweredBy) - ) && - ( - this.SubresourceUris == input.SubresourceUris || - (this.SubresourceUris != null && - this.SubresourceUris.Equals(input.SubresourceUris)) - ) && - ( - this.ApplicationId == input.ApplicationId || - (this.ApplicationId != null && - this.ApplicationId.Equals(input.ApplicationId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CallId != null) - { - hashCode = (hashCode * 59) + this.CallId.GetHashCode(); - } - if (this.ParentCallId != null) - { - hashCode = (hashCode * 59) + this.ParentCallId.GetHashCode(); - } - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.From != null) - { - hashCode = (hashCode * 59) + this.From.GetHashCode(); - } - if (this.To != null) - { - hashCode = (hashCode * 59) + this.To.GetHashCode(); - } - if (this.PhoneNumberId != null) - { - hashCode = (hashCode * 59) + this.PhoneNumberId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CallStatus.GetHashCode(); - if (this.StartTime != null) - { - hashCode = (hashCode * 59) + this.StartTime.GetHashCode(); - } - if (this.ConnectTime != null) - { - hashCode = (hashCode * 59) + this.ConnectTime.GetHashCode(); - } - if (this.EndTime != null) - { - hashCode = (hashCode * 59) + this.EndTime.GetHashCode(); - } - if (this.Duration != null) - { - hashCode = (hashCode * 59) + this.Duration.GetHashCode(); - } - if (this.ConnectDuration != null) - { - hashCode = (hashCode * 59) + this.ConnectDuration.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Direction.GetHashCode(); - hashCode = (hashCode * 59) + this.AnsweredBy.GetHashCode(); - if (this.SubresourceUris != null) - { - hashCode = (hashCode * 59) + this.SubresourceUris.GetHashCode(); - } - if (this.ApplicationId != null) - { - hashCode = (hashCode * 59) + this.ApplicationId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/CallStatusWebhook.cs b/src/freeclimb/Model/CallStatusWebhook.cs new file mode 100644 index 00000000..2b60f50e --- /dev/null +++ b/src/freeclimb/Model/CallStatusWebhook.cs @@ -0,0 +1,254 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// A Call has ended and the statusCallbackUrl is being invoked. This is a notification only; All PerCL commands will be ignored. + /// + [DataContract(Name = "CallStatusWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class CallStatusWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets CallEndedReason + /// + [DataMember(Name = "callEndedReason", EmitDefaultValue = true)] + public CallEndedReason? CallEndedReason { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// Context or reason why this request is being made. Will be callStatus - A Call has ended and the statusCallbackUrl is being invoked. (default to "CallStatusWebhook"). + /// Unique ID for this Call, generated by FreeClimb.. + /// Account ID associated with your account.. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to you and to which this Call is directed (in E.164 format).. + /// callStatus. + /// callEndedReason. + /// direction. + /// Unique ID of the Conference.. + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null.. + public CallStatusWebhook( + string requestType = @"CallStatusWebhook", + string callId = default(string), + string accountId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallEndedReason? callEndedReason = default(CallEndedReason?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string) + ) + : base() + { + base.RequestType = requestType; + + this.CallId = callId; + + this.AccountId = accountId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.CallEndedReason = callEndedReason; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance CallStatusWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static CallStatusWebhook Deserialize(string jsonPayload) + { + return (CallStatusWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(CallStatusWebhook), + _serializerSettings + ); + } + + /// + /// Unique ID for this Call, generated by FreeClimb. + /// + /// Unique ID for this Call, generated by FreeClimb. + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// Unique ID of the Conference. + /// + /// Unique ID of the Conference. + [DataMember(Name = "conferenceId", EmitDefaultValue = false)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CallStatusWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" CallEndedReason: ").Append(CallEndedReason).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the CallStatusWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("callId", CallId); + props.Add("accountId", AccountId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("callEndedReason", CallEndedReason); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/Capabilities.cs b/src/freeclimb/Model/Capabilities.cs index 3d13360a..af04be97 100644 --- a/src/freeclimb/Model/Capabilities.cs +++ b/src/freeclimb/Model/Capabilities.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,13 +31,14 @@ namespace freeclimb.Model /// Details for which features this number may be used. /// [DataContract(Name = "Capabilities")] - public partial class Capabilities : IEquatable, IValidatableObject + public partial class Capabilities : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected Capabilities() { } + /// /// Initializes a new instance of the class. /// @@ -46,31 +47,56 @@ protected Capabilities() { } /// Indicates that a number is toll-free and will make toll-free calls, and when enabled, toll-free messages. (required). /// Indicates that a number, if sms is true, will be used for 10DLC messaging (required). /// Indicates that a number is a short code and can be used for short code messaging (required). - public Capabilities(bool? voice = default(bool?), bool? sms = default(bool?), bool? tollFree = default(bool?), bool? tenDLC = default(bool?), bool? shortCode = default(bool?)) + public Capabilities( + bool? voice = default(bool?), + bool? sms = default(bool?), + bool? tollFree = default(bool?), + bool? tenDLC = default(bool?), + bool? shortCode = default(bool?) + ) { // to ensure "voice" is required (not null) - if (voice == null) { - throw new ArgumentNullException("voice is a required property for Capabilities and cannot be null"); + if (voice == null) + { + throw new ArgumentNullException( + "voice is a required property for Capabilities and cannot be null" + ); } this.Voice = voice; + // to ensure "sms" is required (not null) - if (sms == null) { - throw new ArgumentNullException("sms is a required property for Capabilities and cannot be null"); + if (sms == null) + { + throw new ArgumentNullException( + "sms is a required property for Capabilities and cannot be null" + ); } this.Sms = sms; + // to ensure "tollFree" is required (not null) - if (tollFree == null) { - throw new ArgumentNullException("tollFree is a required property for Capabilities and cannot be null"); + if (tollFree == null) + { + throw new ArgumentNullException( + "tollFree is a required property for Capabilities and cannot be null" + ); } this.TollFree = tollFree; + // to ensure "tenDLC" is required (not null) - if (tenDLC == null) { - throw new ArgumentNullException("tenDLC is a required property for Capabilities and cannot be null"); + if (tenDLC == null) + { + throw new ArgumentNullException( + "tenDLC is a required property for Capabilities and cannot be null" + ); } this.TenDLC = tenDLC; + // to ensure "shortCode" is required (not null) - if (shortCode == null) { - throw new ArgumentNullException("shortCode is a required property for Capabilities and cannot be null"); + if (shortCode == null) + { + throw new ArgumentNullException( + "shortCode is a required property for Capabilities and cannot be null" + ); } this.ShortCode = shortCode; } @@ -133,115 +159,37 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the Capabilities instance. + /// Retrieve the KVP Dictionary for the Capabilities instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("voice", Voice); - props.Add("sms", Sms); - props.Add("tollFree", TollFree); - props.Add("tenDLC", TenDLC); - props.Add("shortCode", ShortCode); + props.Add("voice", Voice); + props.Add("sms", Sms); + props.Add("tollFree", TollFree); + props.Add("tenDLC", TenDLC); + props.Add("shortCode", ShortCode); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Capabilities); - } - - /// - /// Returns true if Capabilities instances are equal - /// - /// Instance of Capabilities to be compared - /// Boolean - public bool Equals(Capabilities input) - { - if (input == null) - { - return false; - } - return - ( - this.Voice == input.Voice || - (this.Voice != null && - this.Voice.Equals(input.Voice)) - ) && - ( - this.Sms == input.Sms || - (this.Sms != null && - this.Sms.Equals(input.Sms)) - ) && - ( - this.TollFree == input.TollFree || - (this.TollFree != null && - this.TollFree.Equals(input.TollFree)) - ) && - ( - this.TenDLC == input.TenDLC || - (this.TenDLC != null && - this.TenDLC.Equals(input.TenDLC)) - ) && - ( - this.ShortCode == input.ShortCode || - (this.ShortCode != null && - this.ShortCode.Equals(input.ShortCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Voice != null) - { - hashCode = (hashCode * 59) + this.Voice.GetHashCode(); - } - if (this.Sms != null) - { - hashCode = (hashCode * 59) + this.Sms.GetHashCode(); - } - if (this.TollFree != null) - { - hashCode = (hashCode * 59) + this.TollFree.GetHashCode(); - } - if (this.TenDLC != null) - { - hashCode = (hashCode * 59) + this.TenDLC.GetHashCode(); - } - if (this.ShortCode != null) - { - hashCode = (hashCode * 59) + this.ShortCode.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/CompletionRequest.cs b/src/freeclimb/Model/CompletionRequest.cs index 8493e6a8..e7fa08ae 100644 --- a/src/freeclimb/Model/CompletionRequest.cs +++ b/src/freeclimb/Model/CompletionRequest.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,13 +31,14 @@ namespace freeclimb.Model /// CompletionRequest /// [DataContract(Name = "CompletionRequest")] - public partial class CompletionRequest : IEquatable, IValidatableObject + public partial class CompletionRequest : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected CompletionRequest() { } + /// /// Initializes a new instance of the class. /// @@ -45,8 +46,11 @@ protected CompletionRequest() { } public CompletionRequest(string query = default(string)) { // to ensure "query" is required (not null) - if (query == null) { - throw new ArgumentNullException("query is a required property for CompletionRequest and cannot be null"); + if (query == null) + { + throw new ArgumentNullException( + "query is a required property for CompletionRequest and cannot be null" + ); } this.Query = query; } @@ -55,7 +59,7 @@ protected CompletionRequest() { } /// Question to ask the Knowledge Base /// /// Question to ask the Knowledge Base - [DataMember(Name = "query", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "query", IsRequired = true, EmitDefaultValue = true)] public string Query { get; set; } /// @@ -77,81 +81,42 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the CompletionRequest instance. + /// Retrieve the KVP Dictionary for the CompletionRequest instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("query", Query); + props.Add("query", Query); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CompletionRequest); - } - - /// - /// Returns true if CompletionRequest instances are equal - /// - /// Instance of CompletionRequest to be compared - /// Boolean - public bool Equals(CompletionRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Query == input.Query || - (this.Query != null && - this.Query.Equals(input.Query)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Query != null) - { - hashCode = (hashCode * 59) + this.Query.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { // Query (string) maxLength if (this.Query != null && this.Query.Length > 2000) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Query, length must be less than 2000.", new [] { "Query" }); + yield return new ValidationResult( + "Invalid value for Query, length must be less than 2000.", + new[] { "Query" } + ); } yield break; } } - } diff --git a/src/freeclimb/Model/CompletionResult.cs b/src/freeclimb/Model/CompletionResult.cs index de20837f..a657ded6 100644 --- a/src/freeclimb/Model/CompletionResult.cs +++ b/src/freeclimb/Model/CompletionResult.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,53 +31,39 @@ namespace freeclimb.Model /// CompletionResult /// [DataContract(Name = "CompletionResult")] - public partial class CompletionResult : IEquatable, IValidatableObject + public partial class CompletionResult : IValidatableObject { /// - /// Completion result status. Possible values: success, no_context + /// Gets or Sets Status /// - /// Completion result status. Possible values: success, no_context - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum SUCCESS for value: success - /// - [EnumMember(Value = "success")] - SUCCESS = 1, - - /// - /// Enum NO_CONTEXT for value: no_context - /// - [EnumMember(Value = "no_context")] - NO_CONTEXT = 2 - - } + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] + public CompletionResultStatus Status { get; set; } - - /// - /// Completion result status. Possible values: success, no_context - /// - /// Completion result status. Possible values: success, no_context - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected CompletionResult() { } + /// /// Initializes a new instance of the class. /// /// The generative response from the KnowledgeBase (required). - /// Completion result status. Possible values: success, no_context (required). - public CompletionResult(string response = default(string), StatusEnum status = default(StatusEnum)) + /// status (required). + public CompletionResult( + string response = default(string), + CompletionResultStatus status = default(CompletionResultStatus) + ) { // to ensure "response" is required (not null) - if (response == null) { - throw new ArgumentNullException("response is a required property for CompletionResult and cannot be null"); + if (response == null) + { + throw new ArgumentNullException( + "response is a required property for CompletionResult and cannot be null" + ); } this.Response = response; + this.Status = status; } @@ -85,7 +71,7 @@ protected CompletionResult() { } /// The generative response from the KnowledgeBase /// /// The generative response from the KnowledgeBase - [DataMember(Name = "response", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "response", IsRequired = true, EmitDefaultValue = true)] public string Response { get; set; } /// @@ -108,81 +94,34 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the CompletionResult instance. + /// Retrieve the KVP Dictionary for the CompletionResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("response", Response); - props.Add("status", Status); + props.Add("response", Response); + props.Add("status", Status); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CompletionResult); - } - - /// - /// Returns true if CompletionResult instances are equal - /// - /// Instance of CompletionResult to be compared - /// Boolean - public bool Equals(CompletionResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Response == input.Response || - (this.Response != null && - this.Response.Equals(input.Response)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Response != null) - { - hashCode = (hashCode * 59) + this.Response.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/ConferenceList.cs b/src/freeclimb/Model/ConferenceList.cs index 1044cb6f..c261bdbc 100644 --- a/src/freeclimb/Model/ConferenceList.cs +++ b/src/freeclimb/Model/ConferenceList.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// ConferenceList /// [DataContract(Name = "ConferenceList")] - public partial class ConferenceList : IPagination, IEquatable, IValidatableObject + public partial class ConferenceList : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,31 @@ public partial class ConferenceList : IPagination, IEquatable, I /// Number of items per page. /// Uri to retrieve the next page of items. /// conferences. - public ConferenceList(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List conferences = default(List)) + public ConferenceList( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List conferences = default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.Conferences = conferences; } @@ -138,151 +154,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the ConferenceList instance. + /// Retrieve the KVP Dictionary for the ConferenceList instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in Conferences) { nested.Add(item); } - props.Add("conferences", nested); + props.Add("conferences", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ConferenceList); - } - - /// - /// Returns true if ConferenceList instances are equal - /// - /// Instance of ConferenceList to be compared - /// Boolean - public bool Equals(ConferenceList input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.Conferences == input.Conferences || - this.Conferences != null && - input.Conferences != null && - this.Conferences.SequenceEqual(input.Conferences) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.Conferences != null) - { - hashCode = (hashCode * 59) + this.Conferences.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/ConferenceListAllOf.cs b/src/freeclimb/Model/ConferenceListAllOf.cs deleted file mode 100644 index 4091a458..00000000 --- a/src/freeclimb/Model/ConferenceListAllOf.cs +++ /dev/null @@ -1,147 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// ConferenceListAllOf - /// - [DataContract(Name = "ConferenceList_allOf")] - public partial class ConferenceListAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// conferences. - public ConferenceListAllOf(List conferences = default(List)) - { - this.Conferences = conferences; - } - - /// - /// Gets or Sets Conferences - /// - [DataMember(Name = "conferences", EmitDefaultValue = true)] - public List Conferences { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ConferenceListAllOf {\n"); - sb.Append(" Conferences: ").Append(Conferences).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the ConferenceListAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in Conferences) - { - nested.Add(item); - } - props.Add("conferences", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ConferenceListAllOf); - } - - /// - /// Returns true if ConferenceListAllOf instances are equal - /// - /// Instance of ConferenceListAllOf to be compared - /// Boolean - public bool Equals(ConferenceListAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Conferences == input.Conferences || - this.Conferences != null && - input.Conferences != null && - this.Conferences.SequenceEqual(input.Conferences) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Conferences != null) - { - hashCode = (hashCode * 59) + this.Conferences.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/ConferenceParticipantList.cs b/src/freeclimb/Model/ConferenceParticipantList.cs index 18387bd0..c73c3b4f 100644 --- a/src/freeclimb/Model/ConferenceParticipantList.cs +++ b/src/freeclimb/Model/ConferenceParticipantList.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// ConferenceParticipantList /// [DataContract(Name = "ConferenceParticipantList")] - public partial class ConferenceParticipantList : IPagination, IEquatable, IValidatableObject + public partial class ConferenceParticipantList : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,32 @@ public partial class ConferenceParticipantList : IPagination, IEquatableNumber of items per page. /// Uri to retrieve the next page of items. /// participants. - public ConferenceParticipantList(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List participants = default(List)) + public ConferenceParticipantList( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List participants = + default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.Participants = participants; } @@ -138,151 +155,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the ConferenceParticipantList instance. + /// Retrieve the KVP Dictionary for the ConferenceParticipantList instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in Participants) { nested.Add(item); } - props.Add("participants", nested); + props.Add("participants", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ConferenceParticipantList); - } - - /// - /// Returns true if ConferenceParticipantList instances are equal - /// - /// Instance of ConferenceParticipantList to be compared - /// Boolean - public bool Equals(ConferenceParticipantList input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.Participants == input.Participants || - this.Participants != null && - input.Participants != null && - this.Participants.SequenceEqual(input.Participants) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.Participants != null) - { - hashCode = (hashCode * 59) + this.Participants.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/ConferenceParticipantListAllOf.cs b/src/freeclimb/Model/ConferenceParticipantListAllOf.cs deleted file mode 100644 index bf0c7d26..00000000 --- a/src/freeclimb/Model/ConferenceParticipantListAllOf.cs +++ /dev/null @@ -1,147 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// ConferenceParticipantListAllOf - /// - [DataContract(Name = "ConferenceParticipantList_allOf")] - public partial class ConferenceParticipantListAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// participants. - public ConferenceParticipantListAllOf(List participants = default(List)) - { - this.Participants = participants; - } - - /// - /// Gets or Sets Participants - /// - [DataMember(Name = "participants", EmitDefaultValue = true)] - public List Participants { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ConferenceParticipantListAllOf {\n"); - sb.Append(" Participants: ").Append(Participants).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the ConferenceParticipantListAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in Participants) - { - nested.Add(item); - } - props.Add("participants", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ConferenceParticipantListAllOf); - } - - /// - /// Returns true if ConferenceParticipantListAllOf instances are equal - /// - /// Instance of ConferenceParticipantListAllOf to be compared - /// Boolean - public bool Equals(ConferenceParticipantListAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Participants == input.Participants || - this.Participants != null && - input.Participants != null && - this.Participants.SequenceEqual(input.Participants) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Participants != null) - { - hashCode = (hashCode * 59) + this.Participants.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/ConferenceParticipantResult.cs b/src/freeclimb/Model/ConferenceParticipantResult.cs index 293ca0c7..dd9fd96e 100644 --- a/src/freeclimb/Model/ConferenceParticipantResult.cs +++ b/src/freeclimb/Model/ConferenceParticipantResult.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// ConferenceParticipantResult /// [DataContract(Name = "ConferenceParticipantResult")] - public partial class ConferenceParticipantResult : IEquatable, IValidatableObject + public partial class ConferenceParticipantResult : IValidatableObject { /// /// Initializes a new instance of the class. @@ -47,18 +47,40 @@ public partial class ConferenceParticipantResult : IEquatableTrue if this Participant has listen privileges in the Conference. False otherwise.. /// True if this Participant had dtmfPassThrough privileges in the Conference. False otherwise.. /// True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise.. - public ConferenceParticipantResult(string uri = default(string), string dateCreated = default(string), string dateUpdated = default(string), int revision = default(int), string accountId = default(string), string conferenceId = default(string), string callId = default(string), bool? talk = default(bool?), bool? listen = default(bool?), bool? dtmfPassThrough = default(bool?), bool? startConfOnEnter = default(bool?)) + public ConferenceParticipantResult( + string uri = default(string), + string dateCreated = default(string), + string dateUpdated = default(string), + int revision = default(int), + string accountId = default(string), + string conferenceId = default(string), + string callId = default(string), + bool? talk = default(bool?), + bool? listen = default(bool?), + bool? dtmfPassThrough = default(bool?), + bool? startConfOnEnter = default(bool?) + ) { this.Uri = uri; + this.DateCreated = dateCreated; + this.DateUpdated = dateUpdated; + this.Revision = revision; + this.AccountId = accountId; + this.ConferenceId = conferenceId; + this.CallId = callId; + this.Talk = talk; + this.Listen = listen; + this.DtmfPassThrough = dtmfPassThrough; + this.StartConfOnEnter = startConfOnEnter; } @@ -168,171 +190,43 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the ConferenceParticipantResult instance. + /// Retrieve the KVP Dictionary for the ConferenceParticipantResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("uri", Uri); - props.Add("dateCreated", DateCreated); - props.Add("dateUpdated", DateUpdated); - props.Add("revision", Revision); - props.Add("accountId", AccountId); - props.Add("conferenceId", ConferenceId); - props.Add("callId", CallId); - props.Add("talk", Talk); - props.Add("listen", Listen); - props.Add("dtmfPassThrough", DtmfPassThrough); - props.Add("startConfOnEnter", StartConfOnEnter); + props.Add("uri", Uri); + props.Add("dateCreated", DateCreated); + props.Add("dateUpdated", DateUpdated); + props.Add("revision", Revision); + props.Add("accountId", AccountId); + props.Add("conferenceId", ConferenceId); + props.Add("callId", CallId); + props.Add("talk", Talk); + props.Add("listen", Listen); + props.Add("dtmfPassThrough", DtmfPassThrough); + props.Add("startConfOnEnter", StartConfOnEnter); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ConferenceParticipantResult); - } - - /// - /// Returns true if ConferenceParticipantResult instances are equal - /// - /// Instance of ConferenceParticipantResult to be compared - /// Boolean - public bool Equals(ConferenceParticipantResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DateCreated == input.DateCreated || - (this.DateCreated != null && - this.DateCreated.Equals(input.DateCreated)) - ) && - ( - this.DateUpdated == input.DateUpdated || - (this.DateUpdated != null && - this.DateUpdated.Equals(input.DateUpdated)) - ) && - ( - this.Revision == input.Revision || - this.Revision.Equals(input.Revision) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.ConferenceId == input.ConferenceId || - (this.ConferenceId != null && - this.ConferenceId.Equals(input.ConferenceId)) - ) && - ( - this.CallId == input.CallId || - (this.CallId != null && - this.CallId.Equals(input.CallId)) - ) && - ( - this.Talk == input.Talk || - (this.Talk != null && - this.Talk.Equals(input.Talk)) - ) && - ( - this.Listen == input.Listen || - (this.Listen != null && - this.Listen.Equals(input.Listen)) - ) && - ( - this.DtmfPassThrough == input.DtmfPassThrough || - (this.DtmfPassThrough != null && - this.DtmfPassThrough.Equals(input.DtmfPassThrough)) - ) && - ( - this.StartConfOnEnter == input.StartConfOnEnter || - (this.StartConfOnEnter != null && - this.StartConfOnEnter.Equals(input.StartConfOnEnter)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DateCreated != null) - { - hashCode = (hashCode * 59) + this.DateCreated.GetHashCode(); - } - if (this.DateUpdated != null) - { - hashCode = (hashCode * 59) + this.DateUpdated.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Revision.GetHashCode(); - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.ConferenceId != null) - { - hashCode = (hashCode * 59) + this.ConferenceId.GetHashCode(); - } - if (this.CallId != null) - { - hashCode = (hashCode * 59) + this.CallId.GetHashCode(); - } - if (this.Talk != null) - { - hashCode = (hashCode * 59) + this.Talk.GetHashCode(); - } - if (this.Listen != null) - { - hashCode = (hashCode * 59) + this.Listen.GetHashCode(); - } - if (this.DtmfPassThrough != null) - { - hashCode = (hashCode * 59) + this.DtmfPassThrough.GetHashCode(); - } - if (this.StartConfOnEnter != null) - { - hashCode = (hashCode * 59) + this.StartConfOnEnter.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/ConferenceParticipantResultAllOf.cs b/src/freeclimb/Model/ConferenceParticipantResultAllOf.cs deleted file mode 100644 index db76a18c..00000000 --- a/src/freeclimb/Model/ConferenceParticipantResultAllOf.cs +++ /dev/null @@ -1,262 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// ConferenceParticipantResultAllOf - /// - [DataContract(Name = "ConferenceParticipantResult_allOf")] - public partial class ConferenceParticipantResultAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// ID of the account that created this participant.. - /// ID of the conference this participant is in.. - /// ID of the Call associated with this Participant.. - /// True if this Participant has talk privileges in the Conference. False otherwise.. - /// True if this Participant has listen privileges in the Conference. False otherwise.. - /// True if this Participant had dtmfPassThrough privileges in the Conference. False otherwise.. - /// True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise.. - public ConferenceParticipantResultAllOf(string accountId = default(string), string conferenceId = default(string), string callId = default(string), bool? talk = default(bool?), bool? listen = default(bool?), bool? dtmfPassThrough = default(bool?), bool? startConfOnEnter = default(bool?)) - { - this.AccountId = accountId; - this.ConferenceId = conferenceId; - this.CallId = callId; - this.Talk = talk; - this.Listen = listen; - this.DtmfPassThrough = dtmfPassThrough; - this.StartConfOnEnter = startConfOnEnter; - } - - /// - /// ID of the account that created this participant. - /// - /// ID of the account that created this participant. - [DataMember(Name = "accountId", EmitDefaultValue = true)] - public string AccountId { get; set; } - - /// - /// ID of the conference this participant is in. - /// - /// ID of the conference this participant is in. - [DataMember(Name = "conferenceId", EmitDefaultValue = true)] - public string ConferenceId { get; set; } - - /// - /// ID of the Call associated with this Participant. - /// - /// ID of the Call associated with this Participant. - [DataMember(Name = "callId", EmitDefaultValue = true)] - public string CallId { get; set; } - - /// - /// True if this Participant has talk privileges in the Conference. False otherwise. - /// - /// True if this Participant has talk privileges in the Conference. False otherwise. - [DataMember(Name = "talk", EmitDefaultValue = true)] - public bool? Talk { get; set; } - - /// - /// True if this Participant has listen privileges in the Conference. False otherwise. - /// - /// True if this Participant has listen privileges in the Conference. False otherwise. - [DataMember(Name = "listen", EmitDefaultValue = true)] - public bool? Listen { get; set; } - - /// - /// True if this Participant had dtmfPassThrough privileges in the Conference. False otherwise. - /// - /// True if this Participant had dtmfPassThrough privileges in the Conference. False otherwise. - [DataMember(Name = "dtmfPassThrough", EmitDefaultValue = true)] - public bool? DtmfPassThrough { get; set; } - - /// - /// True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise. - /// - /// True if this Participant joining the Conference caused the Conference to start (status = inProgress). False otherwise. - [DataMember(Name = "startConfOnEnter", EmitDefaultValue = true)] - public bool? StartConfOnEnter { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ConferenceParticipantResultAllOf {\n"); - sb.Append(" AccountId: ").Append(AccountId).Append("\n"); - sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); - sb.Append(" CallId: ").Append(CallId).Append("\n"); - sb.Append(" Talk: ").Append(Talk).Append("\n"); - sb.Append(" Listen: ").Append(Listen).Append("\n"); - sb.Append(" DtmfPassThrough: ").Append(DtmfPassThrough).Append("\n"); - sb.Append(" StartConfOnEnter: ").Append(StartConfOnEnter).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the ConferenceParticipantResultAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("accountId", AccountId); - props.Add("conferenceId", ConferenceId); - props.Add("callId", CallId); - props.Add("talk", Talk); - props.Add("listen", Listen); - props.Add("dtmfPassThrough", DtmfPassThrough); - props.Add("startConfOnEnter", StartConfOnEnter); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ConferenceParticipantResultAllOf); - } - - /// - /// Returns true if ConferenceParticipantResultAllOf instances are equal - /// - /// Instance of ConferenceParticipantResultAllOf to be compared - /// Boolean - public bool Equals(ConferenceParticipantResultAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.ConferenceId == input.ConferenceId || - (this.ConferenceId != null && - this.ConferenceId.Equals(input.ConferenceId)) - ) && - ( - this.CallId == input.CallId || - (this.CallId != null && - this.CallId.Equals(input.CallId)) - ) && - ( - this.Talk == input.Talk || - (this.Talk != null && - this.Talk.Equals(input.Talk)) - ) && - ( - this.Listen == input.Listen || - (this.Listen != null && - this.Listen.Equals(input.Listen)) - ) && - ( - this.DtmfPassThrough == input.DtmfPassThrough || - (this.DtmfPassThrough != null && - this.DtmfPassThrough.Equals(input.DtmfPassThrough)) - ) && - ( - this.StartConfOnEnter == input.StartConfOnEnter || - (this.StartConfOnEnter != null && - this.StartConfOnEnter.Equals(input.StartConfOnEnter)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.ConferenceId != null) - { - hashCode = (hashCode * 59) + this.ConferenceId.GetHashCode(); - } - if (this.CallId != null) - { - hashCode = (hashCode * 59) + this.CallId.GetHashCode(); - } - if (this.Talk != null) - { - hashCode = (hashCode * 59) + this.Talk.GetHashCode(); - } - if (this.Listen != null) - { - hashCode = (hashCode * 59) + this.Listen.GetHashCode(); - } - if (this.DtmfPassThrough != null) - { - hashCode = (hashCode * 59) + this.DtmfPassThrough.GetHashCode(); - } - if (this.StartConfOnEnter != null) - { - hashCode = (hashCode * 59) + this.StartConfOnEnter.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/ConferenceRecordingStatusWebhook.cs b/src/freeclimb/Model/ConferenceRecordingStatusWebhook.cs new file mode 100644 index 00000000..8fcee7c8 --- /dev/null +++ b/src/freeclimb/Model/ConferenceRecordingStatusWebhook.cs @@ -0,0 +1,293 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// The statusCallbackUrl request includes Recording information for a Conference that ended. This is a notification only; any PerCL returned will be ignored. + /// + [DataContract(Name = "ConferenceRecordingStatusWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class ConferenceRecordingStatusWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", EmitDefaultValue = true)] + public ConferenceStatus? Status { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// Context or reason why this request is being made. Will be conferenceRecordingStatus - The statusCallbackUrl request includes Recording information for a Conference that ended. (default to "ConferenceRecordingStatusWebhook"). + /// Unique ID for this Call, generated by FreeClimb.. + /// Account ID associated with your account.. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to you and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// Unique ID of the Conference.. + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null.. + /// status. + /// URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied.. + /// Unique ID of the Recording from this Conference. Populated only if a recording exists and the Conference was emptied.. + /// Duration of the recorded audio (in seconds), rounded up to the nearest second. Populated only if a Recording exists and the Conference was emptied.. + public ConferenceRecordingStatusWebhook( + string requestType = @"ConferenceRecordingStatusWebhook", + string callId = default(string), + string accountId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + ConferenceStatus? status = default(ConferenceStatus?), + string recordingUrl = default(string), + string recordingId = default(string), + int recordingDurationSec = default(int) + ) + : base() + { + base.RequestType = requestType; + + this.CallId = callId; + + this.AccountId = accountId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.Status = status; + + this.RecordingUrl = recordingUrl; + + this.RecordingId = recordingId; + + this.RecordingDurationSec = recordingDurationSec; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance ConferenceRecordingStatusWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static ConferenceRecordingStatusWebhook Deserialize(string jsonPayload) + { + return (ConferenceRecordingStatusWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(ConferenceRecordingStatusWebhook), + _serializerSettings + ); + } + + /// + /// Unique ID for this Call, generated by FreeClimb. + /// + /// Unique ID for this Call, generated by FreeClimb. + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// Unique ID of the Conference. + /// + /// Unique ID of the Conference. + [DataMember(Name = "conferenceId", EmitDefaultValue = false)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied. + /// + /// URL of the Conference’s recorded audio. Populated only if a Recording exists and the Conference was emptied. + [DataMember(Name = "recordingUrl", EmitDefaultValue = false)] + public string RecordingUrl { get; set; } + + /// + /// Unique ID of the Recording from this Conference. Populated only if a recording exists and the Conference was emptied. + /// + /// Unique ID of the Recording from this Conference. Populated only if a recording exists and the Conference was emptied. + [DataMember(Name = "recordingId", EmitDefaultValue = false)] + public string RecordingId { get; set; } + + /// + /// Duration of the recorded audio (in seconds), rounded up to the nearest second. Populated only if a Recording exists and the Conference was emptied. + /// + /// Duration of the recorded audio (in seconds), rounded up to the nearest second. Populated only if a Recording exists and the Conference was emptied. + [DataMember(Name = "recordingDurationSec", EmitDefaultValue = false)] + public int RecordingDurationSec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConferenceRecordingStatusWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" RecordingUrl: ").Append(RecordingUrl).Append("\n"); + sb.Append(" RecordingId: ").Append(RecordingId).Append("\n"); + sb.Append(" RecordingDurationSec: ").Append(RecordingDurationSec).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the ConferenceRecordingStatusWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("callId", CallId); + props.Add("accountId", AccountId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("status", Status); + props.Add("recordingUrl", RecordingUrl); + props.Add("recordingId", RecordingId); + props.Add("recordingDurationSec", RecordingDurationSec); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/ConferenceResult.cs b/src/freeclimb/Model/ConferenceResult.cs index 976d0044..1119ef71 100644 --- a/src/freeclimb/Model/ConferenceResult.cs +++ b/src/freeclimb/Model/ConferenceResult.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,9 +31,8 @@ namespace freeclimb.Model /// ConferenceResult /// [DataContract(Name = "ConferenceResult")] - public partial class ConferenceResult : IEquatable, IValidatableObject + public partial class ConferenceResult : IValidatableObject { - /// /// Gets or Sets PlayBeep /// @@ -45,6 +44,7 @@ public partial class ConferenceResult : IEquatable, IValidatab /// [DataMember(Name = "status", EmitDefaultValue = true)] public ConferenceStatus? Status { get; set; } + /// /// Initializes a new instance of the class. /// @@ -62,21 +62,49 @@ public partial class ConferenceResult : IEquatable, IValidatab /// URL invoked once the Conference is successfully created.. /// URL to inform that the Conference status has changed.. /// The list of subresources for this Conference. This includes participants and/or recordings.. - public ConferenceResult(string uri = default(string), string dateCreated = default(string), string dateUpdated = default(string), int revision = default(int), string conferenceId = default(string), string accountId = default(string), string alias = default(string), PlayBeep? playBeep = default(PlayBeep?), bool? record = default(bool?), ConferenceStatus? status = default(ConferenceStatus?), string waitUrl = default(string), string actionUrl = default(string), string statusCallbackUrl = default(string), Object subresourceUris = default(Object)) + public ConferenceResult( + string uri = default(string), + string dateCreated = default(string), + string dateUpdated = default(string), + int revision = default(int), + string conferenceId = default(string), + string accountId = default(string), + string alias = default(string), + PlayBeep? playBeep = default(PlayBeep?), + bool? record = default(bool?), + ConferenceStatus? status = default(ConferenceStatus?), + string waitUrl = default(string), + string actionUrl = default(string), + string statusCallbackUrl = default(string), + Object subresourceUris = default(Object) + ) { this.Uri = uri; + this.DateCreated = dateCreated; + this.DateUpdated = dateUpdated; + this.Revision = revision; + this.ConferenceId = conferenceId; + this.AccountId = accountId; + this.Alias = alias; + this.PlayBeep = playBeep; + this.Record = record; + this.Status = status; + this.WaitUrl = waitUrl; + this.ActionUrl = actionUrl; + this.StatusCallbackUrl = statusCallbackUrl; + this.SubresourceUris = subresourceUris; } @@ -196,193 +224,46 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the ConferenceResult instance. + /// Retrieve the KVP Dictionary for the ConferenceResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("uri", Uri); - props.Add("dateCreated", DateCreated); - props.Add("dateUpdated", DateUpdated); - props.Add("revision", Revision); - props.Add("conferenceId", ConferenceId); - props.Add("accountId", AccountId); - props.Add("alias", Alias); - props.Add("playBeep", PlayBeep); - props.Add("record", Record); - props.Add("status", Status); - props.Add("waitUrl", WaitUrl); - props.Add("actionUrl", ActionUrl); - props.Add("statusCallbackUrl", StatusCallbackUrl); - props.Add("subresourceUris", SubresourceUris); + props.Add("uri", Uri); + props.Add("dateCreated", DateCreated); + props.Add("dateUpdated", DateUpdated); + props.Add("revision", Revision); + props.Add("conferenceId", ConferenceId); + props.Add("accountId", AccountId); + props.Add("alias", Alias); + props.Add("playBeep", PlayBeep); + props.Add("record", Record); + props.Add("status", Status); + props.Add("waitUrl", WaitUrl); + props.Add("actionUrl", ActionUrl); + props.Add("statusCallbackUrl", StatusCallbackUrl); + props.Add("subresourceUris", SubresourceUris); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ConferenceResult); - } - - /// - /// Returns true if ConferenceResult instances are equal - /// - /// Instance of ConferenceResult to be compared - /// Boolean - public bool Equals(ConferenceResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DateCreated == input.DateCreated || - (this.DateCreated != null && - this.DateCreated.Equals(input.DateCreated)) - ) && - ( - this.DateUpdated == input.DateUpdated || - (this.DateUpdated != null && - this.DateUpdated.Equals(input.DateUpdated)) - ) && - ( - this.Revision == input.Revision || - this.Revision.Equals(input.Revision) - ) && - ( - this.ConferenceId == input.ConferenceId || - (this.ConferenceId != null && - this.ConferenceId.Equals(input.ConferenceId)) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.PlayBeep == input.PlayBeep || - this.PlayBeep.Equals(input.PlayBeep) - ) && - ( - this.Record == input.Record || - (this.Record != null && - this.Record.Equals(input.Record)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.WaitUrl == input.WaitUrl || - (this.WaitUrl != null && - this.WaitUrl.Equals(input.WaitUrl)) - ) && - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && - ( - this.StatusCallbackUrl == input.StatusCallbackUrl || - (this.StatusCallbackUrl != null && - this.StatusCallbackUrl.Equals(input.StatusCallbackUrl)) - ) && - ( - this.SubresourceUris == input.SubresourceUris || - (this.SubresourceUris != null && - this.SubresourceUris.Equals(input.SubresourceUris)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DateCreated != null) - { - hashCode = (hashCode * 59) + this.DateCreated.GetHashCode(); - } - if (this.DateUpdated != null) - { - hashCode = (hashCode * 59) + this.DateUpdated.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Revision.GetHashCode(); - if (this.ConferenceId != null) - { - hashCode = (hashCode * 59) + this.ConferenceId.GetHashCode(); - } - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PlayBeep.GetHashCode(); - if (this.Record != null) - { - hashCode = (hashCode * 59) + this.Record.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.WaitUrl != null) - { - hashCode = (hashCode * 59) + this.WaitUrl.GetHashCode(); - } - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - if (this.StatusCallbackUrl != null) - { - hashCode = (hashCode * 59) + this.StatusCallbackUrl.GetHashCode(); - } - if (this.SubresourceUris != null) - { - hashCode = (hashCode * 59) + this.SubresourceUris.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/ConferenceResultAllOf.cs b/src/freeclimb/Model/ConferenceResultAllOf.cs deleted file mode 100644 index c6e2350f..00000000 --- a/src/freeclimb/Model/ConferenceResultAllOf.cs +++ /dev/null @@ -1,312 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// ConferenceResultAllOf - /// - [DataContract(Name = "ConferenceResult_allOf")] - public partial class ConferenceResultAllOf : IEquatable, IValidatableObject - { - - /// - /// Gets or Sets PlayBeep - /// - [DataMember(Name = "playBeep", EmitDefaultValue = true)] - public PlayBeep? PlayBeep { get; set; } - - /// - /// Gets or Sets Status - /// - [DataMember(Name = "status", EmitDefaultValue = true)] - public ConferenceStatus? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// A string that uniquely identifies this Conference resource.. - /// ID of the account that created this Conference.. - /// A description for this Conference.. - /// playBeep. - /// Flag indicating whether recording is enabled for this Conference.. - /// status. - /// URL referencing the audio file to be used as default wait music for the Conference when it is in the populated state.. - /// URL invoked once the Conference is successfully created.. - /// URL to inform that the Conference status has changed.. - /// The list of subresources for this Conference. This includes participants and/or recordings.. - public ConferenceResultAllOf(string conferenceId = default(string), string accountId = default(string), string alias = default(string), PlayBeep? playBeep = default(PlayBeep?), bool? record = default(bool?), ConferenceStatus? status = default(ConferenceStatus?), string waitUrl = default(string), string actionUrl = default(string), string statusCallbackUrl = default(string), Object subresourceUris = default(Object)) - { - this.ConferenceId = conferenceId; - this.AccountId = accountId; - this.Alias = alias; - this.PlayBeep = playBeep; - this.Record = record; - this.Status = status; - this.WaitUrl = waitUrl; - this.ActionUrl = actionUrl; - this.StatusCallbackUrl = statusCallbackUrl; - this.SubresourceUris = subresourceUris; - } - - /// - /// A string that uniquely identifies this Conference resource. - /// - /// A string that uniquely identifies this Conference resource. - [DataMember(Name = "conferenceId", EmitDefaultValue = true)] - public string ConferenceId { get; set; } - - /// - /// ID of the account that created this Conference. - /// - /// ID of the account that created this Conference. - [DataMember(Name = "accountId", EmitDefaultValue = true)] - public string AccountId { get; set; } - - /// - /// A description for this Conference. - /// - /// A description for this Conference. - [DataMember(Name = "alias", EmitDefaultValue = true)] - public string Alias { get; set; } - - /// - /// Flag indicating whether recording is enabled for this Conference. - /// - /// Flag indicating whether recording is enabled for this Conference. - [DataMember(Name = "record", EmitDefaultValue = true)] - public bool? Record { get; set; } - - /// - /// URL referencing the audio file to be used as default wait music for the Conference when it is in the populated state. - /// - /// URL referencing the audio file to be used as default wait music for the Conference when it is in the populated state. - [DataMember(Name = "waitUrl", EmitDefaultValue = true)] - public string WaitUrl { get; set; } - - /// - /// URL invoked once the Conference is successfully created. - /// - /// URL invoked once the Conference is successfully created. - [DataMember(Name = "actionUrl", EmitDefaultValue = true)] - public string ActionUrl { get; set; } - - /// - /// URL to inform that the Conference status has changed. - /// - /// URL to inform that the Conference status has changed. - [DataMember(Name = "statusCallbackUrl", EmitDefaultValue = true)] - public string StatusCallbackUrl { get; set; } - - /// - /// The list of subresources for this Conference. This includes participants and/or recordings. - /// - /// The list of subresources for this Conference. This includes participants and/or recordings. - [DataMember(Name = "subresourceUris", EmitDefaultValue = true)] - public Object SubresourceUris { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ConferenceResultAllOf {\n"); - sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); - sb.Append(" AccountId: ").Append(AccountId).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" PlayBeep: ").Append(PlayBeep).Append("\n"); - sb.Append(" Record: ").Append(Record).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" WaitUrl: ").Append(WaitUrl).Append("\n"); - sb.Append(" ActionUrl: ").Append(ActionUrl).Append("\n"); - sb.Append(" StatusCallbackUrl: ").Append(StatusCallbackUrl).Append("\n"); - sb.Append(" SubresourceUris: ").Append(SubresourceUris).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the ConferenceResultAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("conferenceId", ConferenceId); - props.Add("accountId", AccountId); - props.Add("alias", Alias); - props.Add("playBeep", PlayBeep); - props.Add("record", Record); - props.Add("status", Status); - props.Add("waitUrl", WaitUrl); - props.Add("actionUrl", ActionUrl); - props.Add("statusCallbackUrl", StatusCallbackUrl); - props.Add("subresourceUris", SubresourceUris); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ConferenceResultAllOf); - } - - /// - /// Returns true if ConferenceResultAllOf instances are equal - /// - /// Instance of ConferenceResultAllOf to be compared - /// Boolean - public bool Equals(ConferenceResultAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.ConferenceId == input.ConferenceId || - (this.ConferenceId != null && - this.ConferenceId.Equals(input.ConferenceId)) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.PlayBeep == input.PlayBeep || - this.PlayBeep.Equals(input.PlayBeep) - ) && - ( - this.Record == input.Record || - (this.Record != null && - this.Record.Equals(input.Record)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.WaitUrl == input.WaitUrl || - (this.WaitUrl != null && - this.WaitUrl.Equals(input.WaitUrl)) - ) && - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && - ( - this.StatusCallbackUrl == input.StatusCallbackUrl || - (this.StatusCallbackUrl != null && - this.StatusCallbackUrl.Equals(input.StatusCallbackUrl)) - ) && - ( - this.SubresourceUris == input.SubresourceUris || - (this.SubresourceUris != null && - this.SubresourceUris.Equals(input.SubresourceUris)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ConferenceId != null) - { - hashCode = (hashCode * 59) + this.ConferenceId.GetHashCode(); - } - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PlayBeep.GetHashCode(); - if (this.Record != null) - { - hashCode = (hashCode * 59) + this.Record.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.WaitUrl != null) - { - hashCode = (hashCode * 59) + this.WaitUrl.GetHashCode(); - } - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - if (this.StatusCallbackUrl != null) - { - hashCode = (hashCode * 59) + this.StatusCallbackUrl.GetHashCode(); - } - if (this.SubresourceUris != null) - { - hashCode = (hashCode * 59) + this.SubresourceUris.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/ConferenceStatusWebhook.cs b/src/freeclimb/Model/ConferenceStatusWebhook.cs new file mode 100644 index 00000000..e2a09d71 --- /dev/null +++ b/src/freeclimb/Model/ConferenceStatusWebhook.cs @@ -0,0 +1,293 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// The context or reason why this request is being made. Will be conferenceStatus - A Conference's status changed and its statusCallbackUrl is being invoked. + /// + [DataContract(Name = "ConferenceStatusWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class ConferenceStatusWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", EmitDefaultValue = true)] + public ConferenceStatus? Status { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// Context or reason why this request is being made. Will be conferenceRecordingStatus - The statusCallbackUrl request includes Recording information for a Conference that ended. (default to "ConferenceStatusWebhook"). + /// Unique ID for this Call, generated by FreeClimb.. + /// Account ID associated with your account.. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to you and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// Unique ID of the Conference.. + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null.. + /// status. + /// 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.. + /// 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.. + /// 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.. + public ConferenceStatusWebhook( + string requestType = @"ConferenceStatusWebhook", + string callId = default(string), + string accountId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + ConferenceStatus? status = default(ConferenceStatus?), + string recordingUrl = default(string), + string recordingId = default(string), + int? recordingDurationSec = default(int?) + ) + : base() + { + base.RequestType = requestType; + + this.CallId = callId; + + this.AccountId = accountId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.Status = status; + + this.RecordingUrl = recordingUrl; + + this.RecordingId = recordingId; + + this.RecordingDurationSec = recordingDurationSec; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance ConferenceStatusWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static ConferenceStatusWebhook Deserialize(string jsonPayload) + { + return (ConferenceStatusWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(ConferenceStatusWebhook), + _serializerSettings + ); + } + + /// + /// Unique ID for this Call, generated by FreeClimb. + /// + /// Unique ID for this Call, generated by FreeClimb. + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// Unique ID of the Conference. + /// + /// Unique ID of the Conference. + [DataMember(Name = "conferenceId", EmitDefaultValue = false)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "recordingUrl", EmitDefaultValue = true)] + public string RecordingUrl { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "recordingId", EmitDefaultValue = true)] + public string RecordingId { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "recordingDurationSec", EmitDefaultValue = true)] + public int? RecordingDurationSec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ConferenceStatusWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" RecordingUrl: ").Append(RecordingUrl).Append("\n"); + sb.Append(" RecordingId: ").Append(RecordingId).Append("\n"); + sb.Append(" RecordingDurationSec: ").Append(RecordingDurationSec).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the ConferenceStatusWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("callId", CallId); + props.Add("accountId", AccountId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("status", Status); + props.Add("recordingUrl", RecordingUrl); + props.Add("recordingId", RecordingId); + props.Add("recordingDurationSec", RecordingDurationSec); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/CreateConference.cs b/src/freeclimb/Model/CreateConference.cs index 08a81330..447f9050 100644 --- a/src/freeclimb/Model/CreateConference.cs +++ b/src/freeclimb/Model/CreateConference.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,45 +33,20 @@ namespace freeclimb.Model /// [DataContract(Name = "CreateConference")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class CreateConference : PerclCommand, IEquatable, IValidatableObject + public partial class CreateConference : PerclCommand, IValidatableObject { - /// /// Gets or Sets PlayBeep /// [DataMember(Name = "playBeep", EmitDefaultValue = true)] public PlayBeep? PlayBeep { get; set; } + /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected CreateConference() { } + /// /// Initializes a new instance of the class. /// @@ -82,29 +57,46 @@ protected CreateConference() { } /// This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available.. /// 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.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "CreateConference"). - public CreateConference(string actionUrl = default(string), bool alias = default(bool), PlayBeep? playBeep = default(PlayBeep?), bool record = default(bool), string statusCallbackUrl = default(string), string waitUrl = default(string), string command = "CreateConference") : base(command) + public CreateConference( + string actionUrl = default(string), + bool alias = default(bool), + PlayBeep? playBeep = default(PlayBeep?), + bool record = default(bool), + string statusCallbackUrl = default(string), + string waitUrl = default(string), + string command = @"CreateConference" + ) + : base(command) { // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for CreateConference and cannot be null"); + if (actionUrl == null) + { + throw new ArgumentNullException( + "actionUrl is a required property for CreateConference and cannot be null" + ); } this.ActionUrl = actionUrl; + this.Alias = alias; + this.PlayBeep = playBeep; + this.Record = record; + this.StatusCallbackUrl = statusCallbackUrl; + this.WaitUrl = waitUrl; } /// - /// 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. + /// 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. /// /// 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. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = true)] public string ActionUrl { get; set; } /// - /// Descriptive name for the Conference. + /// Descriptive name for the Conference. /// /// Descriptive name for the Conference. [DataMember(Name = "alias", EmitDefaultValue = true)] @@ -166,108 +158,31 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the CreateConference instance. + /// Retrieve the KVP Dictionary for the CreateConference instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - props.Add("alias", Alias); - props.Add("playBeep", PlayBeep); - props.Add("record", Record); - props.Add("statusCallbackUrl", StatusCallbackUrl); - props.Add("waitUrl", WaitUrl); + props.Add("actionUrl", ActionUrl); + props.Add("alias", Alias); + props.Add("playBeep", PlayBeep); + props.Add("record", Record); + props.Add("statusCallbackUrl", StatusCallbackUrl); + props.Add("waitUrl", WaitUrl); IDictionary command = new Dictionary(); - command.Add("CreateConference",props); + command.Add("CreateConference", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateConference); - } - - /// - /// Returns true if CreateConference instances are equal - /// - /// Instance of CreateConference to be compared - /// Boolean - public bool Equals(CreateConference input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && base.Equals(input) && - ( - this.Alias == input.Alias || - this.Alias.Equals(input.Alias) - ) && base.Equals(input) && - ( - this.PlayBeep == input.PlayBeep || - this.PlayBeep.Equals(input.PlayBeep) - ) && base.Equals(input) && - ( - this.Record == input.Record || - this.Record.Equals(input.Record) - ) && base.Equals(input) && - ( - this.StatusCallbackUrl == input.StatusCallbackUrl || - (this.StatusCallbackUrl != null && - this.StatusCallbackUrl.Equals(input.StatusCallbackUrl)) - ) && base.Equals(input) && - ( - this.WaitUrl == input.WaitUrl || - (this.WaitUrl != null && - this.WaitUrl.Equals(input.WaitUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - hashCode = (hashCode * 59) + this.PlayBeep.GetHashCode(); - hashCode = (hashCode * 59) + this.Record.GetHashCode(); - if (this.StatusCallbackUrl != null) - { - hashCode = (hashCode * 59) + this.StatusCallbackUrl.GetHashCode(); - } - if (this.WaitUrl != null) - { - hashCode = (hashCode * 59) + this.WaitUrl.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -277,14 +192,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/CreateConferenceAllOf.cs b/src/freeclimb/Model/CreateConferenceAllOf.cs deleted file mode 100644 index d2ef907d..00000000 --- a/src/freeclimb/Model/CreateConferenceAllOf.cs +++ /dev/null @@ -1,238 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// CreateConferenceAllOf - /// - [DataContract(Name = "CreateConference_allOf")] - public partial class CreateConferenceAllOf : IEquatable, IValidatableObject - { - - /// - /// Gets or Sets PlayBeep - /// - [DataMember(Name = "playBeep", EmitDefaultValue = true)] - public PlayBeep? PlayBeep { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateConferenceAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// Descriptive name for the Conference. . - /// playBeep. - /// 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.. - /// This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available.. - /// 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.. - public CreateConferenceAllOf(string actionUrl = default(string), bool alias = default(bool), PlayBeep? playBeep = default(PlayBeep?), bool record = default(bool), string statusCallbackUrl = default(string), string waitUrl = default(string)) - { - // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for CreateConferenceAllOf and cannot be null"); - } - this.ActionUrl = actionUrl; - this.Alias = alias; - this.PlayBeep = playBeep; - this.Record = record; - this.StatusCallbackUrl = statusCallbackUrl; - this.WaitUrl = waitUrl; - } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] - public string ActionUrl { get; set; } - - /// - /// Descriptive name for the Conference. - /// - /// Descriptive name for the Conference. - [DataMember(Name = "alias", EmitDefaultValue = true)] - public bool Alias { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "record", EmitDefaultValue = true)] - public bool Record { get; set; } - - /// - /// This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available. - /// - /// This URL is invoked when the status of the Conference changes or when a recording of the Conference has become available. - [DataMember(Name = "statusCallbackUrl", EmitDefaultValue = false)] - public string StatusCallbackUrl { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "waitUrl", EmitDefaultValue = false)] - public string WaitUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateConferenceAllOf {\n"); - sb.Append(" ActionUrl: ").Append(ActionUrl).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" PlayBeep: ").Append(PlayBeep).Append("\n"); - sb.Append(" Record: ").Append(Record).Append("\n"); - sb.Append(" StatusCallbackUrl: ").Append(StatusCallbackUrl).Append("\n"); - sb.Append(" WaitUrl: ").Append(WaitUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the CreateConferenceAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - props.Add("alias", Alias); - props.Add("playBeep", PlayBeep); - props.Add("record", Record); - props.Add("statusCallbackUrl", StatusCallbackUrl); - props.Add("waitUrl", WaitUrl); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateConferenceAllOf); - } - - /// - /// Returns true if CreateConferenceAllOf instances are equal - /// - /// Instance of CreateConferenceAllOf to be compared - /// Boolean - public bool Equals(CreateConferenceAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && - ( - this.Alias == input.Alias || - this.Alias.Equals(input.Alias) - ) && - ( - this.PlayBeep == input.PlayBeep || - this.PlayBeep.Equals(input.PlayBeep) - ) && - ( - this.Record == input.Record || - this.Record.Equals(input.Record) - ) && - ( - this.StatusCallbackUrl == input.StatusCallbackUrl || - (this.StatusCallbackUrl != null && - this.StatusCallbackUrl.Equals(input.StatusCallbackUrl)) - ) && - ( - this.WaitUrl == input.WaitUrl || - (this.WaitUrl != null && - this.WaitUrl.Equals(input.WaitUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - hashCode = (hashCode * 59) + this.PlayBeep.GetHashCode(); - hashCode = (hashCode * 59) + this.Record.GetHashCode(); - if (this.StatusCallbackUrl != null) - { - hashCode = (hashCode * 59) + this.StatusCallbackUrl.GetHashCode(); - } - if (this.WaitUrl != null) - { - hashCode = (hashCode * 59) + this.WaitUrl.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/CreateConferenceRequest.cs b/src/freeclimb/Model/CreateConferenceRequest.cs index 41f691ac..53b6addd 100644 --- a/src/freeclimb/Model/CreateConferenceRequest.cs +++ b/src/freeclimb/Model/CreateConferenceRequest.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,14 +31,14 @@ namespace freeclimb.Model /// CreateConferenceRequest /// [DataContract(Name = "CreateConferenceRequest")] - public partial class CreateConferenceRequest : IEquatable, IValidatableObject + public partial class CreateConferenceRequest : IValidatableObject { - /// /// Gets or Sets PlayBeep /// [DataMember(Name = "playBeep", EmitDefaultValue = true)] public PlayBeep? PlayBeep { get; set; } + /// /// Initializes a new instance of the class. /// @@ -47,12 +47,22 @@ public partial class CreateConferenceRequest : IEquatableSetting to `true` records the entire Conference.. /// 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 &mdash; when the Conference is created.. /// This URL is invoked when the status of the Conference changes. For more information, see **statusCallbackUrl** (below).. - public CreateConferenceRequest(string alias = default(string), PlayBeep? playBeep = default(PlayBeep?), bool record = default(bool), string waitUrl = default(string), string statusCallbackUrl = default(string)) + public CreateConferenceRequest( + string alias = default(string), + PlayBeep? playBeep = default(PlayBeep?), + bool record = default(bool), + string waitUrl = default(string), + string statusCallbackUrl = default(string) + ) { this.Alias = alias; + this.PlayBeep = playBeep; + this.Record = record; + this.WaitUrl = waitUrl; + this.StatusCallbackUrl = statusCallbackUrl; } @@ -107,107 +117,37 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the CreateConferenceRequest instance. + /// Retrieve the KVP Dictionary for the CreateConferenceRequest instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("alias", Alias); - props.Add("playBeep", PlayBeep); - props.Add("record", Record); - props.Add("waitUrl", WaitUrl); - props.Add("statusCallbackUrl", StatusCallbackUrl); + props.Add("alias", Alias); + props.Add("playBeep", PlayBeep); + props.Add("record", Record); + props.Add("waitUrl", WaitUrl); + props.Add("statusCallbackUrl", StatusCallbackUrl); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateConferenceRequest); - } - - /// - /// Returns true if CreateConferenceRequest instances are equal - /// - /// Instance of CreateConferenceRequest to be compared - /// Boolean - public bool Equals(CreateConferenceRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.PlayBeep == input.PlayBeep || - this.PlayBeep.Equals(input.PlayBeep) - ) && - ( - this.Record == input.Record || - this.Record.Equals(input.Record) - ) && - ( - this.WaitUrl == input.WaitUrl || - (this.WaitUrl != null && - this.WaitUrl.Equals(input.WaitUrl)) - ) && - ( - this.StatusCallbackUrl == input.StatusCallbackUrl || - (this.StatusCallbackUrl != null && - this.StatusCallbackUrl.Equals(input.StatusCallbackUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PlayBeep.GetHashCode(); - hashCode = (hashCode * 59) + this.Record.GetHashCode(); - if (this.WaitUrl != null) - { - hashCode = (hashCode * 59) + this.WaitUrl.GetHashCode(); - } - if (this.StatusCallbackUrl != null) - { - hashCode = (hashCode * 59) + this.StatusCallbackUrl.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/CreateConferenceWebhook.cs b/src/freeclimb/Model/CreateConferenceWebhook.cs new file mode 100644 index 00000000..3c6d248b --- /dev/null +++ b/src/freeclimb/Model/CreateConferenceWebhook.cs @@ -0,0 +1,293 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// A Conference has been created and its statusCallbackUrl or actionUrl is being invoked. A PerCL response is expected if the actionUrl is being invoked. + /// + [DataContract(Name = "CreateConferenceWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class CreateConferenceWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", EmitDefaultValue = true)] + public ConferenceStatus? Status { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (default to "CreateConferenceWebhook"). + /// Unique ID for this Call, generated by FreeClimb.. + /// Account ID associated with your account.. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to you and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// Unique ID of the Conference.. + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null.. + /// status. + /// 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.. + /// 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.. + /// 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.. + public CreateConferenceWebhook( + string requestType = @"CreateConferenceWebhook", + string callId = default(string), + string accountId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + ConferenceStatus? status = default(ConferenceStatus?), + string recordingUrl = default(string), + string recordingId = default(string), + int? recordingDurationSec = default(int?) + ) + : base() + { + base.RequestType = requestType; + + this.CallId = callId; + + this.AccountId = accountId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.Status = status; + + this.RecordingUrl = recordingUrl; + + this.RecordingId = recordingId; + + this.RecordingDurationSec = recordingDurationSec; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance CreateConferenceWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static CreateConferenceWebhook Deserialize(string jsonPayload) + { + return (CreateConferenceWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(CreateConferenceWebhook), + _serializerSettings + ); + } + + /// + /// Unique ID for this Call, generated by FreeClimb. + /// + /// Unique ID for this Call, generated by FreeClimb. + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// Unique ID of the Conference. + /// + /// Unique ID of the Conference. + [DataMember(Name = "conferenceId", EmitDefaultValue = false)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "recordingUrl", EmitDefaultValue = true)] + public string RecordingUrl { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "recordingId", EmitDefaultValue = true)] + public string RecordingId { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "recordingDurationSec", EmitDefaultValue = true)] + public int? RecordingDurationSec { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CreateConferenceWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" RecordingUrl: ").Append(RecordingUrl).Append("\n"); + sb.Append(" RecordingId: ").Append(RecordingId).Append("\n"); + sb.Append(" RecordingDurationSec: ").Append(RecordingDurationSec).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the CreateConferenceWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("callId", CallId); + props.Add("accountId", AccountId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("status", Status); + props.Add("recordingUrl", RecordingUrl); + props.Add("recordingId", RecordingId); + props.Add("recordingDurationSec", RecordingDurationSec); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/CreateWebRTCToken.cs b/src/freeclimb/Model/CreateWebRTCToken.cs index dc32124f..9d73313b 100644 --- a/src/freeclimb/Model/CreateWebRTCToken.cs +++ b/src/freeclimb/Model/CreateWebRTCToken.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,31 +31,44 @@ namespace freeclimb.Model /// CreateWebRTCToken /// [DataContract(Name = "CreateWebRTCToken")] - public partial class CreateWebRTCToken : IEquatable, IValidatableObject + public partial class CreateWebRTCToken : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected CreateWebRTCToken() { } + /// /// Initializes a new instance of the class. /// /// E.164 formatted phone number to which calls using this token will be made. (required). /// E.164 formatted phone number owned by the reqeusting account from which calls using this token will be made. (required). /// number of times this token may be used for a WebRTC call (required). - public CreateWebRTCToken(string to = default(string), string from = default(string), int uses = default(int)) + public CreateWebRTCToken( + string to = default(string), + string from = default(string), + int uses = default(int) + ) { // to ensure "to" is required (not null) - if (to == null) { - throw new ArgumentNullException("to is a required property for CreateWebRTCToken and cannot be null"); + if (to == null) + { + throw new ArgumentNullException( + "to is a required property for CreateWebRTCToken and cannot be null" + ); } this.To = to; + // to ensure "from" is required (not null) - if (from == null) { - throw new ArgumentNullException("from is a required property for CreateWebRTCToken and cannot be null"); + if (from == null) + { + throw new ArgumentNullException( + "from is a required property for CreateWebRTCToken and cannot be null" + ); } this.From = from; + this.Uses = uses; } @@ -63,21 +76,21 @@ protected CreateWebRTCToken() { } /// E.164 formatted phone number to which calls using this token will be made. /// /// E.164 formatted phone number to which calls using this token will be made. - [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] public string To { get; set; } /// /// E.164 formatted phone number owned by the reqeusting account from which calls using this token will be made. /// /// E.164 formatted phone number owned by the reqeusting account from which calls using this token will be made. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = true)] public string From { get; set; } /// /// number of times this token may be used for a WebRTC call /// /// number of times this token may be used for a WebRTC call - [DataMember(Name = "uses", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "uses", IsRequired = true, EmitDefaultValue = true)] public int Uses { get; set; } /// @@ -101,97 +114,44 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the CreateWebRTCToken instance. + /// Retrieve the KVP Dictionary for the CreateWebRTCToken instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("to", To); - props.Add("from", From); - props.Add("uses", Uses); + props.Add("to", To); + props.Add("from", From); + props.Add("uses", Uses); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateWebRTCToken); - } - - /// - /// Returns true if CreateWebRTCToken instances are equal - /// - /// Instance of CreateWebRTCToken to be compared - /// Boolean - public bool Equals(CreateWebRTCToken input) - { - if (input == null) - { - return false; - } - return - ( - this.To == input.To || - (this.To != null && - this.To.Equals(input.To)) - ) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && - ( - this.Uses == input.Uses || - this.Uses.Equals(input.Uses) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.To != null) - { - hashCode = (hashCode * 59) + this.To.GetHashCode(); - } - if (this.From != null) - { - hashCode = (hashCode * 59) + this.From.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Uses.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { // Uses (int) minimum if (this.Uses < (int)1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Uses, must be a value greater than or equal to 1.", new [] { "Uses" }); + yield return new ValidationResult( + "Invalid value for Uses, must be a value greater than or equal to 1.", + new[] { "Uses" } + ); } yield break; } } - } diff --git a/src/freeclimb/Model/Dequeue.cs b/src/freeclimb/Model/Dequeue.cs index 4f992b13..289d2833 100644 --- a/src/freeclimb/Model/Dequeue.cs +++ b/src/freeclimb/Model/Dequeue.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,41 +33,14 @@ namespace freeclimb.Model /// [DataContract(Name = "Dequeue")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class Dequeue : PerclCommand, IEquatable, IValidatableObject + public partial class Dequeue : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "Dequeue"). - public Dequeue(string command = "Dequeue") : base(command) - { - } + public Dequeue(string command = @"Dequeue") + : base(command) { } /// /// Returns the string presentation of the object @@ -98,60 +71,25 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the Dequeue instance. + /// Retrieve the KVP Dictionary for the Dequeue instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); IDictionary command = new Dictionary(); - command.Add("Dequeue",props); + command.Add("Dequeue", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Dequeue); - } - - /// - /// Returns true if Dequeue instances are equal - /// - /// Instance of Dequeue to be compared - /// Boolean - public bool Equals(Dequeue input) - { - if (input == null) - { - return false; - } - return base.Equals(input); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -161,14 +99,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/DequeueWebhook.cs b/src/freeclimb/Model/DequeueWebhook.cs new file mode 100644 index 00000000..0ac24e55 --- /dev/null +++ b/src/freeclimb/Model/DequeueWebhook.cs @@ -0,0 +1,268 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// A queued call has been dequeued and the actionUrl of the corresponding Enqueue action is being invoked. A PerCL response is expected. + /// + [DataContract(Name = "DequeueWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class DequeueWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (default to "DequeueWebhook"). + /// Unique ID for this Call, generated by FreeClimb.. + /// Account ID associated with your account.. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to you and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// Unique ID of the Conference.. + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null.. + /// 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).. + /// Time (in seconds) the call spent in the Queue. This is only available if the Call was actually enqueued.. + public DequeueWebhook( + string requestType = @"DequeueWebhook", + string callId = default(string), + string accountId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + string queueResult = default(string), + int? queueTime = default(int?) + ) + : base() + { + base.RequestType = requestType; + + this.CallId = callId; + + this.AccountId = accountId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.QueueResult = queueResult; + + this.QueueTime = queueTime; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance DequeueWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static DequeueWebhook Deserialize(string jsonPayload) + { + return (DequeueWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(DequeueWebhook), + _serializerSettings + ); + } + + /// + /// Unique ID for this Call, generated by FreeClimb. + /// + /// Unique ID for this Call, generated by FreeClimb. + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// Unique ID of the Conference. + /// + /// Unique ID of the Conference. + [DataMember(Name = "conferenceId", EmitDefaultValue = false)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// 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). + /// + /// 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). + [DataMember(Name = "queueResult", EmitDefaultValue = false)] + public string QueueResult { get; set; } + + /// + /// Time (in seconds) the call spent in the Queue. This is only available if the Call was actually enqueued. + /// + /// Time (in seconds) the call spent in the Queue. This is only available if the Call was actually enqueued. + [DataMember(Name = "queueTime", EmitDefaultValue = true)] + public int? QueueTime { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DequeueWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" QueueResult: ").Append(QueueResult).Append("\n"); + sb.Append(" QueueTime: ").Append(QueueTime).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the DequeueWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("callId", CallId); + props.Add("accountId", AccountId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("queueResult", QueueResult); + props.Add("queueTime", QueueTime); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/Enqueue.cs b/src/freeclimb/Model/Enqueue.cs index 1b4a9a57..dbd5ec93 100644 --- a/src/freeclimb/Model/Enqueue.cs +++ b/src/freeclimb/Model/Enqueue.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,39 +33,14 @@ namespace freeclimb.Model /// [DataContract(Name = "Enqueue")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class Enqueue : PerclCommand, IEquatable, IValidatableObject + public partial class Enqueue : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected Enqueue() { } + /// /// Initializes a new instance of the class. /// @@ -74,23 +49,42 @@ protected Enqueue() { } /// 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. (required). /// 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. (required). /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "Enqueue"). - public Enqueue(string actionUrl = default(string), string notificationUrl = default(string), string queueId = default(string), string waitUrl = default(string), string command = "Enqueue") : base(command) + public Enqueue( + string actionUrl = default(string), + string notificationUrl = default(string), + string queueId = default(string), + string waitUrl = default(string), + string command = @"Enqueue" + ) + : base(command) { // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for Enqueue and cannot be null"); + if (actionUrl == null) + { + throw new ArgumentNullException( + "actionUrl is a required property for Enqueue and cannot be null" + ); } this.ActionUrl = actionUrl; + // to ensure "queueId" is required (not null) - if (queueId == null) { - throw new ArgumentNullException("queueId is a required property for Enqueue and cannot be null"); + if (queueId == null) + { + throw new ArgumentNullException( + "queueId is a required property for Enqueue and cannot be null" + ); } this.QueueId = queueId; + // to ensure "waitUrl" is required (not null) - if (waitUrl == null) { - throw new ArgumentNullException("waitUrl is a required property for Enqueue and cannot be null"); + if (waitUrl == null) + { + throw new ArgumentNullException( + "waitUrl is a required property for Enqueue and cannot be null" + ); } this.WaitUrl = waitUrl; + this.NotificationUrl = notificationUrl; } @@ -98,7 +92,7 @@ protected Enqueue() { } /// 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. /// /// 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. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = true)] public string ActionUrl { get; set; } /// @@ -112,14 +106,14 @@ protected Enqueue() { } /// 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. /// /// 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. - [DataMember(Name = "queueId", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "queueId", IsRequired = true, EmitDefaultValue = true)] public string QueueId { get; set; } /// /// 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. /// /// 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. - [DataMember(Name = "waitUrl", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "waitUrl", IsRequired = true, EmitDefaultValue = true)] public string WaitUrl { get; set; } /// @@ -155,100 +149,29 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the Enqueue instance. + /// Retrieve the KVP Dictionary for the Enqueue instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - props.Add("notificationUrl", NotificationUrl); - props.Add("queueId", QueueId); - props.Add("waitUrl", WaitUrl); + props.Add("actionUrl", ActionUrl); + props.Add("notificationUrl", NotificationUrl); + props.Add("queueId", QueueId); + props.Add("waitUrl", WaitUrl); IDictionary command = new Dictionary(); - command.Add("Enqueue",props); + command.Add("Enqueue", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Enqueue); - } - - /// - /// Returns true if Enqueue instances are equal - /// - /// Instance of Enqueue to be compared - /// Boolean - public bool Equals(Enqueue input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && base.Equals(input) && - ( - this.NotificationUrl == input.NotificationUrl || - (this.NotificationUrl != null && - this.NotificationUrl.Equals(input.NotificationUrl)) - ) && base.Equals(input) && - ( - this.QueueId == input.QueueId || - (this.QueueId != null && - this.QueueId.Equals(input.QueueId)) - ) && base.Equals(input) && - ( - this.WaitUrl == input.WaitUrl || - (this.WaitUrl != null && - this.WaitUrl.Equals(input.WaitUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - if (this.NotificationUrl != null) - { - hashCode = (hashCode * 59) + this.NotificationUrl.GetHashCode(); - } - if (this.QueueId != null) - { - hashCode = (hashCode * 59) + this.QueueId.GetHashCode(); - } - if (this.WaitUrl != null) - { - hashCode = (hashCode * 59) + this.WaitUrl.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -258,14 +181,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/EnqueueAllOf.cs b/src/freeclimb/Model/EnqueueAllOf.cs deleted file mode 100644 index a7210997..00000000 --- a/src/freeclimb/Model/EnqueueAllOf.cs +++ /dev/null @@ -1,219 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// EnqueueAllOf - /// - [DataContract(Name = "Enqueue_allOf")] - public partial class EnqueueAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EnqueueAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// 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.. - /// 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. (required). - /// 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. (required). - public EnqueueAllOf(string actionUrl = default(string), string notificationUrl = default(string), string queueId = default(string), string waitUrl = default(string)) - { - // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for EnqueueAllOf and cannot be null"); - } - this.ActionUrl = actionUrl; - // to ensure "queueId" is required (not null) - if (queueId == null) { - throw new ArgumentNullException("queueId is a required property for EnqueueAllOf and cannot be null"); - } - this.QueueId = queueId; - // to ensure "waitUrl" is required (not null) - if (waitUrl == null) { - throw new ArgumentNullException("waitUrl is a required property for EnqueueAllOf and cannot be null"); - } - this.WaitUrl = waitUrl; - this.NotificationUrl = notificationUrl; - } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] - public string ActionUrl { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "notificationUrl", EmitDefaultValue = false)] - public string NotificationUrl { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "queueId", IsRequired = true, EmitDefaultValue = false)] - public string QueueId { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "waitUrl", IsRequired = true, EmitDefaultValue = false)] - public string WaitUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class EnqueueAllOf {\n"); - sb.Append(" ActionUrl: ").Append(ActionUrl).Append("\n"); - sb.Append(" NotificationUrl: ").Append(NotificationUrl).Append("\n"); - sb.Append(" QueueId: ").Append(QueueId).Append("\n"); - sb.Append(" WaitUrl: ").Append(WaitUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the EnqueueAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - props.Add("notificationUrl", NotificationUrl); - props.Add("queueId", QueueId); - props.Add("waitUrl", WaitUrl); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EnqueueAllOf); - } - - /// - /// Returns true if EnqueueAllOf instances are equal - /// - /// Instance of EnqueueAllOf to be compared - /// Boolean - public bool Equals(EnqueueAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && - ( - this.NotificationUrl == input.NotificationUrl || - (this.NotificationUrl != null && - this.NotificationUrl.Equals(input.NotificationUrl)) - ) && - ( - this.QueueId == input.QueueId || - (this.QueueId != null && - this.QueueId.Equals(input.QueueId)) - ) && - ( - this.WaitUrl == input.WaitUrl || - (this.WaitUrl != null && - this.WaitUrl.Equals(input.WaitUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - if (this.NotificationUrl != null) - { - hashCode = (hashCode * 59) + this.NotificationUrl.GetHashCode(); - } - if (this.QueueId != null) - { - hashCode = (hashCode * 59) + this.QueueId.GetHashCode(); - } - if (this.WaitUrl != null) - { - hashCode = (hashCode * 59) + this.WaitUrl.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/FilterLogsRequest.cs b/src/freeclimb/Model/FilterLogsRequest.cs index adc94f3f..a399d480 100644 --- a/src/freeclimb/Model/FilterLogsRequest.cs +++ b/src/freeclimb/Model/FilterLogsRequest.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,13 +31,14 @@ namespace freeclimb.Model /// FilterLogsRequest /// [DataContract(Name = "FilterLogsRequest")] - public partial class FilterLogsRequest : IEquatable, IValidatableObject + public partial class FilterLogsRequest : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected FilterLogsRequest() { } + /// /// Initializes a new instance of the class. /// @@ -45,8 +46,11 @@ protected FilterLogsRequest() { } public FilterLogsRequest(string pql = default(string)) { // to ensure "pql" is required (not null) - if (pql == null) { - throw new ArgumentNullException("pql is a required property for FilterLogsRequest and cannot be null"); + if (pql == null) + { + throw new ArgumentNullException( + "pql is a required property for FilterLogsRequest and cannot be null" + ); } this.Pql = pql; } @@ -55,7 +59,7 @@ protected FilterLogsRequest() { } /// The filter query for retrieving logs. See **Performance Query Language** below. /// /// The filter query for retrieving logs. See **Performance Query Language** below. - [DataMember(Name = "pql", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "pql", IsRequired = true, EmitDefaultValue = true)] public string Pql { get; set; } /// @@ -77,75 +81,33 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the FilterLogsRequest instance. + /// Retrieve the KVP Dictionary for the FilterLogsRequest instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("pql", Pql); + props.Add("pql", Pql); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FilterLogsRequest); - } - - /// - /// Returns true if FilterLogsRequest instances are equal - /// - /// Instance of FilterLogsRequest to be compared - /// Boolean - public bool Equals(FilterLogsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Pql == input.Pql || - (this.Pql != null && - this.Pql.Equals(input.Pql)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Pql != null) - { - hashCode = (hashCode * 59) + this.Pql.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/GetDigits.cs b/src/freeclimb/Model/GetDigits.cs index 9d8f40d7..f3ac6739 100644 --- a/src/freeclimb/Model/GetDigits.cs +++ b/src/freeclimb/Model/GetDigits.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,39 +33,14 @@ namespace freeclimb.Model /// [DataContract(Name = "GetDigits")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class GetDigits : PerclCommand, IEquatable, IValidatableObject + public partial class GetDigits : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected GetDigits() { } + /// /// Initializes a new instance of the class. /// @@ -79,20 +54,43 @@ protected GetDigits() { } /// 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.. /// Parameter `privacyMode` will not log the `text` as required by PCI compliance.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "GetDigits"). - public GetDigits(string actionUrl = default(string), int digitTimeoutMs = default(int), string finishOnKey = default(string), bool flushBuffer = default(bool), int initialTimeoutMs = default(int), int maxDigits = default(int), int minDigits = default(int), List prompts = default(List), bool privacyMode = default(bool), string command = "GetDigits") : base(command) + public GetDigits( + string actionUrl = default(string), + int digitTimeoutMs = default(int), + string finishOnKey = default(string), + bool flushBuffer = default(bool), + int initialTimeoutMs = default(int), + int maxDigits = default(int), + int minDigits = default(int), + List prompts = default(List), + bool privacyMode = default(bool), + string command = @"GetDigits" + ) + : base(command) { // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for GetDigits and cannot be null"); + if (actionUrl == null) + { + throw new ArgumentNullException( + "actionUrl is a required property for GetDigits and cannot be null" + ); } this.ActionUrl = actionUrl; + this.DigitTimeoutMs = digitTimeoutMs; + this.FinishOnKey = finishOnKey; + this.FlushBuffer = flushBuffer; + this.InitialTimeoutMs = initialTimeoutMs; + this.MaxDigits = maxDigits; + this.MinDigits = minDigits; + this.Prompts = prompts; + this.PrivacyMode = privacyMode; } @@ -100,7 +98,7 @@ protected GetDigits() { } /// 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. /// /// 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. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = true)] public string ActionUrl { get; set; } /// @@ -197,132 +195,39 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the GetDigits instance. + /// Retrieve the KVP Dictionary for the GetDigits instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - props.Add("digitTimeoutMs", DigitTimeoutMs); - props.Add("finishOnKey", FinishOnKey); - props.Add("flushBuffer", FlushBuffer); - props.Add("initialTimeoutMs", InitialTimeoutMs); - props.Add("maxDigits", MaxDigits); - props.Add("minDigits", MinDigits); + props.Add("actionUrl", ActionUrl); + props.Add("digitTimeoutMs", DigitTimeoutMs); + props.Add("finishOnKey", FinishOnKey); + props.Add("flushBuffer", FlushBuffer); + props.Add("initialTimeoutMs", InitialTimeoutMs); + props.Add("maxDigits", MaxDigits); + props.Add("minDigits", MinDigits); List nested = new List(); foreach (var item in Prompts) { nested.Add(item); } - props.Add("prompts", nested); - props.Add("privacyMode", PrivacyMode); + props.Add("prompts", nested); + props.Add("privacyMode", PrivacyMode); IDictionary command = new Dictionary(); - command.Add("GetDigits",props); + command.Add("GetDigits", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetDigits); - } - - /// - /// Returns true if GetDigits instances are equal - /// - /// Instance of GetDigits to be compared - /// Boolean - public bool Equals(GetDigits input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && base.Equals(input) && - ( - this.DigitTimeoutMs == input.DigitTimeoutMs || - this.DigitTimeoutMs.Equals(input.DigitTimeoutMs) - ) && base.Equals(input) && - ( - this.FinishOnKey == input.FinishOnKey || - (this.FinishOnKey != null && - this.FinishOnKey.Equals(input.FinishOnKey)) - ) && base.Equals(input) && - ( - this.FlushBuffer == input.FlushBuffer || - this.FlushBuffer.Equals(input.FlushBuffer) - ) && base.Equals(input) && - ( - this.InitialTimeoutMs == input.InitialTimeoutMs || - this.InitialTimeoutMs.Equals(input.InitialTimeoutMs) - ) && base.Equals(input) && - ( - this.MaxDigits == input.MaxDigits || - this.MaxDigits.Equals(input.MaxDigits) - ) && base.Equals(input) && - ( - this.MinDigits == input.MinDigits || - this.MinDigits.Equals(input.MinDigits) - ) && base.Equals(input) && - ( - this.Prompts == input.Prompts || - this.Prompts != null && - input.Prompts != null && - this.Prompts.SequenceEqual(input.Prompts) - ) && base.Equals(input) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.DigitTimeoutMs.GetHashCode(); - if (this.FinishOnKey != null) - { - hashCode = (hashCode * 59) + this.FinishOnKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FlushBuffer.GetHashCode(); - hashCode = (hashCode * 59) + this.InitialTimeoutMs.GetHashCode(); - hashCode = (hashCode * 59) + this.MaxDigits.GetHashCode(); - hashCode = (hashCode * 59) + this.MinDigits.GetHashCode(); - if (this.Prompts != null) - { - hashCode = (hashCode * 59) + this.Prompts.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -332,14 +237,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/GetDigitsAllOf.cs b/src/freeclimb/Model/GetDigitsAllOf.cs deleted file mode 100644 index c2dbbc84..00000000 --- a/src/freeclimb/Model/GetDigitsAllOf.cs +++ /dev/null @@ -1,293 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// GetDigitsAllOf - /// - [DataContract(Name = "GetDigits_allOf")] - public partial class GetDigitsAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetDigitsAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// 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.. - /// 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`.. - /// 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.. - /// 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.. - /// 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`.. - /// 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.. - /// 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.. - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance.. - public GetDigitsAllOf(string actionUrl = default(string), int digitTimeoutMs = default(int), string finishOnKey = default(string), bool flushBuffer = default(bool), int initialTimeoutMs = default(int), int maxDigits = default(int), int minDigits = default(int), List prompts = default(List), bool privacyMode = default(bool)) - { - // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for GetDigitsAllOf and cannot be null"); - } - this.ActionUrl = actionUrl; - this.DigitTimeoutMs = digitTimeoutMs; - this.FinishOnKey = finishOnKey; - this.FlushBuffer = flushBuffer; - this.InitialTimeoutMs = initialTimeoutMs; - this.MaxDigits = maxDigits; - this.MinDigits = minDigits; - this.Prompts = prompts; - this.PrivacyMode = privacyMode; - } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] - public string ActionUrl { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "digitTimeoutMs", EmitDefaultValue = false)] - public int DigitTimeoutMs { get; set; } - - /// - /// 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`. - /// - /// 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`. - [DataMember(Name = "finishOnKey", EmitDefaultValue = false)] - public string FinishOnKey { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "flushBuffer", EmitDefaultValue = true)] - public bool FlushBuffer { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "initialTimeoutMs", EmitDefaultValue = false)] - public int InitialTimeoutMs { get; set; } - - /// - /// 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`. - /// - /// 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`. - [DataMember(Name = "maxDigits", EmitDefaultValue = false)] - public int MaxDigits { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "minDigits", EmitDefaultValue = false)] - public int MinDigits { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "prompts", EmitDefaultValue = false)] - public List Prompts { get; set; } - - /// - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance. - /// - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance. - [DataMember(Name = "privacyMode", EmitDefaultValue = true)] - public bool PrivacyMode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetDigitsAllOf {\n"); - sb.Append(" ActionUrl: ").Append(ActionUrl).Append("\n"); - sb.Append(" DigitTimeoutMs: ").Append(DigitTimeoutMs).Append("\n"); - sb.Append(" FinishOnKey: ").Append(FinishOnKey).Append("\n"); - sb.Append(" FlushBuffer: ").Append(FlushBuffer).Append("\n"); - sb.Append(" InitialTimeoutMs: ").Append(InitialTimeoutMs).Append("\n"); - sb.Append(" MaxDigits: ").Append(MaxDigits).Append("\n"); - sb.Append(" MinDigits: ").Append(MinDigits).Append("\n"); - sb.Append(" Prompts: ").Append(Prompts).Append("\n"); - sb.Append(" PrivacyMode: ").Append(PrivacyMode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the GetDigitsAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - props.Add("digitTimeoutMs", DigitTimeoutMs); - props.Add("finishOnKey", FinishOnKey); - props.Add("flushBuffer", FlushBuffer); - props.Add("initialTimeoutMs", InitialTimeoutMs); - props.Add("maxDigits", MaxDigits); - props.Add("minDigits", MinDigits); - List nested = new List(); - foreach (var item in Prompts) - { - nested.Add(item); - } - props.Add("prompts", nested); - props.Add("privacyMode", PrivacyMode); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetDigitsAllOf); - } - - /// - /// Returns true if GetDigitsAllOf instances are equal - /// - /// Instance of GetDigitsAllOf to be compared - /// Boolean - public bool Equals(GetDigitsAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && - ( - this.DigitTimeoutMs == input.DigitTimeoutMs || - this.DigitTimeoutMs.Equals(input.DigitTimeoutMs) - ) && - ( - this.FinishOnKey == input.FinishOnKey || - (this.FinishOnKey != null && - this.FinishOnKey.Equals(input.FinishOnKey)) - ) && - ( - this.FlushBuffer == input.FlushBuffer || - this.FlushBuffer.Equals(input.FlushBuffer) - ) && - ( - this.InitialTimeoutMs == input.InitialTimeoutMs || - this.InitialTimeoutMs.Equals(input.InitialTimeoutMs) - ) && - ( - this.MaxDigits == input.MaxDigits || - this.MaxDigits.Equals(input.MaxDigits) - ) && - ( - this.MinDigits == input.MinDigits || - this.MinDigits.Equals(input.MinDigits) - ) && - ( - this.Prompts == input.Prompts || - this.Prompts != null && - input.Prompts != null && - this.Prompts.SequenceEqual(input.Prompts) - ) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.DigitTimeoutMs.GetHashCode(); - if (this.FinishOnKey != null) - { - hashCode = (hashCode * 59) + this.FinishOnKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FlushBuffer.GetHashCode(); - hashCode = (hashCode * 59) + this.InitialTimeoutMs.GetHashCode(); - hashCode = (hashCode * 59) + this.MaxDigits.GetHashCode(); - hashCode = (hashCode * 59) + this.MinDigits.GetHashCode(); - if (this.Prompts != null) - { - hashCode = (hashCode * 59) + this.Prompts.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/GetDigitsWebhook.cs b/src/freeclimb/Model/GetDigitsWebhook.cs new file mode 100644 index 00000000..3a304bbf --- /dev/null +++ b/src/freeclimb/Model/GetDigitsWebhook.cs @@ -0,0 +1,280 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// A POST request with the following fields will be sent to the actionUrl provided in your GetDigits command. + /// + [DataContract(Name = "GetDigitsWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class GetDigitsWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Gets or Sets Reason + /// + [DataMember(Name = "reason", EmitDefaultValue = false)] + public GetDigitsReason? Reason { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// Context or reason why this request is being made. Will be getDigits - The GetDigits command has completed and its actionUrl is being invoked. (default to "GetDigitsWebhook"). + /// Unique ID for this Call, generated by FreeClimb.. + /// Account ID associated with your account.. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to you and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// Unique ID of the Conference.. + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null.. + /// 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. + /// ID of the Call that created this leg (child call).. + public GetDigitsWebhook( + string requestType = @"GetDigitsWebhook", + string callId = default(string), + string accountId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + string digits = default(string), + GetDigitsReason? reason = default(GetDigitsReason?), + string parentCallId = default(string) + ) + : base() + { + base.RequestType = requestType; + + this.CallId = callId; + + this.AccountId = accountId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.Digits = digits; + + this.Reason = reason; + + this.ParentCallId = parentCallId; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance GetDigitsWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static GetDigitsWebhook Deserialize(string jsonPayload) + { + return (GetDigitsWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(GetDigitsWebhook), + _serializerSettings + ); + } + + /// + /// Unique ID for this Call, generated by FreeClimb. + /// + /// Unique ID for this Call, generated by FreeClimb. + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// Unique ID of the Conference. + /// + /// Unique ID of the Conference. + [DataMember(Name = "conferenceId", EmitDefaultValue = false)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// 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 + /// + /// 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 + [DataMember(Name = "digits", EmitDefaultValue = false)] + public string Digits { get; set; } + + /// + /// ID of the Call that created this leg (child call). + /// + /// ID of the Call that created this leg (child call). + [DataMember(Name = "parentCallId", EmitDefaultValue = false)] + public string ParentCallId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetDigitsWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" Digits: ").Append(Digits).Append("\n"); + sb.Append(" Reason: ").Append(Reason).Append("\n"); + sb.Append(" ParentCallId: ").Append(ParentCallId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the GetDigitsWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("callId", CallId); + props.Add("accountId", AccountId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("digits", Digits); + props.Add("reason", Reason); + props.Add("parentCallId", ParentCallId); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/GetSpeech.cs b/src/freeclimb/Model/GetSpeech.cs index f86b4160..00935f41 100644 --- a/src/freeclimb/Model/GetSpeech.cs +++ b/src/freeclimb/Model/GetSpeech.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,45 +33,20 @@ namespace freeclimb.Model /// [DataContract(Name = "GetSpeech")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class GetSpeech : PerclCommand, IEquatable, IValidatableObject + public partial class GetSpeech : PerclCommand, IValidatableObject { - /// /// Gets or Sets GrammarType /// [DataMember(Name = "grammarType", EmitDefaultValue = true)] public GrammarType? GrammarType { get; set; } + /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected GetSpeech() { } + /// /// Initializes a new instance of the class. /// @@ -89,28 +64,62 @@ protected GetSpeech() { } /// 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.. /// Parameter privacyMode will not log the `text` as required by PCI compliance.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "GetSpeech"). - public GetSpeech(string actionUrl = default(string), GrammarType? grammarType = default(GrammarType?), string grammarFile = default(string), string grammarRule = default(string), bool playBeep = default(bool), List prompts = default(List), int noInputTimeoutMs = default(int), int recognitionTimeoutMs = default(int), decimal confidenceThreshold = default(decimal), decimal sensitivityLevel = default(decimal), int speechCompleteTimeoutMs = default(int), int speechIncompleteTimeoutMs = default(int), bool privacyMode = default(bool), string command = "GetSpeech") : base(command) + public GetSpeech( + string actionUrl = default(string), + GrammarType? grammarType = default(GrammarType?), + string grammarFile = default(string), + string grammarRule = default(string), + bool playBeep = default(bool), + List prompts = default(List), + int noInputTimeoutMs = default(int), + int recognitionTimeoutMs = default(int), + decimal confidenceThreshold = default(decimal), + decimal sensitivityLevel = default(decimal), + int speechCompleteTimeoutMs = default(int), + int speechIncompleteTimeoutMs = default(int), + bool privacyMode = default(bool), + string command = @"GetSpeech" + ) + : base(command) { // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for GetSpeech and cannot be null"); + if (actionUrl == null) + { + throw new ArgumentNullException( + "actionUrl is a required property for GetSpeech and cannot be null" + ); } this.ActionUrl = actionUrl; + // to ensure "grammarFile" is required (not null) - if (grammarFile == null) { - throw new ArgumentNullException("grammarFile is a required property for GetSpeech and cannot be null"); + if (grammarFile == null) + { + throw new ArgumentNullException( + "grammarFile is a required property for GetSpeech and cannot be null" + ); } this.GrammarFile = grammarFile; + this.GrammarType = grammarType; + this.GrammarRule = grammarRule; + this.PlayBeep = playBeep; + this.Prompts = prompts; + this.NoInputTimeoutMs = noInputTimeoutMs; + this.RecognitionTimeoutMs = recognitionTimeoutMs; + this.ConfidenceThreshold = confidenceThreshold; + this.SensitivityLevel = sensitivityLevel; + this.SpeechCompleteTimeoutMs = speechCompleteTimeoutMs; + this.SpeechIncompleteTimeoutMs = speechIncompleteTimeoutMs; + this.PrivacyMode = privacyMode; } @@ -118,14 +127,14 @@ protected GetSpeech() { } /// 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. /// /// 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. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = true)] public string ActionUrl { get; set; } /// /// The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL. /// /// The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL. - [DataMember(Name = "grammarFile", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "grammarFile", IsRequired = true, EmitDefaultValue = true)] public string GrammarFile { get; set; } /// @@ -171,7 +180,7 @@ protected GetSpeech() { } public decimal ConfidenceThreshold { get; set; } /// - /// 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 + /// 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 /// /// 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 [DataMember(Name = "sensitivityLevel", EmitDefaultValue = false)] @@ -218,7 +227,9 @@ public override string ToString() sb.Append(" ConfidenceThreshold: ").Append(ConfidenceThreshold).Append("\n"); sb.Append(" SensitivityLevel: ").Append(SensitivityLevel).Append("\n"); sb.Append(" SpeechCompleteTimeoutMs: ").Append(SpeechCompleteTimeoutMs).Append("\n"); - sb.Append(" SpeechIncompleteTimeoutMs: ").Append(SpeechIncompleteTimeoutMs).Append("\n"); + sb.Append(" SpeechIncompleteTimeoutMs: ") + .Append(SpeechIncompleteTimeoutMs) + .Append("\n"); sb.Append(" PrivacyMode: ").Append(PrivacyMode).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -240,160 +251,43 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the GetSpeech instance. + /// Retrieve the KVP Dictionary for the GetSpeech instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - props.Add("grammarType", GrammarType); - props.Add("grammarFile", GrammarFile); - props.Add("grammarRule", GrammarRule); - props.Add("playBeep", PlayBeep); + props.Add("actionUrl", ActionUrl); + props.Add("grammarType", GrammarType); + props.Add("grammarFile", GrammarFile); + props.Add("grammarRule", GrammarRule); + props.Add("playBeep", PlayBeep); List nested = new List(); foreach (var item in Prompts) { nested.Add(item); } - props.Add("prompts", nested); - props.Add("noInputTimeoutMs", NoInputTimeoutMs); - props.Add("recognitionTimeoutMs", RecognitionTimeoutMs); - props.Add("confidenceThreshold", ConfidenceThreshold); - props.Add("sensitivityLevel", SensitivityLevel); - props.Add("speechCompleteTimeoutMs", SpeechCompleteTimeoutMs); - props.Add("speechIncompleteTimeoutMs", SpeechIncompleteTimeoutMs); - props.Add("privacyMode", PrivacyMode); + props.Add("prompts", nested); + props.Add("noInputTimeoutMs", NoInputTimeoutMs); + props.Add("recognitionTimeoutMs", RecognitionTimeoutMs); + props.Add("confidenceThreshold", ConfidenceThreshold); + props.Add("sensitivityLevel", SensitivityLevel); + props.Add("speechCompleteTimeoutMs", SpeechCompleteTimeoutMs); + props.Add("speechIncompleteTimeoutMs", SpeechIncompleteTimeoutMs); + props.Add("privacyMode", PrivacyMode); IDictionary command = new Dictionary(); - command.Add("GetSpeech",props); + command.Add("GetSpeech", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetSpeech); - } - - /// - /// Returns true if GetSpeech instances are equal - /// - /// Instance of GetSpeech to be compared - /// Boolean - public bool Equals(GetSpeech input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && base.Equals(input) && - ( - this.GrammarType == input.GrammarType || - this.GrammarType.Equals(input.GrammarType) - ) && base.Equals(input) && - ( - this.GrammarFile == input.GrammarFile || - (this.GrammarFile != null && - this.GrammarFile.Equals(input.GrammarFile)) - ) && base.Equals(input) && - ( - this.GrammarRule == input.GrammarRule || - (this.GrammarRule != null && - this.GrammarRule.Equals(input.GrammarRule)) - ) && base.Equals(input) && - ( - this.PlayBeep == input.PlayBeep || - this.PlayBeep.Equals(input.PlayBeep) - ) && base.Equals(input) && - ( - this.Prompts == input.Prompts || - this.Prompts != null && - input.Prompts != null && - this.Prompts.SequenceEqual(input.Prompts) - ) && base.Equals(input) && - ( - this.NoInputTimeoutMs == input.NoInputTimeoutMs || - this.NoInputTimeoutMs.Equals(input.NoInputTimeoutMs) - ) && base.Equals(input) && - ( - this.RecognitionTimeoutMs == input.RecognitionTimeoutMs || - this.RecognitionTimeoutMs.Equals(input.RecognitionTimeoutMs) - ) && base.Equals(input) && - ( - this.ConfidenceThreshold == input.ConfidenceThreshold || - this.ConfidenceThreshold.Equals(input.ConfidenceThreshold) - ) && base.Equals(input) && - ( - this.SensitivityLevel == input.SensitivityLevel || - this.SensitivityLevel.Equals(input.SensitivityLevel) - ) && base.Equals(input) && - ( - this.SpeechCompleteTimeoutMs == input.SpeechCompleteTimeoutMs || - this.SpeechCompleteTimeoutMs.Equals(input.SpeechCompleteTimeoutMs) - ) && base.Equals(input) && - ( - this.SpeechIncompleteTimeoutMs == input.SpeechIncompleteTimeoutMs || - this.SpeechIncompleteTimeoutMs.Equals(input.SpeechIncompleteTimeoutMs) - ) && base.Equals(input) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.GrammarType.GetHashCode(); - if (this.GrammarFile != null) - { - hashCode = (hashCode * 59) + this.GrammarFile.GetHashCode(); - } - if (this.GrammarRule != null) - { - hashCode = (hashCode * 59) + this.GrammarRule.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PlayBeep.GetHashCode(); - if (this.Prompts != null) - { - hashCode = (hashCode * 59) + this.Prompts.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NoInputTimeoutMs.GetHashCode(); - hashCode = (hashCode * 59) + this.RecognitionTimeoutMs.GetHashCode(); - hashCode = (hashCode * 59) + this.ConfidenceThreshold.GetHashCode(); - hashCode = (hashCode * 59) + this.SensitivityLevel.GetHashCode(); - hashCode = (hashCode * 59) + this.SpeechCompleteTimeoutMs.GetHashCode(); - hashCode = (hashCode * 59) + this.SpeechIncompleteTimeoutMs.GetHashCode(); - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -403,14 +297,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/GetSpeechAllOf.cs b/src/freeclimb/Model/GetSpeechAllOf.cs deleted file mode 100644 index 9f559f36..00000000 --- a/src/freeclimb/Model/GetSpeechAllOf.cs +++ /dev/null @@ -1,364 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// GetSpeechAllOf - /// - [DataContract(Name = "GetSpeech_allOf")] - public partial class GetSpeechAllOf : IEquatable, IValidatableObject - { - - /// - /// Gets or Sets GrammarType - /// - [DataMember(Name = "grammarType", EmitDefaultValue = true)] - public GrammarType? GrammarType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetSpeechAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// grammarType. - /// The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL. (required). - /// 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`.. - /// Indicates whether a beep should be played just before speech recognition is initiated so that the speaker can start to speak.. - /// 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.. - /// When recognition is started and there is no speech detected for `noInputTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.. - /// When playback of prompts ends and there is no match for `recognitionTimeoutMs` milliseconds, the recognizer will terminate the recognition operation.. - /// 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.. - /// 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 . - /// 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.. - /// 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.. - /// Parameter privacyMode will not log the `text` as required by PCI compliance.. - public GetSpeechAllOf(string actionUrl = default(string), GrammarType? grammarType = default(GrammarType?), string grammarFile = default(string), string grammarRule = default(string), bool playBeep = default(bool), List prompts = default(List), int noInputTimeoutMs = default(int), int recognitionTimeoutMs = default(int), decimal confidenceThreshold = default(decimal), decimal sensitivityLevel = default(decimal), int speechCompleteTimeoutMs = default(int), int speechIncompleteTimeoutMs = default(int), bool privacyMode = default(bool)) - { - // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for GetSpeechAllOf and cannot be null"); - } - this.ActionUrl = actionUrl; - // to ensure "grammarFile" is required (not null) - if (grammarFile == null) { - throw new ArgumentNullException("grammarFile is a required property for GetSpeechAllOf and cannot be null"); - } - this.GrammarFile = grammarFile; - this.GrammarType = grammarType; - this.GrammarRule = grammarRule; - this.PlayBeep = playBeep; - this.Prompts = prompts; - this.NoInputTimeoutMs = noInputTimeoutMs; - this.RecognitionTimeoutMs = recognitionTimeoutMs; - this.ConfidenceThreshold = confidenceThreshold; - this.SensitivityLevel = sensitivityLevel; - this.SpeechCompleteTimeoutMs = speechCompleteTimeoutMs; - this.SpeechIncompleteTimeoutMs = speechIncompleteTimeoutMs; - this.PrivacyMode = privacyMode; - } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] - public string ActionUrl { get; set; } - - /// - /// The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL. - /// - /// The grammar file to use for speech recognition. If grammarType is set to URL, this attribute is specified as a download URL. - [DataMember(Name = "grammarFile", IsRequired = true, EmitDefaultValue = false)] - public string GrammarFile { get; set; } - - /// - /// 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`. - /// - /// 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`. - [DataMember(Name = "grammarRule", EmitDefaultValue = false)] - public string GrammarRule { get; set; } - - /// - /// Indicates whether a beep should be played just before speech recognition is initiated so that the speaker can start to speak. - /// - /// Indicates whether a beep should be played just before speech recognition is initiated so that the speaker can start to speak. - [DataMember(Name = "playBeep", EmitDefaultValue = true)] - public bool PlayBeep { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "prompts", EmitDefaultValue = false)] - public List Prompts { get; set; } - - /// - /// When recognition is started and there is no speech detected for `noInputTimeoutMs` milliseconds, the recognizer will terminate the recognition operation. - /// - /// When recognition is started and there is no speech detected for `noInputTimeoutMs` milliseconds, the recognizer will terminate the recognition operation. - [DataMember(Name = "noInputTimeoutMs", EmitDefaultValue = false)] - public int NoInputTimeoutMs { get; set; } - - /// - /// When playback of prompts ends and there is no match for `recognitionTimeoutMs` milliseconds, the recognizer will terminate the recognition operation. - /// - /// When playback of prompts ends and there is no match for `recognitionTimeoutMs` milliseconds, the recognizer will terminate the recognition operation. - [DataMember(Name = "recognitionTimeoutMs", EmitDefaultValue = false)] - public int RecognitionTimeoutMs { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "confidenceThreshold", EmitDefaultValue = false)] - public decimal ConfidenceThreshold { get; set; } - - /// - /// 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 - /// - /// 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 - [DataMember(Name = "sensitivityLevel", EmitDefaultValue = false)] - public decimal SensitivityLevel { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "speechCompleteTimeoutMs", EmitDefaultValue = false)] - public int SpeechCompleteTimeoutMs { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "speechIncompleteTimeoutMs", EmitDefaultValue = false)] - public int SpeechIncompleteTimeoutMs { get; set; } - - /// - /// Parameter privacyMode will not log the `text` as required by PCI compliance. - /// - /// Parameter privacyMode will not log the `text` as required by PCI compliance. - [DataMember(Name = "privacyMode", EmitDefaultValue = true)] - public bool PrivacyMode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetSpeechAllOf {\n"); - sb.Append(" ActionUrl: ").Append(ActionUrl).Append("\n"); - sb.Append(" GrammarType: ").Append(GrammarType).Append("\n"); - sb.Append(" GrammarFile: ").Append(GrammarFile).Append("\n"); - sb.Append(" GrammarRule: ").Append(GrammarRule).Append("\n"); - sb.Append(" PlayBeep: ").Append(PlayBeep).Append("\n"); - sb.Append(" Prompts: ").Append(Prompts).Append("\n"); - sb.Append(" NoInputTimeoutMs: ").Append(NoInputTimeoutMs).Append("\n"); - sb.Append(" RecognitionTimeoutMs: ").Append(RecognitionTimeoutMs).Append("\n"); - sb.Append(" ConfidenceThreshold: ").Append(ConfidenceThreshold).Append("\n"); - sb.Append(" SensitivityLevel: ").Append(SensitivityLevel).Append("\n"); - sb.Append(" SpeechCompleteTimeoutMs: ").Append(SpeechCompleteTimeoutMs).Append("\n"); - sb.Append(" SpeechIncompleteTimeoutMs: ").Append(SpeechIncompleteTimeoutMs).Append("\n"); - sb.Append(" PrivacyMode: ").Append(PrivacyMode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the GetSpeechAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - props.Add("grammarType", GrammarType); - props.Add("grammarFile", GrammarFile); - props.Add("grammarRule", GrammarRule); - props.Add("playBeep", PlayBeep); - List nested = new List(); - foreach (var item in Prompts) - { - nested.Add(item); - } - props.Add("prompts", nested); - props.Add("noInputTimeoutMs", NoInputTimeoutMs); - props.Add("recognitionTimeoutMs", RecognitionTimeoutMs); - props.Add("confidenceThreshold", ConfidenceThreshold); - props.Add("sensitivityLevel", SensitivityLevel); - props.Add("speechCompleteTimeoutMs", SpeechCompleteTimeoutMs); - props.Add("speechIncompleteTimeoutMs", SpeechIncompleteTimeoutMs); - props.Add("privacyMode", PrivacyMode); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetSpeechAllOf); - } - - /// - /// Returns true if GetSpeechAllOf instances are equal - /// - /// Instance of GetSpeechAllOf to be compared - /// Boolean - public bool Equals(GetSpeechAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && - ( - this.GrammarType == input.GrammarType || - this.GrammarType.Equals(input.GrammarType) - ) && - ( - this.GrammarFile == input.GrammarFile || - (this.GrammarFile != null && - this.GrammarFile.Equals(input.GrammarFile)) - ) && - ( - this.GrammarRule == input.GrammarRule || - (this.GrammarRule != null && - this.GrammarRule.Equals(input.GrammarRule)) - ) && - ( - this.PlayBeep == input.PlayBeep || - this.PlayBeep.Equals(input.PlayBeep) - ) && - ( - this.Prompts == input.Prompts || - this.Prompts != null && - input.Prompts != null && - this.Prompts.SequenceEqual(input.Prompts) - ) && - ( - this.NoInputTimeoutMs == input.NoInputTimeoutMs || - this.NoInputTimeoutMs.Equals(input.NoInputTimeoutMs) - ) && - ( - this.RecognitionTimeoutMs == input.RecognitionTimeoutMs || - this.RecognitionTimeoutMs.Equals(input.RecognitionTimeoutMs) - ) && - ( - this.ConfidenceThreshold == input.ConfidenceThreshold || - this.ConfidenceThreshold.Equals(input.ConfidenceThreshold) - ) && - ( - this.SensitivityLevel == input.SensitivityLevel || - this.SensitivityLevel.Equals(input.SensitivityLevel) - ) && - ( - this.SpeechCompleteTimeoutMs == input.SpeechCompleteTimeoutMs || - this.SpeechCompleteTimeoutMs.Equals(input.SpeechCompleteTimeoutMs) - ) && - ( - this.SpeechIncompleteTimeoutMs == input.SpeechIncompleteTimeoutMs || - this.SpeechIncompleteTimeoutMs.Equals(input.SpeechIncompleteTimeoutMs) - ) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.GrammarType.GetHashCode(); - if (this.GrammarFile != null) - { - hashCode = (hashCode * 59) + this.GrammarFile.GetHashCode(); - } - if (this.GrammarRule != null) - { - hashCode = (hashCode * 59) + this.GrammarRule.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PlayBeep.GetHashCode(); - if (this.Prompts != null) - { - hashCode = (hashCode * 59) + this.Prompts.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NoInputTimeoutMs.GetHashCode(); - hashCode = (hashCode * 59) + this.RecognitionTimeoutMs.GetHashCode(); - hashCode = (hashCode * 59) + this.ConfidenceThreshold.GetHashCode(); - hashCode = (hashCode * 59) + this.SensitivityLevel.GetHashCode(); - hashCode = (hashCode * 59) + this.SpeechCompleteTimeoutMs.GetHashCode(); - hashCode = (hashCode * 59) + this.SpeechIncompleteTimeoutMs.GetHashCode(); - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/GetSpeechWebhook.cs b/src/freeclimb/Model/GetSpeechWebhook.cs new file mode 100644 index 00000000..2f5f6faa --- /dev/null +++ b/src/freeclimb/Model/GetSpeechWebhook.cs @@ -0,0 +1,345 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// The GetSpeech command has completed and its actionUrl is being invoked. A PerCL response is expected, unless reason is hangup. + /// + [DataContract(Name = "GetSpeechWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class GetSpeechWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Gets or Sets Reason + /// + [DataMember(Name = "reason", EmitDefaultValue = false)] + public GetSpeechReason? Reason { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// Context or reason why this request is being made. Will be getSpeech - The GetSpeech command has completed and its actionUrl is being invoked. (default to "GetSpeechWebhook"). + /// Unique ID for this Call, generated by FreeClimb.. + /// Account ID associated with your account.. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to you and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// Unique ID of the Conference.. + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null.. + /// reason. + /// 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.. + /// 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.. + /// ID of the Call that created this leg (child call).. + /// Advanced diagnostic information if reason was error. See RFC 6787 section 9.4.12 - speech recognition.. + /// Advanced diagnostic information if reason was error. See RFC 6787 section 9.4.11 - speech recognition.. + /// Advanced diagnostic information if reason was error. See RFC 6787 section 5.4 - MRCPv2 specification.. + /// Advanced diagnostic information if reason was error. See RFC 6787 section 5.4 - MRCPv2 specification.. + public GetSpeechWebhook( + string requestType = @"GetSpeechWebhook", + string callId = default(string), + string accountId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + GetSpeechReason? reason = default(GetSpeechReason?), + string recognitionResult = default(string), + int confidence = default(int), + string parentCallId = default(string), + string completionReason = default(string), + string completionCause = default(string), + int mrcpCode = default(int), + string mrcpDiagnostic = default(string) + ) + : base() + { + base.RequestType = requestType; + + this.CallId = callId; + + this.AccountId = accountId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.Reason = reason; + + this.RecognitionResult = recognitionResult; + + this.Confidence = confidence; + + this.ParentCallId = parentCallId; + + this.CompletionReason = completionReason; + + this.CompletionCause = completionCause; + + this.MrcpCode = mrcpCode; + + this.MrcpDiagnostic = mrcpDiagnostic; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance GetSpeechWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static GetSpeechWebhook Deserialize(string jsonPayload) + { + return (GetSpeechWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(GetSpeechWebhook), + _serializerSettings + ); + } + + /// + /// Unique ID for this Call, generated by FreeClimb. + /// + /// Unique ID for this Call, generated by FreeClimb. + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// Unique ID of the Conference. + /// + /// Unique ID of the Conference. + [DataMember(Name = "conferenceId", EmitDefaultValue = false)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "recognitionResult", EmitDefaultValue = false)] + public string RecognitionResult { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "confidence", EmitDefaultValue = false)] + public int Confidence { get; set; } + + /// + /// ID of the Call that created this leg (child call). + /// + /// ID of the Call that created this leg (child call). + [DataMember(Name = "parentCallId", EmitDefaultValue = false)] + public string ParentCallId { get; set; } + + /// + /// Advanced diagnostic information if reason was error. See RFC 6787 section 9.4.12 - speech recognition. + /// + /// Advanced diagnostic information if reason was error. See RFC 6787 section 9.4.12 - speech recognition. + [DataMember(Name = "completionReason", EmitDefaultValue = false)] + public string CompletionReason { get; set; } + + /// + /// Advanced diagnostic information if reason was error. See RFC 6787 section 9.4.11 - speech recognition. + /// + /// Advanced diagnostic information if reason was error. See RFC 6787 section 9.4.11 - speech recognition. + [DataMember(Name = "completionCause", EmitDefaultValue = false)] + public string CompletionCause { get; set; } + + /// + /// Advanced diagnostic information if reason was error. See RFC 6787 section 5.4 - MRCPv2 specification. + /// + /// Advanced diagnostic information if reason was error. See RFC 6787 section 5.4 - MRCPv2 specification. + [DataMember(Name = "mrcpCode", EmitDefaultValue = false)] + public int MrcpCode { get; set; } + + /// + /// Advanced diagnostic information if reason was error. See RFC 6787 section 5.4 - MRCPv2 specification. + /// + /// Advanced diagnostic information if reason was error. See RFC 6787 section 5.4 - MRCPv2 specification. + [DataMember(Name = "mrcpDiagnostic", EmitDefaultValue = false)] + public string MrcpDiagnostic { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GetSpeechWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" Reason: ").Append(Reason).Append("\n"); + sb.Append(" RecognitionResult: ").Append(RecognitionResult).Append("\n"); + sb.Append(" Confidence: ").Append(Confidence).Append("\n"); + sb.Append(" ParentCallId: ").Append(ParentCallId).Append("\n"); + sb.Append(" CompletionReason: ").Append(CompletionReason).Append("\n"); + sb.Append(" CompletionCause: ").Append(CompletionCause).Append("\n"); + sb.Append(" MrcpCode: ").Append(MrcpCode).Append("\n"); + sb.Append(" MrcpDiagnostic: ").Append(MrcpDiagnostic).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the GetSpeechWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("callId", CallId); + props.Add("accountId", AccountId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("reason", Reason); + props.Add("recognitionResult", RecognitionResult); + props.Add("confidence", Confidence); + props.Add("parentCallId", ParentCallId); + props.Add("completionReason", CompletionReason); + props.Add("completionCause", CompletionCause); + props.Add("mrcpCode", MrcpCode); + props.Add("mrcpDiagnostic", MrcpDiagnostic); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/Hangup.cs b/src/freeclimb/Model/Hangup.cs index 1ed177f4..44f43fbf 100644 --- a/src/freeclimb/Model/Hangup.cs +++ b/src/freeclimb/Model/Hangup.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,40 +33,15 @@ namespace freeclimb.Model /// [DataContract(Name = "Hangup")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class Hangup : PerclCommand, IEquatable, IValidatableObject + public partial class Hangup : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// /// 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.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "Hangup"). - public Hangup(string reason = default(string), string command = "Hangup") : base(command) + public Hangup(string reason = default(string), string command = @"Hangup") + : base(command) { this.Reason = reason; } @@ -108,70 +83,26 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the Hangup instance. + /// Retrieve the KVP Dictionary for the Hangup instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("reason", Reason); + props.Add("reason", Reason); IDictionary command = new Dictionary(); - command.Add("Hangup",props); + command.Add("Hangup", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Hangup); - } - - /// - /// Returns true if Hangup instances are equal - /// - /// Instance of Hangup to be compared - /// Boolean - public bool Equals(Hangup input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -181,14 +112,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/HangupAllOf.cs b/src/freeclimb/Model/HangupAllOf.cs deleted file mode 100644 index b4d50c47..00000000 --- a/src/freeclimb/Model/HangupAllOf.cs +++ /dev/null @@ -1,142 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// HangupAllOf - /// - [DataContract(Name = "Hangup_allOf")] - public partial class HangupAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// 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.. - public HangupAllOf(string reason = default(string)) - { - this.Reason = reason; - } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public string Reason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class HangupAllOf {\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the HangupAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("reason", Reason); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HangupAllOf); - } - - /// - /// Returns true if HangupAllOf instances are equal - /// - /// Instance of HangupAllOf to be compared - /// Boolean - public bool Equals(HangupAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/InboundCallWebhook.cs b/src/freeclimb/Model/InboundCallWebhook.cs new file mode 100644 index 00000000..beb2ce64 --- /dev/null +++ b/src/freeclimb/Model/InboundCallWebhook.cs @@ -0,0 +1,254 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// 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. + /// + [DataContract(Name = "InboundCallWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class InboundCallWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// Context or reason why this request is being made. Will be inboundCall - An inbound call was received and the voiceUrl is being invoked. (default to "InboundCallWebhook"). + /// Unique ID for this Call, generated by FreeClimb.. + /// Account ID associated with your account.. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to you and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// This is only populated if request pertains to a Conference. Otherwise, it is set to null.. + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null.. + /// parentCallId. + public InboundCallWebhook( + string requestType = @"InboundCallWebhook", + string callId = default(string), + string accountId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + string parentCallId = default(string) + ) + : base() + { + base.RequestType = requestType; + + this.CallId = callId; + + this.AccountId = accountId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.ParentCallId = parentCallId; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance InboundCallWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static InboundCallWebhook Deserialize(string jsonPayload) + { + return (InboundCallWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(InboundCallWebhook), + _serializerSettings + ); + } + + /// + /// Unique ID for this Call, generated by FreeClimb. + /// + /// Unique ID for this Call, generated by FreeClimb. + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// This is only populated if request pertains to a Conference. Otherwise, it is set to null. + /// + /// This is only populated if request pertains to a Conference. Otherwise, it is set to null. + [DataMember(Name = "conferenceId", EmitDefaultValue = true)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// Gets or Sets ParentCallId + /// + [DataMember(Name = "parentCallId", EmitDefaultValue = true)] + public string ParentCallId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class InboundCallWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" ParentCallId: ").Append(ParentCallId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the InboundCallWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("callId", CallId); + props.Add("accountId", AccountId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("parentCallId", ParentCallId); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/IncomingNumberList.cs b/src/freeclimb/Model/IncomingNumberList.cs index 2227c12b..57e157cc 100644 --- a/src/freeclimb/Model/IncomingNumberList.cs +++ b/src/freeclimb/Model/IncomingNumberList.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// IncomingNumberList /// [DataContract(Name = "IncomingNumberList")] - public partial class IncomingNumberList : IPagination, IEquatable, IValidatableObject + public partial class IncomingNumberList : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,31 @@ public partial class IncomingNumberList : IPagination, IEquatableNumber of items per page. /// Uri to retrieve the next page of items. /// incomingPhoneNumbers. - public IncomingNumberList(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List incomingPhoneNumbers = default(List)) + public IncomingNumberList( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List incomingPhoneNumbers = default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.IncomingPhoneNumbers = incomingPhoneNumbers; } @@ -138,151 +154,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the IncomingNumberList instance. + /// Retrieve the KVP Dictionary for the IncomingNumberList instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in IncomingPhoneNumbers) { nested.Add(item); } - props.Add("incomingPhoneNumbers", nested); + props.Add("incomingPhoneNumbers", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IncomingNumberList); - } - - /// - /// Returns true if IncomingNumberList instances are equal - /// - /// Instance of IncomingNumberList to be compared - /// Boolean - public bool Equals(IncomingNumberList input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.IncomingPhoneNumbers == input.IncomingPhoneNumbers || - this.IncomingPhoneNumbers != null && - input.IncomingPhoneNumbers != null && - this.IncomingPhoneNumbers.SequenceEqual(input.IncomingPhoneNumbers) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.IncomingPhoneNumbers != null) - { - hashCode = (hashCode * 59) + this.IncomingPhoneNumbers.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/IncomingNumberListAllOf.cs b/src/freeclimb/Model/IncomingNumberListAllOf.cs deleted file mode 100644 index fc39b403..00000000 --- a/src/freeclimb/Model/IncomingNumberListAllOf.cs +++ /dev/null @@ -1,147 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// IncomingNumberListAllOf - /// - [DataContract(Name = "IncomingNumberList_allOf")] - public partial class IncomingNumberListAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// incomingPhoneNumbers. - public IncomingNumberListAllOf(List incomingPhoneNumbers = default(List)) - { - this.IncomingPhoneNumbers = incomingPhoneNumbers; - } - - /// - /// Gets or Sets IncomingPhoneNumbers - /// - [DataMember(Name = "incomingPhoneNumbers", EmitDefaultValue = true)] - public List IncomingPhoneNumbers { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IncomingNumberListAllOf {\n"); - sb.Append(" IncomingPhoneNumbers: ").Append(IncomingPhoneNumbers).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the IncomingNumberListAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in IncomingPhoneNumbers) - { - nested.Add(item); - } - props.Add("incomingPhoneNumbers", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IncomingNumberListAllOf); - } - - /// - /// Returns true if IncomingNumberListAllOf instances are equal - /// - /// Instance of IncomingNumberListAllOf to be compared - /// Boolean - public bool Equals(IncomingNumberListAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.IncomingPhoneNumbers == input.IncomingPhoneNumbers || - this.IncomingPhoneNumbers != null && - input.IncomingPhoneNumbers != null && - this.IncomingPhoneNumbers.SequenceEqual(input.IncomingPhoneNumbers) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.IncomingPhoneNumbers != null) - { - hashCode = (hashCode * 59) + this.IncomingPhoneNumbers.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/IncomingNumberRequest.cs b/src/freeclimb/Model/IncomingNumberRequest.cs index fe550b94..f01db395 100644 --- a/src/freeclimb/Model/IncomingNumberRequest.cs +++ b/src/freeclimb/Model/IncomingNumberRequest.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// IncomingNumberRequest /// [DataContract(Name = "IncomingNumberRequest")] - public partial class IncomingNumberRequest : IEquatable, IValidatableObject + public partial class IncomingNumberRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -39,10 +39,16 @@ public partial class IncomingNumberRequest : IEquatable, /// ID of the Application that should handle calls to this number.. /// Description for this phone number.. /// The campaign ID generated by the campaign registry. - public IncomingNumberRequest(string applicationId = default(string), string alias = default(string), string campaignId = default(string)) + public IncomingNumberRequest( + string applicationId = default(string), + string alias = default(string), + string campaignId = default(string) + ) { this.ApplicationId = applicationId; + this.Alias = alias; + this.CampaignId = campaignId; } @@ -88,95 +94,35 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the IncomingNumberRequest instance. + /// Retrieve the KVP Dictionary for the IncomingNumberRequest instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("applicationId", ApplicationId); - props.Add("alias", Alias); - props.Add("campaignId", CampaignId); + props.Add("applicationId", ApplicationId); + props.Add("alias", Alias); + props.Add("campaignId", CampaignId); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IncomingNumberRequest); - } - - /// - /// Returns true if IncomingNumberRequest instances are equal - /// - /// Instance of IncomingNumberRequest to be compared - /// Boolean - public bool Equals(IncomingNumberRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ApplicationId == input.ApplicationId || - (this.ApplicationId != null && - this.ApplicationId.Equals(input.ApplicationId)) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.CampaignId == input.CampaignId || - (this.CampaignId != null && - this.CampaignId.Equals(input.CampaignId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ApplicationId != null) - { - hashCode = (hashCode * 59) + this.ApplicationId.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.CampaignId != null) - { - hashCode = (hashCode * 59) + this.CampaignId.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/IncomingNumberResult.cs b/src/freeclimb/Model/IncomingNumberResult.cs index 7f261d78..9519cdd9 100644 --- a/src/freeclimb/Model/IncomingNumberResult.cs +++ b/src/freeclimb/Model/IncomingNumberResult.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// IncomingNumberResult /// [DataContract(Name = "IncomingNumberResult")] - public partial class IncomingNumberResult : IEquatable, IValidatableObject + public partial class IncomingNumberResult : IValidatableObject { /// /// Initializes a new instance of the class. @@ -53,24 +53,58 @@ public partial class IncomingNumberResult : IEquatable, IV /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers.. /// 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. - public IncomingNumberResult(string uri = default(string), string dateCreated = default(string), string dateUpdated = default(string), int revision = default(int), Capabilities capabilities = default(Capabilities), string campaignId = default(string), string phoneNumberId = default(string), string accountId = default(string), string applicationId = default(string), string phoneNumber = default(string), string alias = default(string), string region = default(string), string country = default(string), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? offnet = default(bool?), TFN tfn = default(TFN)) + public IncomingNumberResult( + string uri = default(string), + string dateCreated = default(string), + string dateUpdated = default(string), + int revision = default(int), + Capabilities capabilities = default(Capabilities), + string campaignId = default(string), + string phoneNumberId = default(string), + string accountId = default(string), + string applicationId = default(string), + string phoneNumber = default(string), + string alias = default(string), + string region = default(string), + string country = default(string), + bool? voiceEnabled = default(bool?), + bool? smsEnabled = default(bool?), + bool? offnet = default(bool?), + TFN tfn = default(TFN) + ) { this.Uri = uri; + this.DateCreated = dateCreated; + this.DateUpdated = dateUpdated; + this.Revision = revision; + this.Capabilities = capabilities; + this.CampaignId = campaignId; + this.PhoneNumberId = phoneNumberId; + this.AccountId = accountId; + this.ApplicationId = applicationId; + this.PhoneNumber = phoneNumber; + this.Alias = alias; + this.Region = region; + this.Country = country; + this.VoiceEnabled = voiceEnabled; + this.SmsEnabled = smsEnabled; + this.Offnet = offnet; + this.Tfn = tfn; } @@ -228,231 +262,49 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the IncomingNumberResult instance. + /// Retrieve the KVP Dictionary for the IncomingNumberResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("uri", Uri); - props.Add("dateCreated", DateCreated); - props.Add("dateUpdated", DateUpdated); - props.Add("revision", Revision); - props.Add("capabilities", Capabilities); - props.Add("campaignId", CampaignId); - props.Add("phoneNumberId", PhoneNumberId); - props.Add("accountId", AccountId); - props.Add("applicationId", ApplicationId); - props.Add("phoneNumber", PhoneNumber); - props.Add("alias", Alias); - props.Add("region", Region); - props.Add("country", Country); - props.Add("voiceEnabled", VoiceEnabled); - props.Add("smsEnabled", SmsEnabled); - props.Add("offnet", Offnet); - props.Add("tfn", Tfn); + props.Add("uri", Uri); + props.Add("dateCreated", DateCreated); + props.Add("dateUpdated", DateUpdated); + props.Add("revision", Revision); + props.Add("capabilities", Capabilities); + props.Add("campaignId", CampaignId); + props.Add("phoneNumberId", PhoneNumberId); + props.Add("accountId", AccountId); + props.Add("applicationId", ApplicationId); + props.Add("phoneNumber", PhoneNumber); + props.Add("alias", Alias); + props.Add("region", Region); + props.Add("country", Country); + props.Add("voiceEnabled", VoiceEnabled); + props.Add("smsEnabled", SmsEnabled); + props.Add("offnet", Offnet); + props.Add("tfn", Tfn); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IncomingNumberResult); - } - - /// - /// Returns true if IncomingNumberResult instances are equal - /// - /// Instance of IncomingNumberResult to be compared - /// Boolean - public bool Equals(IncomingNumberResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DateCreated == input.DateCreated || - (this.DateCreated != null && - this.DateCreated.Equals(input.DateCreated)) - ) && - ( - this.DateUpdated == input.DateUpdated || - (this.DateUpdated != null && - this.DateUpdated.Equals(input.DateUpdated)) - ) && - ( - this.Revision == input.Revision || - this.Revision.Equals(input.Revision) - ) && - ( - this.Capabilities == input.Capabilities || - (this.Capabilities != null && - this.Capabilities.Equals(input.Capabilities)) - ) && - ( - this.CampaignId == input.CampaignId || - (this.CampaignId != null && - this.CampaignId.Equals(input.CampaignId)) - ) && - ( - this.PhoneNumberId == input.PhoneNumberId || - (this.PhoneNumberId != null && - this.PhoneNumberId.Equals(input.PhoneNumberId)) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.ApplicationId == input.ApplicationId || - (this.ApplicationId != null && - this.ApplicationId.Equals(input.ApplicationId)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.Region == input.Region || - (this.Region != null && - this.Region.Equals(input.Region)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.VoiceEnabled == input.VoiceEnabled || - (this.VoiceEnabled != null && - this.VoiceEnabled.Equals(input.VoiceEnabled)) - ) && - ( - this.SmsEnabled == input.SmsEnabled || - (this.SmsEnabled != null && - this.SmsEnabled.Equals(input.SmsEnabled)) - ) && - ( - this.Offnet == input.Offnet || - (this.Offnet != null && - this.Offnet.Equals(input.Offnet)) - ) && - ( - this.Tfn == input.Tfn || - (this.Tfn != null && - this.Tfn.Equals(input.Tfn)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DateCreated != null) - { - hashCode = (hashCode * 59) + this.DateCreated.GetHashCode(); - } - if (this.DateUpdated != null) - { - hashCode = (hashCode * 59) + this.DateUpdated.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Revision.GetHashCode(); - if (this.Capabilities != null) - { - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - } - if (this.CampaignId != null) - { - hashCode = (hashCode * 59) + this.CampaignId.GetHashCode(); - } - if (this.PhoneNumberId != null) - { - hashCode = (hashCode * 59) + this.PhoneNumberId.GetHashCode(); - } - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.ApplicationId != null) - { - hashCode = (hashCode * 59) + this.ApplicationId.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.Region != null) - { - hashCode = (hashCode * 59) + this.Region.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.VoiceEnabled != null) - { - hashCode = (hashCode * 59) + this.VoiceEnabled.GetHashCode(); - } - if (this.SmsEnabled != null) - { - hashCode = (hashCode * 59) + this.SmsEnabled.GetHashCode(); - } - if (this.Offnet != null) - { - hashCode = (hashCode * 59) + this.Offnet.GetHashCode(); - } - if (this.Tfn != null) - { - hashCode = (hashCode * 59) + this.Tfn.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/IncomingNumberResultAllOf.cs b/src/freeclimb/Model/IncomingNumberResultAllOf.cs deleted file mode 100644 index 6c7651d6..00000000 --- a/src/freeclimb/Model/IncomingNumberResultAllOf.cs +++ /dev/null @@ -1,382 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// IncomingNumberResultAllOf - /// - [DataContract(Name = "IncomingNumberResult_allOf")] - public partial class IncomingNumberResultAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// capabilities. - /// The campaign ID generated by the campaign registry. - /// String that uniquely identifies this phone number resource.. - /// ID of the account that owns this phone number.. - /// 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.. - /// Phone number in E.164 format.. - /// Description for this phone number. Typically the conventionally-formatted version of the phone number.. - /// State or province of this phone number.. - /// Country of this phone number.. - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers.. - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers.. - /// 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. - public IncomingNumberResultAllOf(Capabilities capabilities = default(Capabilities), string campaignId = default(string), string phoneNumberId = default(string), string accountId = default(string), string applicationId = default(string), string phoneNumber = default(string), string alias = default(string), string region = default(string), string country = default(string), bool? voiceEnabled = default(bool?), bool? smsEnabled = default(bool?), bool? offnet = default(bool?), TFN tfn = default(TFN)) - { - this.Capabilities = capabilities; - this.CampaignId = campaignId; - this.PhoneNumberId = phoneNumberId; - this.AccountId = accountId; - this.ApplicationId = applicationId; - this.PhoneNumber = phoneNumber; - this.Alias = alias; - this.Region = region; - this.Country = country; - this.VoiceEnabled = voiceEnabled; - this.SmsEnabled = smsEnabled; - this.Offnet = offnet; - this.Tfn = tfn; - } - - /// - /// Gets or Sets Capabilities - /// - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public Capabilities Capabilities { get; set; } - - /// - /// The campaign ID generated by the campaign registry - /// - /// The campaign ID generated by the campaign registry - [DataMember(Name = "campaignId", EmitDefaultValue = true)] - public string CampaignId { get; set; } - - /// - /// String that uniquely identifies this phone number resource. - /// - /// String that uniquely identifies this phone number resource. - [DataMember(Name = "phoneNumberId", EmitDefaultValue = true)] - public string PhoneNumberId { get; set; } - - /// - /// ID of the account that owns this phone number. - /// - /// ID of the account that owns this phone number. - [DataMember(Name = "accountId", EmitDefaultValue = true)] - public string AccountId { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "applicationId", EmitDefaultValue = true)] - public string ApplicationId { get; set; } - - /// - /// Phone number in E.164 format. - /// - /// Phone number in E.164 format. - [DataMember(Name = "phoneNumber", EmitDefaultValue = true)] - public string PhoneNumber { get; set; } - - /// - /// Description for this phone number. Typically the conventionally-formatted version of the phone number. - /// - /// Description for this phone number. Typically the conventionally-formatted version of the phone number. - [DataMember(Name = "alias", EmitDefaultValue = true)] - public string Alias { get; set; } - - /// - /// State or province of this phone number. - /// - /// State or province of this phone number. - [DataMember(Name = "region", EmitDefaultValue = true)] - public string Region { get; set; } - - /// - /// Country of this phone number. - /// - /// Country of this phone number. - [DataMember(Name = "country", EmitDefaultValue = true)] - public string Country { get; set; } - - /// - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. - /// - /// Indicates whether the phone number can handle Calls. Typically set to true for all numbers. - [DataMember(Name = "voiceEnabled", EmitDefaultValue = true)] - [Obsolete] - public bool? VoiceEnabled { get; set; } - - /// - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. - /// - /// Indication of whether the phone number can handle sending and receiving SMS messages. Typically set to true for all numbers. - [DataMember(Name = "smsEnabled", EmitDefaultValue = true)] - [Obsolete] - public bool? SmsEnabled { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "offnet", EmitDefaultValue = true)] - public bool? Offnet { get; set; } - - /// - /// Gets or Sets Tfn - /// - [DataMember(Name = "tfn", EmitDefaultValue = false)] - public TFN Tfn { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IncomingNumberResultAllOf {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" CampaignId: ").Append(CampaignId).Append("\n"); - sb.Append(" PhoneNumberId: ").Append(PhoneNumberId).Append("\n"); - sb.Append(" AccountId: ").Append(AccountId).Append("\n"); - sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" Region: ").Append(Region).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" VoiceEnabled: ").Append(VoiceEnabled).Append("\n"); - sb.Append(" SmsEnabled: ").Append(SmsEnabled).Append("\n"); - sb.Append(" Offnet: ").Append(Offnet).Append("\n"); - sb.Append(" Tfn: ").Append(Tfn).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the IncomingNumberResultAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("capabilities", Capabilities); - props.Add("campaignId", CampaignId); - props.Add("phoneNumberId", PhoneNumberId); - props.Add("accountId", AccountId); - props.Add("applicationId", ApplicationId); - props.Add("phoneNumber", PhoneNumber); - props.Add("alias", Alias); - props.Add("region", Region); - props.Add("country", Country); - props.Add("voiceEnabled", VoiceEnabled); - props.Add("smsEnabled", SmsEnabled); - props.Add("offnet", Offnet); - props.Add("tfn", Tfn); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IncomingNumberResultAllOf); - } - - /// - /// Returns true if IncomingNumberResultAllOf instances are equal - /// - /// Instance of IncomingNumberResultAllOf to be compared - /// Boolean - public bool Equals(IncomingNumberResultAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - (this.Capabilities != null && - this.Capabilities.Equals(input.Capabilities)) - ) && - ( - this.CampaignId == input.CampaignId || - (this.CampaignId != null && - this.CampaignId.Equals(input.CampaignId)) - ) && - ( - this.PhoneNumberId == input.PhoneNumberId || - (this.PhoneNumberId != null && - this.PhoneNumberId.Equals(input.PhoneNumberId)) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.ApplicationId == input.ApplicationId || - (this.ApplicationId != null && - this.ApplicationId.Equals(input.ApplicationId)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.Region == input.Region || - (this.Region != null && - this.Region.Equals(input.Region)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.VoiceEnabled == input.VoiceEnabled || - (this.VoiceEnabled != null && - this.VoiceEnabled.Equals(input.VoiceEnabled)) - ) && - ( - this.SmsEnabled == input.SmsEnabled || - (this.SmsEnabled != null && - this.SmsEnabled.Equals(input.SmsEnabled)) - ) && - ( - this.Offnet == input.Offnet || - (this.Offnet != null && - this.Offnet.Equals(input.Offnet)) - ) && - ( - this.Tfn == input.Tfn || - (this.Tfn != null && - this.Tfn.Equals(input.Tfn)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Capabilities != null) - { - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - } - if (this.CampaignId != null) - { - hashCode = (hashCode * 59) + this.CampaignId.GetHashCode(); - } - if (this.PhoneNumberId != null) - { - hashCode = (hashCode * 59) + this.PhoneNumberId.GetHashCode(); - } - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.ApplicationId != null) - { - hashCode = (hashCode * 59) + this.ApplicationId.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.Region != null) - { - hashCode = (hashCode * 59) + this.Region.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.VoiceEnabled != null) - { - hashCode = (hashCode * 59) + this.VoiceEnabled.GetHashCode(); - } - if (this.SmsEnabled != null) - { - hashCode = (hashCode * 59) + this.SmsEnabled.GetHashCode(); - } - if (this.Offnet != null) - { - hashCode = (hashCode * 59) + this.Offnet.GetHashCode(); - } - if (this.Tfn != null) - { - hashCode = (hashCode * 59) + this.Tfn.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/LeaveConferenceWebhook.cs b/src/freeclimb/Model/LeaveConferenceWebhook.cs new file mode 100644 index 00000000..c95e4a9f --- /dev/null +++ b/src/freeclimb/Model/LeaveConferenceWebhook.cs @@ -0,0 +1,242 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// 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. + /// + [DataContract(Name = "LeaveConferenceWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class LeaveConferenceWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (default to "LeaveConferenceWebhook"). + /// Unique ID for this Call, generated by FreeClimb. This is the call leg which has left the Conference. + /// Account ID associated with your account.. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to you and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// This is only populated if request pertains to a Conference. Otherwise, it is set to null.. + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null.. + public LeaveConferenceWebhook( + string requestType = @"LeaveConferenceWebhook", + string callId = default(string), + string accountId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string) + ) + : base() + { + base.RequestType = requestType; + + this.CallId = callId; + + this.AccountId = accountId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance LeaveConferenceWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static LeaveConferenceWebhook Deserialize(string jsonPayload) + { + return (LeaveConferenceWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(LeaveConferenceWebhook), + _serializerSettings + ); + } + + /// + /// Unique ID for this Call, generated by FreeClimb. This is the call leg which has left the Conference + /// + /// Unique ID for this Call, generated by FreeClimb. This is the call leg which has left the Conference + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// This is only populated if request pertains to a Conference. Otherwise, it is set to null. + /// + /// This is only populated if request pertains to a Conference. Otherwise, it is set to null. + [DataMember(Name = "conferenceId", EmitDefaultValue = true)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class LeaveConferenceWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the LeaveConferenceWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("callId", CallId); + props.Add("accountId", AccountId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/LogList.cs b/src/freeclimb/Model/LogList.cs index 370ee4f5..02be2bab 100644 --- a/src/freeclimb/Model/LogList.cs +++ b/src/freeclimb/Model/LogList.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// LogList /// [DataContract(Name = "LogList")] - public partial class LogList : IPagination, IEquatable, IValidatableObject + public partial class LogList : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,31 @@ public partial class LogList : IPagination, IEquatable, IValidatableObj /// Number of items per page. /// Uri to retrieve the next page of items. /// logs. - public LogList(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List logs = default(List)) + public LogList( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List logs = default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.Logs = logs; } @@ -138,151 +154,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the LogList instance. + /// Retrieve the KVP Dictionary for the LogList instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in Logs) { nested.Add(item); } - props.Add("logs", nested); + props.Add("logs", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LogList); - } - - /// - /// Returns true if LogList instances are equal - /// - /// Instance of LogList to be compared - /// Boolean - public bool Equals(LogList input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.Logs == input.Logs || - this.Logs != null && - input.Logs != null && - this.Logs.SequenceEqual(input.Logs) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.Logs != null) - { - hashCode = (hashCode * 59) + this.Logs.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/LogListAllOf.cs b/src/freeclimb/Model/LogListAllOf.cs deleted file mode 100644 index 882c6ffb..00000000 --- a/src/freeclimb/Model/LogListAllOf.cs +++ /dev/null @@ -1,147 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// LogListAllOf - /// - [DataContract(Name = "LogList_allOf")] - public partial class LogListAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// logs. - public LogListAllOf(List logs = default(List)) - { - this.Logs = logs; - } - - /// - /// Gets or Sets Logs - /// - [DataMember(Name = "logs", EmitDefaultValue = true)] - public List Logs { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LogListAllOf {\n"); - sb.Append(" Logs: ").Append(Logs).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the LogListAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in Logs) - { - nested.Add(item); - } - props.Add("logs", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LogListAllOf); - } - - /// - /// Returns true if LogListAllOf instances are equal - /// - /// Instance of LogListAllOf to be compared - /// Boolean - public bool Equals(LogListAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Logs == input.Logs || - this.Logs != null && - input.Logs != null && - this.Logs.SequenceEqual(input.Logs) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Logs != null) - { - hashCode = (hashCode * 59) + this.Logs.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/LogResult.cs b/src/freeclimb/Model/LogResult.cs index 242b2ce9..1725f34a 100644 --- a/src/freeclimb/Model/LogResult.cs +++ b/src/freeclimb/Model/LogResult.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,14 +31,14 @@ namespace freeclimb.Model /// LogResult /// [DataContract(Name = "LogResult")] - public partial class LogResult : IEquatable, IValidatableObject + public partial class LogResult : IValidatableObject { - /// /// Gets or Sets Level /// [DataMember(Name = "level", EmitDefaultValue = true)] public LogLevel? Level { get; set; } + /// /// Initializes a new instance of the class. /// @@ -49,14 +49,28 @@ public partial class LogResult : IEquatable, IValidatableObject /// ID of the Call associated with the log. Can be set to null if the log was generated without regard to a specific Call.. /// A simple string describing the event being logged.. /// JSON document containing metadata about the event. Some log messages may include request and response header content in this field.. - public LogResult(int? timestamp = default(int?), LogLevel? level = default(LogLevel?), string requestId = default(string), string accountId = default(string), string callId = default(string), string message = default(string), Object metadata = default(Object)) + public LogResult( + int? timestamp = default(int?), + LogLevel? level = default(LogLevel?), + string requestId = default(string), + string accountId = default(string), + string callId = default(string), + string message = default(string), + Object metadata = default(Object) + ) { this.Timestamp = timestamp; + this.Level = level; + this.RequestId = requestId; + this.AccountId = accountId; + this.CallId = callId; + this.Message = message; + this.Metadata = metadata; } @@ -127,131 +141,39 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the LogResult instance. + /// Retrieve the KVP Dictionary for the LogResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("timestamp", Timestamp); - props.Add("level", Level); - props.Add("requestId", RequestId); - props.Add("accountId", AccountId); - props.Add("callId", CallId); - props.Add("message", Message); - props.Add("metadata", Metadata); + props.Add("timestamp", Timestamp); + props.Add("level", Level); + props.Add("requestId", RequestId); + props.Add("accountId", AccountId); + props.Add("callId", CallId); + props.Add("message", Message); + props.Add("metadata", Metadata); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LogResult); - } - - /// - /// Returns true if LogResult instances are equal - /// - /// Instance of LogResult to be compared - /// Boolean - public bool Equals(LogResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.Level == input.Level || - this.Level.Equals(input.Level) - ) && - ( - this.RequestId == input.RequestId || - (this.RequestId != null && - this.RequestId.Equals(input.RequestId)) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.CallId == input.CallId || - (this.CallId != null && - this.CallId.Equals(input.CallId)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Metadata == input.Metadata || - (this.Metadata != null && - this.Metadata.Equals(input.Metadata)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Level.GetHashCode(); - if (this.RequestId != null) - { - hashCode = (hashCode * 59) + this.RequestId.GetHashCode(); - } - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.CallId != null) - { - hashCode = (hashCode * 59) + this.CallId.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/MachineDetectedWebhook.cs b/src/freeclimb/Model/MachineDetectedWebhook.cs new file mode 100644 index 00000000..b53356f2 --- /dev/null +++ b/src/freeclimb/Model/MachineDetectedWebhook.cs @@ -0,0 +1,267 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// 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. + /// + [DataContract(Name = "MachineDetectedWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class MachineDetectedWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Gets or Sets MachineType + /// + [DataMember(Name = "machineType", EmitDefaultValue = false)] + public MachineType? MachineType { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (default to "MachineDetectedWebhook"). + /// Unique ID for this Call, generated by FreeClimb.. + /// Account ID associated with your account.. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to you and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// This is only populated if request pertains to a Conference. Otherwise, it is set to null.. + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null.. + /// Call ID of the leg which initiated the OutDial.. + /// machineType. + public MachineDetectedWebhook( + string requestType = @"MachineDetectedWebhook", + string callId = default(string), + string accountId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + string parentCallId = default(string), + MachineType? machineType = default(MachineType?) + ) + : base() + { + base.RequestType = requestType; + + this.CallId = callId; + + this.AccountId = accountId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.ParentCallId = parentCallId; + + this.MachineType = machineType; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance MachineDetectedWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static MachineDetectedWebhook Deserialize(string jsonPayload) + { + return (MachineDetectedWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(MachineDetectedWebhook), + _serializerSettings + ); + } + + /// + /// Unique ID for this Call, generated by FreeClimb. + /// + /// Unique ID for this Call, generated by FreeClimb. + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// This is only populated if request pertains to a Conference. Otherwise, it is set to null. + /// + /// This is only populated if request pertains to a Conference. Otherwise, it is set to null. + [DataMember(Name = "conferenceId", EmitDefaultValue = true)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a Queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// Call ID of the leg which initiated the OutDial. + /// + /// Call ID of the leg which initiated the OutDial. + [DataMember(Name = "parentCallId", EmitDefaultValue = false)] + public string ParentCallId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MachineDetectedWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" ParentCallId: ").Append(ParentCallId).Append("\n"); + sb.Append(" MachineType: ").Append(MachineType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the MachineDetectedWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("callId", CallId); + props.Add("accountId", AccountId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("parentCallId", ParentCallId); + props.Add("machineType", MachineType); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/MakeCallRequest.cs b/src/freeclimb/Model/MakeCallRequest.cs index b845109c..1ffe91b7 100644 --- a/src/freeclimb/Model/MakeCallRequest.cs +++ b/src/freeclimb/Model/MakeCallRequest.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,13 +31,14 @@ namespace freeclimb.Model /// MakeCallRequest /// [DataContract(Name = "MakeCallRequest")] - public partial class MakeCallRequest : IEquatable, IValidatableObject + public partial class MakeCallRequest : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected MakeCallRequest() { } + /// /// Initializes a new instance of the class. /// @@ -51,25 +52,51 @@ protected MakeCallRequest() { } /// 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.. /// Activate privacy mode in order to obscure log data that can potentially expose private information.. /// 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.. - public MakeCallRequest(string from = default(string), string to = default(string), string applicationId = default(string), string sendDigits = default(string), string ifMachine = default(string), string ifMachineUrl = default(string), int timeout = 30, string parentCallId = default(string), bool privacyMode = default(bool), string callConnectUrl = default(string)) + public MakeCallRequest( + string from = default(string), + string to = default(string), + string applicationId = default(string), + string sendDigits = default(string), + string ifMachine = default(string), + string ifMachineUrl = default(string), + int timeout = 30, + string parentCallId = default(string), + bool privacyMode = default(bool), + string callConnectUrl = default(string) + ) { // to ensure "from" is required (not null) - if (from == null) { - throw new ArgumentNullException("from is a required property for MakeCallRequest and cannot be null"); + if (from == null) + { + throw new ArgumentNullException( + "from is a required property for MakeCallRequest and cannot be null" + ); } this.From = from; + // to ensure "to" is required (not null) - if (to == null) { - throw new ArgumentNullException("to is a required property for MakeCallRequest and cannot be null"); + if (to == null) + { + throw new ArgumentNullException( + "to is a required property for MakeCallRequest and cannot be null" + ); } this.To = to; + this.ApplicationId = applicationId; + this.SendDigits = sendDigits; + this.IfMachine = ifMachine; + this.IfMachineUrl = ifMachineUrl; + this.Timeout = timeout; + this.ParentCallId = parentCallId; + this.PrivacyMode = privacyMode; + this.CallConnectUrl = callConnectUrl; } @@ -77,14 +104,14 @@ protected MakeCallRequest() { } /// 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. /// /// 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. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = true)] public string From { get; set; } /// /// Phone number to place the Call to. /// /// Phone number to place the Call to. - [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] public string To { get; set; } /// @@ -171,157 +198,42 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the MakeCallRequest instance. + /// Retrieve the KVP Dictionary for the MakeCallRequest instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("from", From); - props.Add("to", To); - props.Add("applicationId", ApplicationId); - props.Add("sendDigits", SendDigits); - props.Add("ifMachine", IfMachine); - props.Add("ifMachineUrl", IfMachineUrl); - props.Add("timeout", Timeout); - props.Add("parentCallId", ParentCallId); - props.Add("privacyMode", PrivacyMode); - props.Add("callConnectUrl", CallConnectUrl); + props.Add("from", From); + props.Add("to", To); + props.Add("applicationId", ApplicationId); + props.Add("sendDigits", SendDigits); + props.Add("ifMachine", IfMachine); + props.Add("ifMachineUrl", IfMachineUrl); + props.Add("timeout", Timeout); + props.Add("parentCallId", ParentCallId); + props.Add("privacyMode", PrivacyMode); + props.Add("callConnectUrl", CallConnectUrl); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MakeCallRequest); - } - - /// - /// Returns true if MakeCallRequest instances are equal - /// - /// Instance of MakeCallRequest to be compared - /// Boolean - public bool Equals(MakeCallRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && - ( - this.To == input.To || - (this.To != null && - this.To.Equals(input.To)) - ) && - ( - this.ApplicationId == input.ApplicationId || - (this.ApplicationId != null && - this.ApplicationId.Equals(input.ApplicationId)) - ) && - ( - this.SendDigits == input.SendDigits || - (this.SendDigits != null && - this.SendDigits.Equals(input.SendDigits)) - ) && - ( - this.IfMachine == input.IfMachine || - (this.IfMachine != null && - this.IfMachine.Equals(input.IfMachine)) - ) && - ( - this.IfMachineUrl == input.IfMachineUrl || - (this.IfMachineUrl != null && - this.IfMachineUrl.Equals(input.IfMachineUrl)) - ) && - ( - this.Timeout == input.Timeout || - this.Timeout.Equals(input.Timeout) - ) && - ( - this.ParentCallId == input.ParentCallId || - (this.ParentCallId != null && - this.ParentCallId.Equals(input.ParentCallId)) - ) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ) && - ( - this.CallConnectUrl == input.CallConnectUrl || - (this.CallConnectUrl != null && - this.CallConnectUrl.Equals(input.CallConnectUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.From != null) - { - hashCode = (hashCode * 59) + this.From.GetHashCode(); - } - if (this.To != null) - { - hashCode = (hashCode * 59) + this.To.GetHashCode(); - } - if (this.ApplicationId != null) - { - hashCode = (hashCode * 59) + this.ApplicationId.GetHashCode(); - } - if (this.SendDigits != null) - { - hashCode = (hashCode * 59) + this.SendDigits.GetHashCode(); - } - if (this.IfMachine != null) - { - hashCode = (hashCode * 59) + this.IfMachine.GetHashCode(); - } - if (this.IfMachineUrl != null) - { - hashCode = (hashCode * 59) + this.IfMachineUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Timeout.GetHashCode(); - if (this.ParentCallId != null) - { - hashCode = (hashCode * 59) + this.ParentCallId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - if (this.CallConnectUrl != null) - { - hashCode = (hashCode * 59) + this.CallConnectUrl.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/MessageDeliveryWebhook.cs b/src/freeclimb/Model/MessageDeliveryWebhook.cs new file mode 100644 index 00000000..e778c6fb --- /dev/null +++ b/src/freeclimb/Model/MessageDeliveryWebhook.cs @@ -0,0 +1,257 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// 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. + /// + [DataContract(Name = "MessageDeliveryWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class MessageDeliveryWebhook : Webhook, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// 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. (default to "MessageDeliveryWebhook"). + /// Account ID associated with your account.. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to you and to which this Call is directed (in E.164 format).. + /// Body of the SMS message.. + /// Value will be inbound to indicate the receipt of a message into the FreeClimb platform.. + /// ID of the application to which the destination number is assigned.. + /// Value will be received to indicate that the platform has successfully received the incoming message.. + /// ID of the destination phone number.. + /// The URI for this resource, relative to the API base URL. + public MessageDeliveryWebhook( + string requestType = @"MessageDeliveryWebhook", + string accountId = default(string), + string from = default(string), + string to = default(string), + string text = default(string), + string direction = default(string), + string applicationId = default(string), + string status = default(string), + string phoneNumberId = default(string), + string uri = default(string) + ) + : base() + { + base.RequestType = requestType; + + this.AccountId = accountId; + + this.From = from; + + this.To = to; + + this.Text = text; + + this.Direction = direction; + + this.ApplicationId = applicationId; + + this.Status = status; + + this.PhoneNumberId = phoneNumberId; + + this.Uri = uri; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance MessageDeliveryWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static MessageDeliveryWebhook Deserialize(string jsonPayload) + { + return (MessageDeliveryWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(MessageDeliveryWebhook), + _serializerSettings + ); + } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to you and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// Body of the SMS message. + /// + /// Body of the SMS message. + [DataMember(Name = "text", EmitDefaultValue = false)] + public string Text { get; set; } + + /// + /// Value will be inbound to indicate the receipt of a message into the FreeClimb platform. + /// + /// Value will be inbound to indicate the receipt of a message into the FreeClimb platform. + [DataMember(Name = "direction", EmitDefaultValue = false)] + public string Direction { get; set; } + + /// + /// ID of the application to which the destination number is assigned. + /// + /// ID of the application to which the destination number is assigned. + [DataMember(Name = "applicationId", EmitDefaultValue = false)] + public string ApplicationId { get; set; } + + /// + /// Value will be received to indicate that the platform has successfully received the incoming message. + /// + /// Value will be received to indicate that the platform has successfully received the incoming message. + [DataMember(Name = "status", EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// ID of the destination phone number. + /// + /// ID of the destination phone number. + [DataMember(Name = "phoneNumberId", EmitDefaultValue = false)] + public string PhoneNumberId { get; set; } + + /// + /// The URI for this resource, relative to the API base URL + /// + /// The URI for this resource, relative to the API base URL + [DataMember(Name = "uri", EmitDefaultValue = false)] + public string Uri { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MessageDeliveryWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" PhoneNumberId: ").Append(PhoneNumberId).Append("\n"); + sb.Append(" Uri: ").Append(Uri).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the MessageDeliveryWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("accountId", AccountId); + props.Add("from", From); + props.Add("to", To); + props.Add("text", Text); + props.Add("direction", Direction); + props.Add("applicationId", ApplicationId); + props.Add("status", Status); + props.Add("phoneNumberId", PhoneNumberId); + props.Add("uri", Uri); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/MessageRequest.cs b/src/freeclimb/Model/MessageRequest.cs index b4cd383d..4e2a0e6f 100644 --- a/src/freeclimb/Model/MessageRequest.cs +++ b/src/freeclimb/Model/MessageRequest.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,13 +31,14 @@ namespace freeclimb.Model /// MessageRequest /// [DataContract(Name = "MessageRequest")] - public partial class MessageRequest : IEquatable, IValidatableObject + public partial class MessageRequest : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected MessageRequest() { } + /// /// Initializes a new instance of the class. /// @@ -50,28 +51,55 @@ protected MessageRequest() { } /// Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported. (required). /// 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.. /// 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.. - public MessageRequest(string uri = default(string), string dateCreated = default(string), string dateUpdated = default(string), int revision = default(int), string from = default(string), string to = default(string), string text = default(string), string notificationUrl = default(string), List mediaUrls = default(List)) + public MessageRequest( + string uri = default(string), + string dateCreated = default(string), + string dateUpdated = default(string), + int revision = default(int), + string from = default(string), + string to = default(string), + string text = default(string), + string notificationUrl = default(string), + List mediaUrls = default(List) + ) { // to ensure "from" is required (not null) - if (from == null) { - throw new ArgumentNullException("from is a required property for MessageRequest and cannot be null"); + if (from == null) + { + throw new ArgumentNullException( + "from is a required property for MessageRequest and cannot be null" + ); } this.From = from; + // to ensure "to" is required (not null) - if (to == null) { - throw new ArgumentNullException("to is a required property for MessageRequest and cannot be null"); + if (to == null) + { + throw new ArgumentNullException( + "to is a required property for MessageRequest and cannot be null" + ); } this.To = to; + // to ensure "text" is required (not null) - if (text == null) { - throw new ArgumentNullException("text is a required property for MessageRequest and cannot be null"); + if (text == null) + { + throw new ArgumentNullException( + "text is a required property for MessageRequest and cannot be null" + ); } this.Text = text; + this.Uri = uri; + this.DateCreated = dateCreated; + this.DateUpdated = dateUpdated; + this.Revision = revision; + this.NotificationUrl = notificationUrl; + this.MediaUrls = mediaUrls; } @@ -107,21 +135,21 @@ protected MessageRequest() { } /// Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb. /// /// Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = true)] public string From { get; set; } /// /// Phone number to receive the message. Must be within FreeClimb's service area. /// /// Phone number to receive the message. Must be within FreeClimb's service area. - [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] public string To { get; set; } /// /// Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported. /// /// Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported. - [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] public string Text { get; set; } /// @@ -165,157 +193,46 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the MessageRequest instance. + /// Retrieve the KVP Dictionary for the MessageRequest instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("uri", Uri); - props.Add("dateCreated", DateCreated); - props.Add("dateUpdated", DateUpdated); - props.Add("revision", Revision); - props.Add("from", From); - props.Add("to", To); - props.Add("text", Text); - props.Add("notificationUrl", NotificationUrl); + props.Add("uri", Uri); + props.Add("dateCreated", DateCreated); + props.Add("dateUpdated", DateUpdated); + props.Add("revision", Revision); + props.Add("from", From); + props.Add("to", To); + props.Add("text", Text); + props.Add("notificationUrl", NotificationUrl); List nested = new List(); foreach (var item in MediaUrls) { nested.Add(item); } - props.Add("mediaUrls", nested); + props.Add("mediaUrls", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MessageRequest); - } - - /// - /// Returns true if MessageRequest instances are equal - /// - /// Instance of MessageRequest to be compared - /// Boolean - public bool Equals(MessageRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DateCreated == input.DateCreated || - (this.DateCreated != null && - this.DateCreated.Equals(input.DateCreated)) - ) && - ( - this.DateUpdated == input.DateUpdated || - (this.DateUpdated != null && - this.DateUpdated.Equals(input.DateUpdated)) - ) && - ( - this.Revision == input.Revision || - this.Revision.Equals(input.Revision) - ) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && - ( - this.To == input.To || - (this.To != null && - this.To.Equals(input.To)) - ) && - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ) && - ( - this.NotificationUrl == input.NotificationUrl || - (this.NotificationUrl != null && - this.NotificationUrl.Equals(input.NotificationUrl)) - ) && - ( - this.MediaUrls == input.MediaUrls || - this.MediaUrls != null && - input.MediaUrls != null && - this.MediaUrls.SequenceEqual(input.MediaUrls) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DateCreated != null) - { - hashCode = (hashCode * 59) + this.DateCreated.GetHashCode(); - } - if (this.DateUpdated != null) - { - hashCode = (hashCode * 59) + this.DateUpdated.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Revision.GetHashCode(); - if (this.From != null) - { - hashCode = (hashCode * 59) + this.From.GetHashCode(); - } - if (this.To != null) - { - hashCode = (hashCode * 59) + this.To.GetHashCode(); - } - if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } - if (this.NotificationUrl != null) - { - hashCode = (hashCode * 59) + this.NotificationUrl.GetHashCode(); - } - if (this.MediaUrls != null) - { - hashCode = (hashCode * 59) + this.MediaUrls.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/MessageRequestAllOf.cs b/src/freeclimb/Model/MessageRequestAllOf.cs deleted file mode 100644 index d5924c81..00000000 --- a/src/freeclimb/Model/MessageRequestAllOf.cs +++ /dev/null @@ -1,245 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// MessageRequestAllOf - /// - [DataContract(Name = "MessageRequest_allOf")] - public partial class MessageRequestAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MessageRequestAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb. (required). - /// Phone number to receive the message. Must be within FreeClimb's service area. (required). - /// Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported. (required). - /// 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.. - /// 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.. - public MessageRequestAllOf(string from = default(string), string to = default(string), string text = default(string), string notificationUrl = default(string), List mediaUrls = default(List)) - { - // to ensure "from" is required (not null) - if (from == null) { - throw new ArgumentNullException("from is a required property for MessageRequestAllOf and cannot be null"); - } - this.From = from; - // to ensure "to" is required (not null) - if (to == null) { - throw new ArgumentNullException("to is a required property for MessageRequestAllOf and cannot be null"); - } - this.To = to; - // to ensure "text" is required (not null) - if (text == null) { - throw new ArgumentNullException("text is a required property for MessageRequestAllOf and cannot be null"); - } - this.Text = text; - this.NotificationUrl = notificationUrl; - this.MediaUrls = mediaUrls; - } - - /// - /// Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb. - /// - /// Phone number to use as the sender. This must be an incoming phone number that you have purchased from FreeClimb. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public string From { get; set; } - - /// - /// Phone number to receive the message. Must be within FreeClimb's service area. - /// - /// Phone number to receive the message. Must be within FreeClimb's service area. - [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = false)] - public string To { get; set; } - - /// - /// Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported. - /// - /// Text contained in the message (maximum 160 characters). **Note:** For text, only ASCII characters are supported. - [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = false)] - public string Text { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "notificationUrl", EmitDefaultValue = false)] - public string NotificationUrl { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "mediaUrls", EmitDefaultValue = true)] - public List MediaUrls { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MessageRequestAllOf {\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" To: ").Append(To).Append("\n"); - sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append(" NotificationUrl: ").Append(NotificationUrl).Append("\n"); - sb.Append(" MediaUrls: ").Append(MediaUrls).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the MessageRequestAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("from", From); - props.Add("to", To); - props.Add("text", Text); - props.Add("notificationUrl", NotificationUrl); - List nested = new List(); - foreach (var item in MediaUrls) - { - nested.Add(item); - } - props.Add("mediaUrls", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MessageRequestAllOf); - } - - /// - /// Returns true if MessageRequestAllOf instances are equal - /// - /// Instance of MessageRequestAllOf to be compared - /// Boolean - public bool Equals(MessageRequestAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && - ( - this.To == input.To || - (this.To != null && - this.To.Equals(input.To)) - ) && - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ) && - ( - this.NotificationUrl == input.NotificationUrl || - (this.NotificationUrl != null && - this.NotificationUrl.Equals(input.NotificationUrl)) - ) && - ( - this.MediaUrls == input.MediaUrls || - this.MediaUrls != null && - input.MediaUrls != null && - this.MediaUrls.SequenceEqual(input.MediaUrls) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.From != null) - { - hashCode = (hashCode * 59) + this.From.GetHashCode(); - } - if (this.To != null) - { - hashCode = (hashCode * 59) + this.To.GetHashCode(); - } - if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } - if (this.NotificationUrl != null) - { - hashCode = (hashCode * 59) + this.NotificationUrl.GetHashCode(); - } - if (this.MediaUrls != null) - { - hashCode = (hashCode * 59) + this.MediaUrls.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/MessageResult.cs b/src/freeclimb/Model/MessageResult.cs index d4d598be..ce23132c 100644 --- a/src/freeclimb/Model/MessageResult.cs +++ b/src/freeclimb/Model/MessageResult.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,14 +31,14 @@ namespace freeclimb.Model /// MessageResult /// [DataContract(Name = "MessageResult")] - public partial class MessageResult : IEquatable, IValidatableObject + public partial class MessageResult : IValidatableObject { - /// /// Gets or Sets Status /// [DataMember(Name = "status", EmitDefaultValue = true)] public MessageStatus? Status { get; set; } + /// /// Initializes a new instance of the class. /// @@ -58,23 +58,55 @@ public partial class MessageResult : IEquatable, IValidatableObje /// The unique identifier for the campaign associated with the message. /// The number of segments into which the message was split. /// an array of HTTP URLs which were attached this this message. - public MessageResult(string uri = default(string), string dateCreated = default(string), string dateUpdated = default(string), int revision = default(int), string accountId = default(string), string messageId = default(string), MessageStatus? status = default(MessageStatus?), string from = default(string), string to = default(string), string text = default(string), string direction = default(string), string notificationUrl = default(string), string brandId = default(string), string campaignId = default(string), decimal? segmentCount = default(decimal?), List mediaUrls = default(List)) + public MessageResult( + string uri = default(string), + string dateCreated = default(string), + string dateUpdated = default(string), + int revision = default(int), + string accountId = default(string), + string messageId = default(string), + MessageStatus? status = default(MessageStatus?), + string from = default(string), + string to = default(string), + string text = default(string), + string direction = default(string), + string notificationUrl = default(string), + string brandId = default(string), + string campaignId = default(string), + decimal? segmentCount = default(decimal?), + List mediaUrls = default(List) + ) { this.Uri = uri; + this.DateCreated = dateCreated; + this.DateUpdated = dateUpdated; + this.Revision = revision; + this.AccountId = accountId; + this.MessageId = messageId; + this.Status = status; + this.From = from; + this.To = to; + this.Text = text; + this.Direction = direction; + this.NotificationUrl = notificationUrl; + this.BrandId = brandId; + this.CampaignId = campaignId; + this.SegmentCount = segmentCount; + this.MediaUrls = mediaUrls; } @@ -217,223 +249,53 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the MessageResult instance. + /// Retrieve the KVP Dictionary for the MessageResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("uri", Uri); - props.Add("dateCreated", DateCreated); - props.Add("dateUpdated", DateUpdated); - props.Add("revision", Revision); - props.Add("accountId", AccountId); - props.Add("messageId", MessageId); - props.Add("status", Status); - props.Add("from", From); - props.Add("to", To); - props.Add("text", Text); - props.Add("direction", Direction); - props.Add("notificationUrl", NotificationUrl); - props.Add("brandId", BrandId); - props.Add("campaignId", CampaignId); - props.Add("segmentCount", SegmentCount); + props.Add("uri", Uri); + props.Add("dateCreated", DateCreated); + props.Add("dateUpdated", DateUpdated); + props.Add("revision", Revision); + props.Add("accountId", AccountId); + props.Add("messageId", MessageId); + props.Add("status", Status); + props.Add("from", From); + props.Add("to", To); + props.Add("text", Text); + props.Add("direction", Direction); + props.Add("notificationUrl", NotificationUrl); + props.Add("brandId", BrandId); + props.Add("campaignId", CampaignId); + props.Add("segmentCount", SegmentCount); List nested = new List(); foreach (var item in MediaUrls) { nested.Add(item); } - props.Add("mediaUrls", nested); + props.Add("mediaUrls", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MessageResult); - } - - /// - /// Returns true if MessageResult instances are equal - /// - /// Instance of MessageResult to be compared - /// Boolean - public bool Equals(MessageResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DateCreated == input.DateCreated || - (this.DateCreated != null && - this.DateCreated.Equals(input.DateCreated)) - ) && - ( - this.DateUpdated == input.DateUpdated || - (this.DateUpdated != null && - this.DateUpdated.Equals(input.DateUpdated)) - ) && - ( - this.Revision == input.Revision || - this.Revision.Equals(input.Revision) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.MessageId == input.MessageId || - (this.MessageId != null && - this.MessageId.Equals(input.MessageId)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && - ( - this.To == input.To || - (this.To != null && - this.To.Equals(input.To)) - ) && - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ) && - ( - this.Direction == input.Direction || - (this.Direction != null && - this.Direction.Equals(input.Direction)) - ) && - ( - this.NotificationUrl == input.NotificationUrl || - (this.NotificationUrl != null && - this.NotificationUrl.Equals(input.NotificationUrl)) - ) && - ( - this.BrandId == input.BrandId || - (this.BrandId != null && - this.BrandId.Equals(input.BrandId)) - ) && - ( - this.CampaignId == input.CampaignId || - (this.CampaignId != null && - this.CampaignId.Equals(input.CampaignId)) - ) && - ( - this.SegmentCount == input.SegmentCount || - (this.SegmentCount != null && - this.SegmentCount.Equals(input.SegmentCount)) - ) && - ( - this.MediaUrls == input.MediaUrls || - this.MediaUrls != null && - input.MediaUrls != null && - this.MediaUrls.SequenceEqual(input.MediaUrls) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DateCreated != null) - { - hashCode = (hashCode * 59) + this.DateCreated.GetHashCode(); - } - if (this.DateUpdated != null) - { - hashCode = (hashCode * 59) + this.DateUpdated.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Revision.GetHashCode(); - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.MessageId != null) - { - hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.From != null) - { - hashCode = (hashCode * 59) + this.From.GetHashCode(); - } - if (this.To != null) - { - hashCode = (hashCode * 59) + this.To.GetHashCode(); - } - if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } - if (this.Direction != null) - { - hashCode = (hashCode * 59) + this.Direction.GetHashCode(); - } - if (this.NotificationUrl != null) - { - hashCode = (hashCode * 59) + this.NotificationUrl.GetHashCode(); - } - if (this.BrandId != null) - { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); - } - if (this.CampaignId != null) - { - hashCode = (hashCode * 59) + this.CampaignId.GetHashCode(); - } - if (this.SegmentCount != null) - { - hashCode = (hashCode * 59) + this.SegmentCount.GetHashCode(); - } - if (this.MediaUrls != null) - { - hashCode = (hashCode * 59) + this.MediaUrls.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/MessageResultAllOf.cs b/src/freeclimb/Model/MessageResultAllOf.cs deleted file mode 100644 index a5a6ed62..00000000 --- a/src/freeclimb/Model/MessageResultAllOf.cs +++ /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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// MessageResultAllOf - /// - [DataContract(Name = "MessageResult_allOf")] - public partial class MessageResultAllOf : IEquatable, IValidatableObject - { - - /// - /// Gets or Sets Status - /// - [DataMember(Name = "status", EmitDefaultValue = true)] - public MessageStatus? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// String that uniquely identifies this account resource.. - /// String that uniquely identifies this message resource. - /// status. - /// Phone number in E.164 format that sent the message.. - /// Phone number in E.164 format that received the message.. - /// Message contents. - /// Noting whether the message was inbound or outbound. - /// URL invoked when message sent. - /// The unique identifier for the brand associated with the message. - /// The unique identifier for the campaign associated with the message. - /// The number of segments into which the message was split. - /// an array of HTTP URLs which were attached this this message. - public MessageResultAllOf(string accountId = default(string), string messageId = default(string), MessageStatus? status = default(MessageStatus?), string from = default(string), string to = default(string), string text = default(string), string direction = default(string), string notificationUrl = default(string), string brandId = default(string), string campaignId = default(string), decimal? segmentCount = default(decimal?), List mediaUrls = default(List)) - { - this.AccountId = accountId; - this.MessageId = messageId; - this.Status = status; - this.From = from; - this.To = to; - this.Text = text; - this.Direction = direction; - this.NotificationUrl = notificationUrl; - this.BrandId = brandId; - this.CampaignId = campaignId; - this.SegmentCount = segmentCount; - this.MediaUrls = mediaUrls; - } - - /// - /// String that uniquely identifies this account resource. - /// - /// String that uniquely identifies this account resource. - [DataMember(Name = "accountId", EmitDefaultValue = true)] - public string AccountId { get; set; } - - /// - /// String that uniquely identifies this message resource - /// - /// String that uniquely identifies this message resource - [DataMember(Name = "messageId", EmitDefaultValue = true)] - public string MessageId { get; set; } - - /// - /// Phone number in E.164 format that sent the message. - /// - /// Phone number in E.164 format that sent the message. - [DataMember(Name = "from", EmitDefaultValue = true)] - public string From { get; set; } - - /// - /// Phone number in E.164 format that received the message. - /// - /// Phone number in E.164 format that received the message. - [DataMember(Name = "to", EmitDefaultValue = true)] - public string To { get; set; } - - /// - /// Message contents - /// - /// Message contents - [DataMember(Name = "text", EmitDefaultValue = true)] - public string Text { get; set; } - - /// - /// Noting whether the message was inbound or outbound - /// - /// Noting whether the message was inbound or outbound - [DataMember(Name = "direction", EmitDefaultValue = true)] - public string Direction { get; set; } - - /// - /// URL invoked when message sent - /// - /// URL invoked when message sent - [DataMember(Name = "notificationUrl", EmitDefaultValue = true)] - public string NotificationUrl { get; set; } - - /// - /// The unique identifier for the brand associated with the message - /// - /// The unique identifier for the brand associated with the message - [DataMember(Name = "brandId", EmitDefaultValue = true)] - public string BrandId { get; set; } - - /// - /// The unique identifier for the campaign associated with the message - /// - /// The unique identifier for the campaign associated with the message - [DataMember(Name = "campaignId", EmitDefaultValue = true)] - public string CampaignId { get; set; } - - /// - /// The number of segments into which the message was split - /// - /// The number of segments into which the message was split - [DataMember(Name = "segmentCount", EmitDefaultValue = true)] - public decimal? SegmentCount { get; set; } - - /// - /// an array of HTTP URLs which were attached this this message - /// - /// an array of HTTP URLs which were attached this this message - [DataMember(Name = "mediaUrls", EmitDefaultValue = true)] - public List MediaUrls { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MessageResultAllOf {\n"); - sb.Append(" AccountId: ").Append(AccountId).Append("\n"); - sb.Append(" MessageId: ").Append(MessageId).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" To: ").Append(To).Append("\n"); - sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append(" Direction: ").Append(Direction).Append("\n"); - sb.Append(" NotificationUrl: ").Append(NotificationUrl).Append("\n"); - sb.Append(" BrandId: ").Append(BrandId).Append("\n"); - sb.Append(" CampaignId: ").Append(CampaignId).Append("\n"); - sb.Append(" SegmentCount: ").Append(SegmentCount).Append("\n"); - sb.Append(" MediaUrls: ").Append(MediaUrls).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the MessageResultAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("accountId", AccountId); - props.Add("messageId", MessageId); - props.Add("status", Status); - props.Add("from", From); - props.Add("to", To); - props.Add("text", Text); - props.Add("direction", Direction); - props.Add("notificationUrl", NotificationUrl); - props.Add("brandId", BrandId); - props.Add("campaignId", CampaignId); - props.Add("segmentCount", SegmentCount); - List nested = new List(); - foreach (var item in MediaUrls) - { - nested.Add(item); - } - props.Add("mediaUrls", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MessageResultAllOf); - } - - /// - /// Returns true if MessageResultAllOf instances are equal - /// - /// Instance of MessageResultAllOf to be compared - /// Boolean - public bool Equals(MessageResultAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.MessageId == input.MessageId || - (this.MessageId != null && - this.MessageId.Equals(input.MessageId)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && - ( - this.To == input.To || - (this.To != null && - this.To.Equals(input.To)) - ) && - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ) && - ( - this.Direction == input.Direction || - (this.Direction != null && - this.Direction.Equals(input.Direction)) - ) && - ( - this.NotificationUrl == input.NotificationUrl || - (this.NotificationUrl != null && - this.NotificationUrl.Equals(input.NotificationUrl)) - ) && - ( - this.BrandId == input.BrandId || - (this.BrandId != null && - this.BrandId.Equals(input.BrandId)) - ) && - ( - this.CampaignId == input.CampaignId || - (this.CampaignId != null && - this.CampaignId.Equals(input.CampaignId)) - ) && - ( - this.SegmentCount == input.SegmentCount || - (this.SegmentCount != null && - this.SegmentCount.Equals(input.SegmentCount)) - ) && - ( - this.MediaUrls == input.MediaUrls || - this.MediaUrls != null && - input.MediaUrls != null && - this.MediaUrls.SequenceEqual(input.MediaUrls) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.MessageId != null) - { - hashCode = (hashCode * 59) + this.MessageId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.From != null) - { - hashCode = (hashCode * 59) + this.From.GetHashCode(); - } - if (this.To != null) - { - hashCode = (hashCode * 59) + this.To.GetHashCode(); - } - if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } - if (this.Direction != null) - { - hashCode = (hashCode * 59) + this.Direction.GetHashCode(); - } - if (this.NotificationUrl != null) - { - hashCode = (hashCode * 59) + this.NotificationUrl.GetHashCode(); - } - if (this.BrandId != null) - { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); - } - if (this.CampaignId != null) - { - hashCode = (hashCode * 59) + this.CampaignId.GetHashCode(); - } - if (this.SegmentCount != null) - { - hashCode = (hashCode * 59) + this.SegmentCount.GetHashCode(); - } - if (this.MediaUrls != null) - { - hashCode = (hashCode * 59) + this.MediaUrls.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/MessageStatusWebhook.cs b/src/freeclimb/Model/MessageStatusWebhook.cs new file mode 100644 index 00000000..ae0ef28d --- /dev/null +++ b/src/freeclimb/Model/MessageStatusWebhook.cs @@ -0,0 +1,269 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// 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. + /// + [DataContract(Name = "MessageStatusWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class MessageStatusWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets Status + /// + [DataMember(Name = "status", EmitDefaultValue = true)] + public MessageStatus? Status { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// Value will be messageStatus - An outbound SMS has changed status and the Sms command's notificationUrl is being invoked. (default to "MessageStatusWebhook"). + /// Account ID associated with your account.. + /// Unique ID for this message, generated by FreeClimb.. + /// Unique ID for the Call in the context of which the Sms PerCL command was issued.. + /// aPhone number used to initiate the SMS message (in E.164 format).. + /// Destination number of the SMS message (in E.164 format).. + /// Body of the SMS message.. + /// Value will be outbound to indicate an outgoing SMS from FreeClimb.. + /// 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. + /// ID of the destination phone number.. + public MessageStatusWebhook( + string requestType = @"MessageStatusWebhook", + string accountId = default(string), + string messageId = default(string), + string callId = default(string), + string from = default(string), + string to = default(string), + string text = default(string), + string direction = default(string), + string applicationId = default(string), + MessageStatus? status = default(MessageStatus?), + string phoneNumberId = default(string) + ) + : base() + { + base.RequestType = requestType; + + this.AccountId = accountId; + + this.MessageId = messageId; + + this.CallId = callId; + + this.From = from; + + this.To = to; + + this.Text = text; + + this.Direction = direction; + + this.ApplicationId = applicationId; + + this.Status = status; + + this.PhoneNumberId = phoneNumberId; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance MessageStatusWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static MessageStatusWebhook Deserialize(string jsonPayload) + { + return (MessageStatusWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(MessageStatusWebhook), + _serializerSettings + ); + } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Unique ID for this message, generated by FreeClimb. + /// + /// Unique ID for this message, generated by FreeClimb. + [DataMember(Name = "messageId", EmitDefaultValue = false)] + public string MessageId { get; set; } + + /// + /// Unique ID for the Call in the context of which the Sms PerCL command was issued. + /// + /// Unique ID for the Call in the context of which the Sms PerCL command was issued. + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// aPhone number used to initiate the SMS message (in E.164 format). + /// + /// aPhone number used to initiate the SMS message (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Destination number of the SMS message (in E.164 format). + /// + /// Destination number of the SMS message (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// Body of the SMS message. + /// + /// Body of the SMS message. + [DataMember(Name = "text", EmitDefaultValue = false)] + public string Text { get; set; } + + /// + /// Value will be outbound to indicate an outgoing SMS from FreeClimb. + /// + /// Value will be outbound to indicate an outgoing SMS from FreeClimb. + [DataMember(Name = "direction", EmitDefaultValue = false)] + public string Direction { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "applicationId", EmitDefaultValue = false)] + public string ApplicationId { get; set; } + + /// + /// ID of the destination phone number. + /// + /// ID of the destination phone number. + [DataMember(Name = "phoneNumberId", EmitDefaultValue = false)] + public string PhoneNumberId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MessageStatusWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" PhoneNumberId: ").Append(PhoneNumberId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the MessageStatusWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("accountId", AccountId); + props.Add("messageId", MessageId); + props.Add("callId", CallId); + props.Add("from", From); + props.Add("to", To); + props.Add("text", Text); + props.Add("direction", Direction); + props.Add("applicationId", ApplicationId); + props.Add("status", Status); + props.Add("phoneNumberId", PhoneNumberId); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/MessagesList.cs b/src/freeclimb/Model/MessagesList.cs index 6a0af315..5b3f31ad 100644 --- a/src/freeclimb/Model/MessagesList.cs +++ b/src/freeclimb/Model/MessagesList.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// MessagesList /// [DataContract(Name = "MessagesList")] - public partial class MessagesList : IPagination, IEquatable, IValidatableObject + public partial class MessagesList : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,31 @@ public partial class MessagesList : IPagination, IEquatable, IVali /// Number of items per page. /// Uri to retrieve the next page of items. /// Array of messages. - public MessagesList(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List messages = default(List)) + public MessagesList( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List messages = default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.Messages = messages; } @@ -139,151 +155,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the MessagesList instance. + /// Retrieve the KVP Dictionary for the MessagesList instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in Messages) { nested.Add(item); } - props.Add("messages", nested); + props.Add("messages", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MessagesList); - } - - /// - /// Returns true if MessagesList instances are equal - /// - /// Instance of MessagesList to be compared - /// Boolean - public bool Equals(MessagesList input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.Messages == input.Messages || - this.Messages != null && - input.Messages != null && - this.Messages.SequenceEqual(input.Messages) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.Messages != null) - { - hashCode = (hashCode * 59) + this.Messages.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/MessagesListAllOf.cs b/src/freeclimb/Model/MessagesListAllOf.cs deleted file mode 100644 index e7244b0d..00000000 --- a/src/freeclimb/Model/MessagesListAllOf.cs +++ /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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// MessagesListAllOf - /// - [DataContract(Name = "MessagesList_allOf")] - public partial class MessagesListAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Array of messages. - public MessagesListAllOf(List messages = default(List)) - { - this.Messages = messages; - } - - /// - /// Array of messages - /// - /// Array of messages - [DataMember(Name = "messages", EmitDefaultValue = true)] - public List Messages { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MessagesListAllOf {\n"); - sb.Append(" Messages: ").Append(Messages).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the MessagesListAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in Messages) - { - nested.Add(item); - } - props.Add("messages", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MessagesListAllOf); - } - - /// - /// Returns true if MessagesListAllOf instances are equal - /// - /// Instance of MessagesListAllOf to be compared - /// Boolean - public bool Equals(MessagesListAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Messages == input.Messages || - this.Messages != null && - input.Messages != null && - this.Messages.SequenceEqual(input.Messages) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Messages != null) - { - hashCode = (hashCode * 59) + this.Messages.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/MutableResourceModel.cs b/src/freeclimb/Model/MutableResourceModel.cs index 2c7a5ee0..58249020 100644 --- a/src/freeclimb/Model/MutableResourceModel.cs +++ b/src/freeclimb/Model/MutableResourceModel.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// MutableResourceModel /// [DataContract(Name = "MutableResourceModel")] - public partial class MutableResourceModel : IEquatable, IValidatableObject + public partial class MutableResourceModel : IValidatableObject { /// /// Initializes a new instance of the class. @@ -40,11 +40,19 @@ public partial class MutableResourceModel : IEquatable, IV /// The date that this resource was created (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. /// The date that this resource was last updated (GMT) in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. /// Revision count for the resource. This count is set to 1 on creation and is incremented every time it is updated.. - public MutableResourceModel(string uri = default(string), string dateCreated = default(string), string dateUpdated = default(string), int revision = default(int)) + public MutableResourceModel( + string uri = default(string), + string dateCreated = default(string), + string dateUpdated = default(string), + int revision = default(int) + ) { this.Uri = uri; + this.DateCreated = dateCreated; + this.DateUpdated = dateUpdated; + this.Revision = revision; } @@ -98,101 +106,36 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the MutableResourceModel instance. + /// Retrieve the KVP Dictionary for the MutableResourceModel instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("uri", Uri); - props.Add("dateCreated", DateCreated); - props.Add("dateUpdated", DateUpdated); - props.Add("revision", Revision); + props.Add("uri", Uri); + props.Add("dateCreated", DateCreated); + props.Add("dateUpdated", DateUpdated); + props.Add("revision", Revision); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MutableResourceModel); - } - - /// - /// Returns true if MutableResourceModel instances are equal - /// - /// Instance of MutableResourceModel to be compared - /// Boolean - public bool Equals(MutableResourceModel input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DateCreated == input.DateCreated || - (this.DateCreated != null && - this.DateCreated.Equals(input.DateCreated)) - ) && - ( - this.DateUpdated == input.DateUpdated || - (this.DateUpdated != null && - this.DateUpdated.Equals(input.DateUpdated)) - ) && - ( - this.Revision == input.Revision || - this.Revision.Equals(input.Revision) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DateCreated != null) - { - hashCode = (hashCode * 59) + this.DateCreated.GetHashCode(); - } - if (this.DateUpdated != null) - { - hashCode = (hashCode * 59) + this.DateUpdated.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Revision.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/OutDial.cs b/src/freeclimb/Model/OutDial.cs index 83d85ebb..7c5089e0 100644 --- a/src/freeclimb/Model/OutDial.cs +++ b/src/freeclimb/Model/OutDial.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,45 +33,20 @@ namespace freeclimb.Model /// [DataContract(Name = "OutDial")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class OutDial : PerclCommand, IEquatable, IValidatableObject + public partial class OutDial : PerclCommand, IValidatableObject { - /// /// Gets or Sets IfMachine /// [DataMember(Name = "ifMachine", EmitDefaultValue = false)] public IfMachine? IfMachine { get; set; } + /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected OutDial() { } + /// /// Initializes a new instance of the class. /// @@ -86,62 +61,96 @@ protected OutDial() { } /// 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`.. /// Parameter `privacyMode` will not log the `text` as required by PCI compliance.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "OutDial"). - public OutDial(string actionUrl = default(string), string callConnectUrl = default(string), string callingNumber = default(string), string destination = default(string), IfMachine? ifMachine = default(IfMachine?), string ifMachineUrl = default(string), string sendDigits = default(string), string statusCallbackUrl = default(string), int timeout = default(int), bool privacyMode = default(bool), string command = "OutDial") : base(command) + public OutDial( + string actionUrl = default(string), + string callConnectUrl = default(string), + string callingNumber = default(string), + string destination = default(string), + IfMachine? ifMachine = default(IfMachine?), + string ifMachineUrl = default(string), + string sendDigits = default(string), + string statusCallbackUrl = default(string), + int timeout = default(int), + bool privacyMode = default(bool), + string command = @"OutDial" + ) + : base(command) { // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for OutDial and cannot be null"); + if (actionUrl == null) + { + throw new ArgumentNullException( + "actionUrl is a required property for OutDial and cannot be null" + ); } this.ActionUrl = actionUrl; + // to ensure "callConnectUrl" is required (not null) - if (callConnectUrl == null) { - throw new ArgumentNullException("callConnectUrl is a required property for OutDial and cannot be null"); + if (callConnectUrl == null) + { + throw new ArgumentNullException( + "callConnectUrl is a required property for OutDial and cannot be null" + ); } this.CallConnectUrl = callConnectUrl; + // to ensure "callingNumber" is required (not null) - if (callingNumber == null) { - throw new ArgumentNullException("callingNumber is a required property for OutDial and cannot be null"); + if (callingNumber == null) + { + throw new ArgumentNullException( + "callingNumber is a required property for OutDial and cannot be null" + ); } this.CallingNumber = callingNumber; + // to ensure "destination" is required (not null) - if (destination == null) { - throw new ArgumentNullException("destination is a required property for OutDial and cannot be null"); + if (destination == null) + { + throw new ArgumentNullException( + "destination is a required property for OutDial and cannot be null" + ); } this.Destination = destination; + this.IfMachine = ifMachine; + this.IfMachineUrl = ifMachineUrl; + this.SendDigits = sendDigits; + this.StatusCallbackUrl = statusCallbackUrl; + this.Timeout = timeout; + this.PrivacyMode = privacyMode; } /// - /// URL to which FreeClimb sends an HTTP POST request. + /// URL to which FreeClimb sends an HTTP POST request. /// /// URL to which FreeClimb sends an HTTP POST request. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = true)] public string ActionUrl { get; set; } /// /// URL to which FreeClimb makes an HTTP POST request informing the result of the OutDial. /// /// URL to which FreeClimb makes an HTTP POST request informing the result of the OutDial. - [DataMember(Name = "callConnectUrl", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "callConnectUrl", IsRequired = true, EmitDefaultValue = true)] public string CallConnectUrl { get; set; } /// /// 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. /// /// 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. - [DataMember(Name = "callingNumber", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "callingNumber", IsRequired = true, EmitDefaultValue = true)] public string CallingNumber { get; set; } /// - /// E.164 representation of the phone number to Call. + /// E.164 representation of the phone number to Call. /// /// E.164 representation of the phone number to Call. - [DataMember(Name = "destination", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "destination", IsRequired = true, EmitDefaultValue = true)] public string Destination { get; set; } /// @@ -218,148 +227,35 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the OutDial instance. + /// Retrieve the KVP Dictionary for the OutDial instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - props.Add("callConnectUrl", CallConnectUrl); - props.Add("callingNumber", CallingNumber); - props.Add("destination", Destination); - props.Add("ifMachine", IfMachine); - props.Add("ifMachineUrl", IfMachineUrl); - props.Add("sendDigits", SendDigits); - props.Add("statusCallbackUrl", StatusCallbackUrl); - props.Add("timeout", Timeout); - props.Add("privacyMode", PrivacyMode); + props.Add("actionUrl", ActionUrl); + props.Add("callConnectUrl", CallConnectUrl); + props.Add("callingNumber", CallingNumber); + props.Add("destination", Destination); + props.Add("ifMachine", IfMachine); + props.Add("ifMachineUrl", IfMachineUrl); + props.Add("sendDigits", SendDigits); + props.Add("statusCallbackUrl", StatusCallbackUrl); + props.Add("timeout", Timeout); + props.Add("privacyMode", PrivacyMode); IDictionary command = new Dictionary(); - command.Add("OutDial",props); + command.Add("OutDial", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OutDial); - } - - /// - /// Returns true if OutDial instances are equal - /// - /// Instance of OutDial to be compared - /// Boolean - public bool Equals(OutDial input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && base.Equals(input) && - ( - this.CallConnectUrl == input.CallConnectUrl || - (this.CallConnectUrl != null && - this.CallConnectUrl.Equals(input.CallConnectUrl)) - ) && base.Equals(input) && - ( - this.CallingNumber == input.CallingNumber || - (this.CallingNumber != null && - this.CallingNumber.Equals(input.CallingNumber)) - ) && base.Equals(input) && - ( - this.Destination == input.Destination || - (this.Destination != null && - this.Destination.Equals(input.Destination)) - ) && base.Equals(input) && - ( - this.IfMachine == input.IfMachine || - this.IfMachine.Equals(input.IfMachine) - ) && base.Equals(input) && - ( - this.IfMachineUrl == input.IfMachineUrl || - (this.IfMachineUrl != null && - this.IfMachineUrl.Equals(input.IfMachineUrl)) - ) && base.Equals(input) && - ( - this.SendDigits == input.SendDigits || - (this.SendDigits != null && - this.SendDigits.Equals(input.SendDigits)) - ) && base.Equals(input) && - ( - this.StatusCallbackUrl == input.StatusCallbackUrl || - (this.StatusCallbackUrl != null && - this.StatusCallbackUrl.Equals(input.StatusCallbackUrl)) - ) && base.Equals(input) && - ( - this.Timeout == input.Timeout || - this.Timeout.Equals(input.Timeout) - ) && base.Equals(input) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - if (this.CallConnectUrl != null) - { - hashCode = (hashCode * 59) + this.CallConnectUrl.GetHashCode(); - } - if (this.CallingNumber != null) - { - hashCode = (hashCode * 59) + this.CallingNumber.GetHashCode(); - } - if (this.Destination != null) - { - hashCode = (hashCode * 59) + this.Destination.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IfMachine.GetHashCode(); - if (this.IfMachineUrl != null) - { - hashCode = (hashCode * 59) + this.IfMachineUrl.GetHashCode(); - } - if (this.SendDigits != null) - { - hashCode = (hashCode * 59) + this.SendDigits.GetHashCode(); - } - if (this.StatusCallbackUrl != null) - { - hashCode = (hashCode * 59) + this.StatusCallbackUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Timeout.GetHashCode(); - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -369,14 +265,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/OutDialAllOf.cs b/src/freeclimb/Model/OutDialAllOf.cs deleted file mode 100644 index 28333b6b..00000000 --- a/src/freeclimb/Model/OutDialAllOf.cs +++ /dev/null @@ -1,330 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// OutDialAllOf - /// - [DataContract(Name = "OutDial_allOf")] - public partial class OutDialAllOf : IEquatable, IValidatableObject - { - - /// - /// Gets or Sets IfMachine - /// - [DataMember(Name = "ifMachine", EmitDefaultValue = false)] - public IfMachine? IfMachine { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected OutDialAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// URL to which FreeClimb sends an HTTP POST request. (required). - /// URL to which FreeClimb makes an HTTP POST request informing the result of the OutDial. (required). - /// 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. (required). - /// E.164 representation of the phone number to Call. (required). - /// ifMachine. - /// 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.. - /// DTMF tones to play to the outdialed Call. This is typically used to dial a number and then dial an extension.. - /// 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.. - /// 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`.. - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance.. - public OutDialAllOf(string actionUrl = default(string), string callConnectUrl = default(string), string callingNumber = default(string), string destination = default(string), IfMachine? ifMachine = default(IfMachine?), string ifMachineUrl = default(string), string sendDigits = default(string), string statusCallbackUrl = default(string), int timeout = default(int), bool privacyMode = default(bool)) - { - // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for OutDialAllOf and cannot be null"); - } - this.ActionUrl = actionUrl; - // to ensure "callConnectUrl" is required (not null) - if (callConnectUrl == null) { - throw new ArgumentNullException("callConnectUrl is a required property for OutDialAllOf and cannot be null"); - } - this.CallConnectUrl = callConnectUrl; - // to ensure "callingNumber" is required (not null) - if (callingNumber == null) { - throw new ArgumentNullException("callingNumber is a required property for OutDialAllOf and cannot be null"); - } - this.CallingNumber = callingNumber; - // to ensure "destination" is required (not null) - if (destination == null) { - throw new ArgumentNullException("destination is a required property for OutDialAllOf and cannot be null"); - } - this.Destination = destination; - this.IfMachine = ifMachine; - this.IfMachineUrl = ifMachineUrl; - this.SendDigits = sendDigits; - this.StatusCallbackUrl = statusCallbackUrl; - this.Timeout = timeout; - this.PrivacyMode = privacyMode; - } - - /// - /// URL to which FreeClimb sends an HTTP POST request. - /// - /// URL to which FreeClimb sends an HTTP POST request. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] - public string ActionUrl { get; set; } - - /// - /// URL to which FreeClimb makes an HTTP POST request informing the result of the OutDial. - /// - /// URL to which FreeClimb makes an HTTP POST request informing the result of the OutDial. - [DataMember(Name = "callConnectUrl", IsRequired = true, EmitDefaultValue = false)] - public string CallConnectUrl { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "callingNumber", IsRequired = true, EmitDefaultValue = false)] - public string CallingNumber { get; set; } - - /// - /// E.164 representation of the phone number to Call. - /// - /// E.164 representation of the phone number to Call. - [DataMember(Name = "destination", IsRequired = true, EmitDefaultValue = false)] - public string Destination { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "ifMachineUrl", EmitDefaultValue = false)] - public string IfMachineUrl { get; set; } - - /// - /// DTMF tones to play to the outdialed Call. This is typically used to dial a number and then dial an extension. - /// - /// DTMF tones to play to the outdialed Call. This is typically used to dial a number and then dial an extension. - [DataMember(Name = "sendDigits", EmitDefaultValue = false)] - public string SendDigits { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "statusCallbackUrl", EmitDefaultValue = false)] - public string StatusCallbackUrl { get; set; } - - /// - /// 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`. - /// - /// 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`. - [DataMember(Name = "timeout", EmitDefaultValue = false)] - public int Timeout { get; set; } - - /// - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance. - /// - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance. - [DataMember(Name = "privacyMode", EmitDefaultValue = true)] - public bool PrivacyMode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OutDialAllOf {\n"); - sb.Append(" ActionUrl: ").Append(ActionUrl).Append("\n"); - sb.Append(" CallConnectUrl: ").Append(CallConnectUrl).Append("\n"); - sb.Append(" CallingNumber: ").Append(CallingNumber).Append("\n"); - sb.Append(" Destination: ").Append(Destination).Append("\n"); - sb.Append(" IfMachine: ").Append(IfMachine).Append("\n"); - sb.Append(" IfMachineUrl: ").Append(IfMachineUrl).Append("\n"); - sb.Append(" SendDigits: ").Append(SendDigits).Append("\n"); - sb.Append(" StatusCallbackUrl: ").Append(StatusCallbackUrl).Append("\n"); - sb.Append(" Timeout: ").Append(Timeout).Append("\n"); - sb.Append(" PrivacyMode: ").Append(PrivacyMode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the OutDialAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - props.Add("callConnectUrl", CallConnectUrl); - props.Add("callingNumber", CallingNumber); - props.Add("destination", Destination); - props.Add("ifMachine", IfMachine); - props.Add("ifMachineUrl", IfMachineUrl); - props.Add("sendDigits", SendDigits); - props.Add("statusCallbackUrl", StatusCallbackUrl); - props.Add("timeout", Timeout); - props.Add("privacyMode", PrivacyMode); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OutDialAllOf); - } - - /// - /// Returns true if OutDialAllOf instances are equal - /// - /// Instance of OutDialAllOf to be compared - /// Boolean - public bool Equals(OutDialAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && - ( - this.CallConnectUrl == input.CallConnectUrl || - (this.CallConnectUrl != null && - this.CallConnectUrl.Equals(input.CallConnectUrl)) - ) && - ( - this.CallingNumber == input.CallingNumber || - (this.CallingNumber != null && - this.CallingNumber.Equals(input.CallingNumber)) - ) && - ( - this.Destination == input.Destination || - (this.Destination != null && - this.Destination.Equals(input.Destination)) - ) && - ( - this.IfMachine == input.IfMachine || - this.IfMachine.Equals(input.IfMachine) - ) && - ( - this.IfMachineUrl == input.IfMachineUrl || - (this.IfMachineUrl != null && - this.IfMachineUrl.Equals(input.IfMachineUrl)) - ) && - ( - this.SendDigits == input.SendDigits || - (this.SendDigits != null && - this.SendDigits.Equals(input.SendDigits)) - ) && - ( - this.StatusCallbackUrl == input.StatusCallbackUrl || - (this.StatusCallbackUrl != null && - this.StatusCallbackUrl.Equals(input.StatusCallbackUrl)) - ) && - ( - this.Timeout == input.Timeout || - this.Timeout.Equals(input.Timeout) - ) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - if (this.CallConnectUrl != null) - { - hashCode = (hashCode * 59) + this.CallConnectUrl.GetHashCode(); - } - if (this.CallingNumber != null) - { - hashCode = (hashCode * 59) + this.CallingNumber.GetHashCode(); - } - if (this.Destination != null) - { - hashCode = (hashCode * 59) + this.Destination.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IfMachine.GetHashCode(); - if (this.IfMachineUrl != null) - { - hashCode = (hashCode * 59) + this.IfMachineUrl.GetHashCode(); - } - if (this.SendDigits != null) - { - hashCode = (hashCode * 59) + this.SendDigits.GetHashCode(); - } - if (this.StatusCallbackUrl != null) - { - hashCode = (hashCode * 59) + this.StatusCallbackUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Timeout.GetHashCode(); - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/OutDialApiConnectWebhook.cs b/src/freeclimb/Model/OutDialApiConnectWebhook.cs new file mode 100644 index 00000000..5a4c6b30 --- /dev/null +++ b/src/freeclimb/Model/OutDialApiConnectWebhook.cs @@ -0,0 +1,255 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// 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). + /// + [DataContract(Name = "OutDialApiConnectWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class OutDialApiConnectWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (default to "OutDialApiConnectWebhook"). + /// Account ID associated with your account.. + /// Unique identifier for this Call, generated by FreeClimb. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number or SIP URL of the party that is receiving the call (phone number in E.164 format).. + /// callStatus. + /// direction. + /// This is only populated if request pertains to a conference. Otherwise, it is set to null.. + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null.. + /// ID of the Call that created this leg (child call).. + public OutDialApiConnectWebhook( + string requestType = @"OutDialApiConnectWebhook", + string accountId = default(string), + string callId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + string parentCallId = default(string) + ) + : base() + { + base.RequestType = requestType; + + this.AccountId = accountId; + + this.CallId = callId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.ParentCallId = parentCallId; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance OutDialApiConnectWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static OutDialApiConnectWebhook Deserialize(string jsonPayload) + { + return (OutDialApiConnectWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(OutDialApiConnectWebhook), + _serializerSettings + ); + } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Unique identifier for this Call, generated by FreeClimb + /// + /// Unique identifier for this Call, generated by FreeClimb + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number or SIP URL of the party that is receiving the call (phone number in E.164 format). + /// + /// Phone number or SIP URL of the party that is receiving the call (phone number in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// This is only populated if request pertains to a conference. Otherwise, it is set to null. + /// + /// This is only populated if request pertains to a conference. Otherwise, it is set to null. + [DataMember(Name = "conferenceId", EmitDefaultValue = true)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// ID of the Call that created this leg (child call). + /// + /// ID of the Call that created this leg (child call). + [DataMember(Name = "parentCallId", EmitDefaultValue = false)] + public string ParentCallId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class OutDialApiConnectWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" ParentCallId: ").Append(ParentCallId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the OutDialApiConnectWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("accountId", AccountId); + props.Add("callId", CallId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("parentCallId", ParentCallId); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/OutDialConnectWebhook.cs b/src/freeclimb/Model/OutDialConnectWebhook.cs new file mode 100644 index 00000000..0f91b09b --- /dev/null +++ b/src/freeclimb/Model/OutDialConnectWebhook.cs @@ -0,0 +1,255 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// 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. + /// + [DataContract(Name = "OutDialConnectWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class OutDialConnectWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (default to "OutDialConnectWebhook"). + /// Account ID associated with your account.. + /// Unique identifier for this Call, generated by FreeClimb. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number or SIP URL of the party that is receiving the call (phone number in E.164 format).. + /// callStatus. + /// direction. + /// This is only populated if request pertains to a conference. Otherwise, it is set to null.. + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null.. + /// ID of the Call that created this leg (child call).. + public OutDialConnectWebhook( + string requestType = @"OutDialConnectWebhook", + string accountId = default(string), + string callId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + string parentCallId = default(string) + ) + : base() + { + base.RequestType = requestType; + + this.AccountId = accountId; + + this.CallId = callId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.ParentCallId = parentCallId; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance OutDialConnectWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static OutDialConnectWebhook Deserialize(string jsonPayload) + { + return (OutDialConnectWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(OutDialConnectWebhook), + _serializerSettings + ); + } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Unique identifier for this Call, generated by FreeClimb + /// + /// Unique identifier for this Call, generated by FreeClimb + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number or SIP URL of the party that is receiving the call (phone number in E.164 format). + /// + /// Phone number or SIP URL of the party that is receiving the call (phone number in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// This is only populated if request pertains to a conference. Otherwise, it is set to null. + /// + /// This is only populated if request pertains to a conference. Otherwise, it is set to null. + [DataMember(Name = "conferenceId", EmitDefaultValue = true)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// ID of the Call that created this leg (child call). + /// + /// ID of the Call that created this leg (child call). + [DataMember(Name = "parentCallId", EmitDefaultValue = false)] + public string ParentCallId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class OutDialConnectWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" ParentCallId: ").Append(ParentCallId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the OutDialConnectWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("accountId", AccountId); + props.Add("callId", CallId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("parentCallId", ParentCallId); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/OutDialStartWebhook.cs b/src/freeclimb/Model/OutDialStartWebhook.cs new file mode 100644 index 00000000..4e99ba2f --- /dev/null +++ b/src/freeclimb/Model/OutDialStartWebhook.cs @@ -0,0 +1,268 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// 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. + /// + [DataContract(Name = "OutDialStartWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class OutDialStartWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// Context or reason why this request is being made. Will be outDialStart - The OutDial command has started and the actionUrl is being invoked. (default to "OutDialStartWebhook"). + /// Account ID associated with your account.. + /// Unique identifier for this Call, generated by FreeClimb. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// This is only populated if request pertains to a conference. Otherwise, it is set to null.. + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null.. + /// ID of the child call that was generated as a result of the Outdial.. + /// 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.. + public OutDialStartWebhook( + string requestType = @"OutDialStartWebhook", + string accountId = default(string), + string callId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + string dialCallId = default(string), + string parentCallId = default(string) + ) + : base() + { + base.RequestType = requestType; + + this.AccountId = accountId; + + this.CallId = callId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.DialCallId = dialCallId; + + this.ParentCallId = parentCallId; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance OutDialStartWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static OutDialStartWebhook Deserialize(string jsonPayload) + { + return (OutDialStartWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(OutDialStartWebhook), + _serializerSettings + ); + } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Unique identifier for this Call, generated by FreeClimb + /// + /// Unique identifier for this Call, generated by FreeClimb + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// This is only populated if request pertains to a conference. Otherwise, it is set to null. + /// + /// This is only populated if request pertains to a conference. Otherwise, it is set to null. + [DataMember(Name = "conferenceId", EmitDefaultValue = true)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// ID of the child call that was generated as a result of the Outdial. + /// + /// ID of the child call that was generated as a result of the Outdial. + [DataMember(Name = "dialCallId", EmitDefaultValue = false)] + public string DialCallId { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "parentCallId", EmitDefaultValue = true)] + public string ParentCallId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class OutDialStartWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" DialCallId: ").Append(DialCallId).Append("\n"); + sb.Append(" ParentCallId: ").Append(ParentCallId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the OutDialStartWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("accountId", AccountId); + props.Add("callId", CallId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("dialCallId", DialCallId); + props.Add("parentCallId", ParentCallId); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/PaginationModel.cs b/src/freeclimb/Model/PaginationModel.cs index c5c699f8..d28b7d94 100644 --- a/src/freeclimb/Model/PaginationModel.cs +++ b/src/freeclimb/Model/PaginationModel.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// PaginationModel /// [DataContract(Name = "PaginationModel")] - public partial class PaginationModel : IEquatable, IValidatableObject + public partial class PaginationModel : IValidatableObject { /// /// Initializes a new instance of the class. @@ -43,14 +43,28 @@ public partial class PaginationModel : IEquatable, IValidatable /// Total number of pages. /// Number of items per page. /// Uri to retrieve the next page of items. - public PaginationModel(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string)) + public PaginationModel( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; } @@ -128,135 +142,39 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the PaginationModel instance. + /// Retrieve the KVP Dictionary for the PaginationModel instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaginationModel); - } - - /// - /// Returns true if PaginationModel instances are equal - /// - /// Instance of PaginationModel to be compared - /// Boolean - public bool Equals(PaginationModel input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/Park.cs b/src/freeclimb/Model/Park.cs index 5de69575..8ec60d3b 100644 --- a/src/freeclimb/Model/Park.cs +++ b/src/freeclimb/Model/Park.cs @@ -13,59 +13,34 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { /// - /// 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. + /// 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. /// [DataContract(Name = "Park")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class Park : PerclCommand, IEquatable, IValidatableObject + public partial class Park : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected Park() { } + /// /// Initializes a new instance of the class. /// @@ -73,18 +48,32 @@ protected Park() { } /// 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. (required). /// URL to be invoked when the Call is parked. The request to the URL contains the standard request parameters.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "Park"). - public Park(string waitUrl = default(string), string actionUrl = default(string), string notificationUrl = default(string), string command = "Park") : base(command) + public Park( + string waitUrl = default(string), + string actionUrl = default(string), + string notificationUrl = default(string), + string command = @"Park" + ) + : base(command) { // to ensure "waitUrl" is required (not null) - if (waitUrl == null) { - throw new ArgumentNullException("waitUrl is a required property for Park and cannot be null"); + if (waitUrl == null) + { + throw new ArgumentNullException( + "waitUrl is a required property for Park and cannot be null" + ); } this.WaitUrl = waitUrl; + // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for Park and cannot be null"); + if (actionUrl == null) + { + throw new ArgumentNullException( + "actionUrl is a required property for Park and cannot be null" + ); } this.ActionUrl = actionUrl; + this.NotificationUrl = notificationUrl; } @@ -92,14 +81,14 @@ protected Park() { } /// 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. /// /// 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. - [DataMember(Name = "waitUrl", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "waitUrl", IsRequired = true, EmitDefaultValue = true)] public string WaitUrl { get; set; } /// /// 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. /// /// 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. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = true)] public string ActionUrl { get; set; } /// @@ -141,90 +130,28 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the Park instance. + /// Retrieve the KVP Dictionary for the Park instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("waitUrl", WaitUrl); - props.Add("actionUrl", ActionUrl); - props.Add("notificationUrl", NotificationUrl); + props.Add("waitUrl", WaitUrl); + props.Add("actionUrl", ActionUrl); + props.Add("notificationUrl", NotificationUrl); IDictionary command = new Dictionary(); - command.Add("Park",props); + command.Add("Park", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Park); - } - - /// - /// Returns true if Park instances are equal - /// - /// Instance of Park to be compared - /// Boolean - public bool Equals(Park input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.WaitUrl == input.WaitUrl || - (this.WaitUrl != null && - this.WaitUrl.Equals(input.WaitUrl)) - ) && base.Equals(input) && - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && base.Equals(input) && - ( - this.NotificationUrl == input.NotificationUrl || - (this.NotificationUrl != null && - this.NotificationUrl.Equals(input.NotificationUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.WaitUrl != null) - { - hashCode = (hashCode * 59) + this.WaitUrl.GetHashCode(); - } - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - if (this.NotificationUrl != null) - { - hashCode = (hashCode * 59) + this.NotificationUrl.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -234,14 +161,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/ParkAllOf.cs b/src/freeclimb/Model/ParkAllOf.cs deleted file mode 100644 index 645dfb94..00000000 --- a/src/freeclimb/Model/ParkAllOf.cs +++ /dev/null @@ -1,195 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// ParkAllOf - /// - [DataContract(Name = "Park_allOf")] - public partial class ParkAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ParkAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// 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. (required). - /// URL to be invoked when the Call is parked. The request to the URL contains the standard request parameters.. - public ParkAllOf(string waitUrl = default(string), string actionUrl = default(string), string notificationUrl = default(string)) - { - // to ensure "waitUrl" is required (not null) - if (waitUrl == null) { - throw new ArgumentNullException("waitUrl is a required property for ParkAllOf and cannot be null"); - } - this.WaitUrl = waitUrl; - // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for ParkAllOf and cannot be null"); - } - this.ActionUrl = actionUrl; - this.NotificationUrl = notificationUrl; - } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "waitUrl", IsRequired = true, EmitDefaultValue = false)] - public string WaitUrl { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] - public string ActionUrl { get; set; } - - /// - /// URL to be invoked when the Call is parked. The request to the URL contains the standard request parameters. - /// - /// URL to be invoked when the Call is parked. The request to the URL contains the standard request parameters. - [DataMember(Name = "notificationUrl", EmitDefaultValue = false)] - public string NotificationUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ParkAllOf {\n"); - sb.Append(" WaitUrl: ").Append(WaitUrl).Append("\n"); - sb.Append(" ActionUrl: ").Append(ActionUrl).Append("\n"); - sb.Append(" NotificationUrl: ").Append(NotificationUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the ParkAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("waitUrl", WaitUrl); - props.Add("actionUrl", ActionUrl); - props.Add("notificationUrl", NotificationUrl); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ParkAllOf); - } - - /// - /// Returns true if ParkAllOf instances are equal - /// - /// Instance of ParkAllOf to be compared - /// Boolean - public bool Equals(ParkAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.WaitUrl == input.WaitUrl || - (this.WaitUrl != null && - this.WaitUrl.Equals(input.WaitUrl)) - ) && - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && - ( - this.NotificationUrl == input.NotificationUrl || - (this.NotificationUrl != null && - this.NotificationUrl.Equals(input.NotificationUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.WaitUrl != null) - { - hashCode = (hashCode * 59) + this.WaitUrl.GetHashCode(); - } - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - if (this.NotificationUrl != null) - { - hashCode = (hashCode * 59) + this.NotificationUrl.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/Pause.cs b/src/freeclimb/Model/Pause.cs index f4fcf83c..5fd63ac7 100644 --- a/src/freeclimb/Model/Pause.cs +++ b/src/freeclimb/Model/Pause.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,45 +33,21 @@ namespace freeclimb.Model /// [DataContract(Name = "Pause")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class Pause : PerclCommand, IEquatable, IValidatableObject + public partial class Pause : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected Pause() { } + /// /// Initializes a new instance of the class. /// /// Length in milliseconds. FreeClimb will wait silently before continuing on. (required). /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "Pause"). - public Pause(int length = default(int), string command = "Pause") : base(command) + public Pause(int length = default(int), string command = @"Pause") + : base(command) { this.Length = length; } @@ -80,7 +56,7 @@ protected Pause() { } /// Length in milliseconds. FreeClimb will wait silently before continuing on. /// /// Length in milliseconds. FreeClimb will wait silently before continuing on. - [DataMember(Name = "length", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "length", IsRequired = true, EmitDefaultValue = true)] public int Length { get; set; } /// @@ -113,66 +89,26 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the Pause instance. + /// Retrieve the KVP Dictionary for the Pause instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("length", Length); + props.Add("length", Length); IDictionary command = new Dictionary(); - command.Add("Pause",props); + command.Add("Pause", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Pause); - } - - /// - /// Returns true if Pause instances are equal - /// - /// Instance of Pause to be compared - /// Boolean - public bool Equals(Pause input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.Length == input.Length || - this.Length.Equals(input.Length) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.Length.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -182,14 +118,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/PauseAllOf.cs b/src/freeclimb/Model/PauseAllOf.cs deleted file mode 100644 index 93aabe9e..00000000 --- a/src/freeclimb/Model/PauseAllOf.cs +++ /dev/null @@ -1,143 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// PauseAllOf - /// - [DataContract(Name = "Pause_allOf")] - public partial class PauseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PauseAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// Length in milliseconds. FreeClimb will wait silently before continuing on. (required). - public PauseAllOf(int length = default(int)) - { - this.Length = length; - } - - /// - /// Length in milliseconds. FreeClimb will wait silently before continuing on. - /// - /// Length in milliseconds. FreeClimb will wait silently before continuing on. - [DataMember(Name = "length", IsRequired = true, EmitDefaultValue = false)] - public int Length { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PauseAllOf {\n"); - sb.Append(" Length: ").Append(Length).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the PauseAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("length", Length); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PauseAllOf); - } - - /// - /// Returns true if PauseAllOf instances are equal - /// - /// Instance of PauseAllOf to be compared - /// Boolean - public bool Equals(PauseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Length == input.Length || - this.Length.Equals(input.Length) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Length.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/PerclCommand.cs b/src/freeclimb/Model/PerclCommand.cs index 1bf395b9..06dcf3bd 100644 --- a/src/freeclimb/Model/PerclCommand.cs +++ b/src/freeclimb/Model/PerclCommand.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -59,7 +59,7 @@ namespace freeclimb.Model [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class PerclCommand : IEquatable, IValidatableObject + public partial class PerclCommand : IValidatableObject { /// /// Initializes a new instance of the class. @@ -106,68 +106,24 @@ public virtual string ToJson() } /// - /// Retrieve the KVP Dictionary for the PerclCommand instance. + /// Retrieve the KVP Dictionary for the PerclCommand instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("command", Command); + props.Add("command", Command); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PerclCommand); - } - - /// - /// Returns true if PerclCommand instances are equal - /// - /// Instance of PerclCommand to be compared - /// Boolean - public bool Equals(PerclCommand input) - { - if (input == null) - { - return false; - } - return - ( - this.Command == input.Command || - (this.Command != null && - this.Command.Equals(input.Command)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Command != null) - { - hashCode = (hashCode * 59) + this.Command.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public virtual IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -177,10 +133,9 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected virtual IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { yield break; } } - } diff --git a/src/freeclimb/Model/PerclScript.cs b/src/freeclimb/Model/PerclScript.cs index 8af1d758..38e0c11d 100644 --- a/src/freeclimb/Model/PerclScript.cs +++ b/src/freeclimb/Model/PerclScript.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// A PerCL script to be returned to the FreeClimb servers in FreeClimb applications /// [DataContract(Name = "PerclScript")] - public partial class PerclScript : IEquatable, IValidatableObject + public partial class PerclScript : IValidatableObject { /// /// Initializes a new instance of the class. @@ -79,12 +79,12 @@ public virtual string ToJson() StringBuilder strb = new StringBuilder(); jsonSerializer.Serialize(new StringWriter(strb), list); - + return strb.ToString(); } /// - /// Retrieve the KVP Dictionary for the PerclScript instance. + /// Retrieve the KVP Dictionary for the PerclScript instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() @@ -95,66 +95,20 @@ public virtual IDictionary ToKvp() { nested.Add(item); } - props.Add("commands", nested); + props.Add("commands", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PerclScript); - } - - /// - /// Returns true if PerclScript instances are equal - /// - /// Instance of PerclScript to be compared - /// Boolean - public bool Equals(PerclScript input) - { - if (input == null) - { - return false; - } - return - ( - this.Commands == input.Commands || - this.Commands != null && - input.Commands != null && - this.Commands.SequenceEqual(input.Commands) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Commands != null) - { - hashCode = (hashCode * 59) + this.Commands.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/Play.cs b/src/freeclimb/Model/Play.cs index 500e9327..46dfb84f 100644 --- a/src/freeclimb/Model/Play.cs +++ b/src/freeclimb/Model/Play.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,39 +33,14 @@ namespace freeclimb.Model /// [DataContract(Name = "Play")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class Play : PerclCommand, IEquatable, IValidatableObject + public partial class Play : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected Play() { } + /// /// Initializes a new instance of the class. /// @@ -73,22 +48,33 @@ protected Play() { } /// Number of times the audio file is played. Specifying '0' causes the Play action to loop until the Call is hung up.. /// Parameter `privacyMode` will not log the `text` as required by PCI compliance.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "Play"). - public Play(string file = default(string), int loop = default(int), bool privacyMode = default(bool), string command = "Play") : base(command) + public Play( + string file = default(string), + int loop = default(int), + bool privacyMode = default(bool), + string command = @"Play" + ) + : base(command) { // to ensure "file" is required (not null) - if (file == null) { - throw new ArgumentNullException("file is a required property for Play and cannot be null"); + if (file == null) + { + throw new ArgumentNullException( + "file is a required property for Play and cannot be null" + ); } this.File = file; + this.Loop = loop; + this.PrivacyMode = privacyMode; } /// - /// 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. + /// 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. /// /// 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. - [DataMember(Name = "file", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "file", IsRequired = true, EmitDefaultValue = true)] public string File { get; set; } /// @@ -137,82 +123,28 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the Play instance. + /// Retrieve the KVP Dictionary for the Play instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("file", File); - props.Add("loop", Loop); - props.Add("privacyMode", PrivacyMode); + props.Add("file", File); + props.Add("loop", Loop); + props.Add("privacyMode", PrivacyMode); IDictionary command = new Dictionary(); - command.Add("Play",props); + command.Add("Play", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Play); - } - - /// - /// Returns true if Play instances are equal - /// - /// Instance of Play to be compared - /// Boolean - public bool Equals(Play input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.File == input.File || - (this.File != null && - this.File.Equals(input.File)) - ) && base.Equals(input) && - ( - this.Loop == input.Loop || - this.Loop.Equals(input.Loop) - ) && base.Equals(input) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.File != null) - { - hashCode = (hashCode * 59) + this.File.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Loop.GetHashCode(); - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -222,14 +154,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/PlayAllOf.cs b/src/freeclimb/Model/PlayAllOf.cs deleted file mode 100644 index df25f9c7..00000000 --- a/src/freeclimb/Model/PlayAllOf.cs +++ /dev/null @@ -1,183 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// PlayAllOf - /// - [DataContract(Name = "Play_allOf")] - public partial class PlayAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PlayAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// Number of times the audio file is played. Specifying '0' causes the Play action to loop until the Call is hung up.. - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance.. - public PlayAllOf(string file = default(string), int loop = default(int), bool privacyMode = default(bool)) - { - // to ensure "file" is required (not null) - if (file == null) { - throw new ArgumentNullException("file is a required property for PlayAllOf and cannot be null"); - } - this.File = file; - this.Loop = loop; - this.PrivacyMode = privacyMode; - } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "file", IsRequired = true, EmitDefaultValue = false)] - public string File { get; set; } - - /// - /// Number of times the audio file is played. Specifying '0' causes the Play action to loop until the Call is hung up. - /// - /// Number of times the audio file is played. Specifying '0' causes the Play action to loop until the Call is hung up. - [DataMember(Name = "loop", EmitDefaultValue = false)] - public int Loop { get; set; } - - /// - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance. - /// - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance. - [DataMember(Name = "privacyMode", EmitDefaultValue = true)] - public bool PrivacyMode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PlayAllOf {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Loop: ").Append(Loop).Append("\n"); - sb.Append(" PrivacyMode: ").Append(PrivacyMode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the PlayAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("file", File); - props.Add("loop", Loop); - props.Add("privacyMode", PrivacyMode); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PlayAllOf); - } - - /// - /// Returns true if PlayAllOf instances are equal - /// - /// Instance of PlayAllOf to be compared - /// Boolean - public bool Equals(PlayAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.File == input.File || - (this.File != null && - this.File.Equals(input.File)) - ) && - ( - this.Loop == input.Loop || - this.Loop.Equals(input.Loop) - ) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.File != null) - { - hashCode = (hashCode * 59) + this.File.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Loop.GetHashCode(); - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/PlayEarlyMedia.cs b/src/freeclimb/Model/PlayEarlyMedia.cs index 7dbaf2a3..7893bb19 100644 --- a/src/freeclimb/Model/PlayEarlyMedia.cs +++ b/src/freeclimb/Model/PlayEarlyMedia.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,49 +33,28 @@ namespace freeclimb.Model /// [DataContract(Name = "PlayEarlyMedia")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class PlayEarlyMedia : PerclCommand, IEquatable, IValidatableObject + public partial class PlayEarlyMedia : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected PlayEarlyMedia() { } + /// /// Initializes a new instance of the class. /// /// 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. (required). /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "PlayEarlyMedia"). - public PlayEarlyMedia(string file = default(string), string command = "PlayEarlyMedia") : base(command) + public PlayEarlyMedia(string file = default(string), string command = @"PlayEarlyMedia") + : base(command) { // to ensure "file" is required (not null) - if (file == null) { - throw new ArgumentNullException("file is a required property for PlayEarlyMedia and cannot be null"); + if (file == null) + { + throw new ArgumentNullException( + "file is a required property for PlayEarlyMedia and cannot be null" + ); } this.File = file; } @@ -84,7 +63,7 @@ protected PlayEarlyMedia() { } /// 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. /// /// 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. - [DataMember(Name = "file", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "file", IsRequired = true, EmitDefaultValue = true)] public string File { get; set; } /// @@ -117,70 +96,26 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the PlayEarlyMedia instance. + /// Retrieve the KVP Dictionary for the PlayEarlyMedia instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("file", File); + props.Add("file", File); IDictionary command = new Dictionary(); - command.Add("PlayEarlyMedia",props); + command.Add("PlayEarlyMedia", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PlayEarlyMedia); - } - - /// - /// Returns true if PlayEarlyMedia instances are equal - /// - /// Instance of PlayEarlyMedia to be compared - /// Boolean - public bool Equals(PlayEarlyMedia input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.File == input.File || - (this.File != null && - this.File.Equals(input.File)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.File != null) - { - hashCode = (hashCode * 59) + this.File.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -190,14 +125,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/PlayEarlyMediaAllOf.cs b/src/freeclimb/Model/PlayEarlyMediaAllOf.cs deleted file mode 100644 index 2814ca7d..00000000 --- a/src/freeclimb/Model/PlayEarlyMediaAllOf.cs +++ /dev/null @@ -1,151 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// PlayEarlyMediaAllOf - /// - [DataContract(Name = "PlayEarlyMedia_allOf")] - public partial class PlayEarlyMediaAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PlayEarlyMediaAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - public PlayEarlyMediaAllOf(string file = default(string)) - { - // to ensure "file" is required (not null) - if (file == null) { - throw new ArgumentNullException("file is a required property for PlayEarlyMediaAllOf and cannot be null"); - } - this.File = file; - } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "file", IsRequired = true, EmitDefaultValue = false)] - public string File { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PlayEarlyMediaAllOf {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the PlayEarlyMediaAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("file", File); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PlayEarlyMediaAllOf); - } - - /// - /// Returns true if PlayEarlyMediaAllOf instances are equal - /// - /// Instance of PlayEarlyMediaAllOf to be compared - /// Boolean - public bool Equals(PlayEarlyMediaAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.File == input.File || - (this.File != null && - this.File.Equals(input.File)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.File != null) - { - hashCode = (hashCode * 59) + this.File.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/QueueList.cs b/src/freeclimb/Model/QueueList.cs index dc5cb0cf..c00235cf 100644 --- a/src/freeclimb/Model/QueueList.cs +++ b/src/freeclimb/Model/QueueList.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// QueueList /// [DataContract(Name = "QueueList")] - public partial class QueueList : IPagination, IEquatable, IValidatableObject + public partial class QueueList : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,31 @@ public partial class QueueList : IPagination, IEquatable, IValidatabl /// Number of items per page. /// Uri to retrieve the next page of items. /// queues. - public QueueList(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List queues = default(List)) + public QueueList( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List queues = default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.Queues = queues; } @@ -138,151 +154,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the QueueList instance. + /// Retrieve the KVP Dictionary for the QueueList instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in Queues) { nested.Add(item); } - props.Add("queues", nested); + props.Add("queues", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as QueueList); - } - - /// - /// Returns true if QueueList instances are equal - /// - /// Instance of QueueList to be compared - /// Boolean - public bool Equals(QueueList input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.Queues == input.Queues || - this.Queues != null && - input.Queues != null && - this.Queues.SequenceEqual(input.Queues) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.Queues != null) - { - hashCode = (hashCode * 59) + this.Queues.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/QueueListAllOf.cs b/src/freeclimb/Model/QueueListAllOf.cs deleted file mode 100644 index 96c2d586..00000000 --- a/src/freeclimb/Model/QueueListAllOf.cs +++ /dev/null @@ -1,147 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// QueueListAllOf - /// - [DataContract(Name = "QueueList_allOf")] - public partial class QueueListAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// queues. - public QueueListAllOf(List queues = default(List)) - { - this.Queues = queues; - } - - /// - /// Gets or Sets Queues - /// - [DataMember(Name = "queues", EmitDefaultValue = true)] - public List Queues { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class QueueListAllOf {\n"); - sb.Append(" Queues: ").Append(Queues).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the QueueListAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in Queues) - { - nested.Add(item); - } - props.Add("queues", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as QueueListAllOf); - } - - /// - /// Returns true if QueueListAllOf instances are equal - /// - /// Instance of QueueListAllOf to be compared - /// Boolean - public bool Equals(QueueListAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Queues == input.Queues || - this.Queues != null && - input.Queues != null && - this.Queues.SequenceEqual(input.Queues) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Queues != null) - { - hashCode = (hashCode * 59) + this.Queues.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/QueueMember.cs b/src/freeclimb/Model/QueueMember.cs index 95dfe7a7..be5b1ecb 100644 --- a/src/freeclimb/Model/QueueMember.cs +++ b/src/freeclimb/Model/QueueMember.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// QueueMember /// [DataContract(Name = "QueueMember")] - public partial class QueueMember : IEquatable, IValidatableObject + public partial class QueueMember : IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,12 +41,22 @@ public partial class QueueMember : IEquatable, IValidatableObject /// Number of seconds the Member has been in the queue.. /// Member's current position in the Queue, 1 indexed.. /// Date that the Member was enqueued (GMT), given in RFC 1123 format (e.g., Mon, 15 Jun 2009 20:45:30 GMT).. - public QueueMember(string uri = default(string), string callId = default(string), int? waitTime = default(int?), int? position = default(int?), string dateEnqueued = default(string)) + public QueueMember( + string uri = default(string), + string callId = default(string), + int? waitTime = default(int?), + int? position = default(int?), + string dateEnqueued = default(string) + ) { this.Uri = uri; + this.CallId = callId; + this.WaitTime = waitTime; + this.Position = position; + this.DateEnqueued = dateEnqueued; } @@ -108,115 +118,37 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the QueueMember instance. + /// Retrieve the KVP Dictionary for the QueueMember instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("uri", Uri); - props.Add("callId", CallId); - props.Add("waitTime", WaitTime); - props.Add("position", Position); - props.Add("dateEnqueued", DateEnqueued); + props.Add("uri", Uri); + props.Add("callId", CallId); + props.Add("waitTime", WaitTime); + props.Add("position", Position); + props.Add("dateEnqueued", DateEnqueued); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as QueueMember); - } - - /// - /// Returns true if QueueMember instances are equal - /// - /// Instance of QueueMember to be compared - /// Boolean - public bool Equals(QueueMember input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.CallId == input.CallId || - (this.CallId != null && - this.CallId.Equals(input.CallId)) - ) && - ( - this.WaitTime == input.WaitTime || - (this.WaitTime != null && - this.WaitTime.Equals(input.WaitTime)) - ) && - ( - this.Position == input.Position || - (this.Position != null && - this.Position.Equals(input.Position)) - ) && - ( - this.DateEnqueued == input.DateEnqueued || - (this.DateEnqueued != null && - this.DateEnqueued.Equals(input.DateEnqueued)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.CallId != null) - { - hashCode = (hashCode * 59) + this.CallId.GetHashCode(); - } - if (this.WaitTime != null) - { - hashCode = (hashCode * 59) + this.WaitTime.GetHashCode(); - } - if (this.Position != null) - { - hashCode = (hashCode * 59) + this.Position.GetHashCode(); - } - if (this.DateEnqueued != null) - { - hashCode = (hashCode * 59) + this.DateEnqueued.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/QueueMemberList.cs b/src/freeclimb/Model/QueueMemberList.cs index f4b50c98..eaae313b 100644 --- a/src/freeclimb/Model/QueueMemberList.cs +++ b/src/freeclimb/Model/QueueMemberList.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// QueueMemberList /// [DataContract(Name = "QueueMemberList")] - public partial class QueueMemberList : IPagination, IEquatable, IValidatableObject + public partial class QueueMemberList : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,31 @@ public partial class QueueMemberList : IPagination, IEquatable, /// Number of items per page. /// Uri to retrieve the next page of items. /// queueMembers. - public QueueMemberList(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List queueMembers = default(List)) + public QueueMemberList( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List queueMembers = default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.QueueMembers = queueMembers; } @@ -138,151 +154,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the QueueMemberList instance. + /// Retrieve the KVP Dictionary for the QueueMemberList instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in QueueMembers) { nested.Add(item); } - props.Add("queueMembers", nested); + props.Add("queueMembers", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as QueueMemberList); - } - - /// - /// Returns true if QueueMemberList instances are equal - /// - /// Instance of QueueMemberList to be compared - /// Boolean - public bool Equals(QueueMemberList input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.QueueMembers == input.QueueMembers || - this.QueueMembers != null && - input.QueueMembers != null && - this.QueueMembers.SequenceEqual(input.QueueMembers) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.QueueMembers != null) - { - hashCode = (hashCode * 59) + this.QueueMembers.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/QueueMemberListAllOf.cs b/src/freeclimb/Model/QueueMemberListAllOf.cs deleted file mode 100644 index d67f9ff8..00000000 --- a/src/freeclimb/Model/QueueMemberListAllOf.cs +++ /dev/null @@ -1,147 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// QueueMemberListAllOf - /// - [DataContract(Name = "QueueMemberList_allOf")] - public partial class QueueMemberListAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// queueMembers. - public QueueMemberListAllOf(List queueMembers = default(List)) - { - this.QueueMembers = queueMembers; - } - - /// - /// Gets or Sets QueueMembers - /// - [DataMember(Name = "queueMembers", EmitDefaultValue = true)] - public List QueueMembers { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class QueueMemberListAllOf {\n"); - sb.Append(" QueueMembers: ").Append(QueueMembers).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the QueueMemberListAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in QueueMembers) - { - nested.Add(item); - } - props.Add("queueMembers", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as QueueMemberListAllOf); - } - - /// - /// Returns true if QueueMemberListAllOf instances are equal - /// - /// Instance of QueueMemberListAllOf to be compared - /// Boolean - public bool Equals(QueueMemberListAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.QueueMembers == input.QueueMembers || - this.QueueMembers != null && - input.QueueMembers != null && - this.QueueMembers.SequenceEqual(input.QueueMembers) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.QueueMembers != null) - { - hashCode = (hashCode * 59) + this.QueueMembers.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/QueueRequest.cs b/src/freeclimb/Model/QueueRequest.cs index f2f78bda..1bf4d935 100644 --- a/src/freeclimb/Model/QueueRequest.cs +++ b/src/freeclimb/Model/QueueRequest.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// QueueRequest /// [DataContract(Name = "QueueRequest")] - public partial class QueueRequest : IEquatable, IValidatableObject + public partial class QueueRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,6 +41,7 @@ public partial class QueueRequest : IEquatable, IValidatableObject public QueueRequest(string alias = default(string), int maxSize = 100) { this.Alias = alias; + this.MaxSize = maxSize; } @@ -78,81 +79,34 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the QueueRequest instance. + /// Retrieve the KVP Dictionary for the QueueRequest instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("alias", Alias); - props.Add("maxSize", MaxSize); + props.Add("alias", Alias); + props.Add("maxSize", MaxSize); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as QueueRequest); - } - - /// - /// Returns true if QueueRequest instances are equal - /// - /// Instance of QueueRequest to be compared - /// Boolean - public bool Equals(QueueRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.MaxSize == input.MaxSize || - this.MaxSize.Equals(input.MaxSize) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MaxSize.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/QueueResult.cs b/src/freeclimb/Model/QueueResult.cs index 6fcc2954..d4c24e43 100644 --- a/src/freeclimb/Model/QueueResult.cs +++ b/src/freeclimb/Model/QueueResult.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// QueueResult /// [DataContract(Name = "QueueResult")] - public partial class QueueResult : IEquatable, IValidatableObject + public partial class QueueResult : IValidatableObject { /// /// Initializes a new instance of the class. @@ -47,18 +47,40 @@ public partial class QueueResult : IEquatable, IValidatableObject /// Count of Calls currently in the Queue.. /// The average amount of time (in seconds) for a call to be removed from the queue.. /// List of subresources for this Queue (which includes Queue members).. - public QueueResult(string uri = default(string), string dateCreated = default(string), string dateUpdated = default(string), int revision = default(int), string accountId = default(string), string queueId = default(string), string alias = default(string), int? maxSize = default(int?), int? currentSize = default(int?), int? averageQueueRemovalTime = default(int?), Object subresourceUris = default(Object)) + public QueueResult( + string uri = default(string), + string dateCreated = default(string), + string dateUpdated = default(string), + int revision = default(int), + string accountId = default(string), + string queueId = default(string), + string alias = default(string), + int? maxSize = default(int?), + int? currentSize = default(int?), + int? averageQueueRemovalTime = default(int?), + Object subresourceUris = default(Object) + ) { this.Uri = uri; + this.DateCreated = dateCreated; + this.DateUpdated = dateUpdated; + this.Revision = revision; + this.AccountId = accountId; + this.QueueId = queueId; + this.Alias = alias; + this.MaxSize = maxSize; + this.CurrentSize = currentSize; + this.AverageQueueRemovalTime = averageQueueRemovalTime; + this.SubresourceUris = subresourceUris; } @@ -168,171 +190,43 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the QueueResult instance. + /// Retrieve the KVP Dictionary for the QueueResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("uri", Uri); - props.Add("dateCreated", DateCreated); - props.Add("dateUpdated", DateUpdated); - props.Add("revision", Revision); - props.Add("accountId", AccountId); - props.Add("queueId", QueueId); - props.Add("alias", Alias); - props.Add("maxSize", MaxSize); - props.Add("currentSize", CurrentSize); - props.Add("averageQueueRemovalTime", AverageQueueRemovalTime); - props.Add("subresourceUris", SubresourceUris); + props.Add("uri", Uri); + props.Add("dateCreated", DateCreated); + props.Add("dateUpdated", DateUpdated); + props.Add("revision", Revision); + props.Add("accountId", AccountId); + props.Add("queueId", QueueId); + props.Add("alias", Alias); + props.Add("maxSize", MaxSize); + props.Add("currentSize", CurrentSize); + props.Add("averageQueueRemovalTime", AverageQueueRemovalTime); + props.Add("subresourceUris", SubresourceUris); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as QueueResult); - } - - /// - /// Returns true if QueueResult instances are equal - /// - /// Instance of QueueResult to be compared - /// Boolean - public bool Equals(QueueResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DateCreated == input.DateCreated || - (this.DateCreated != null && - this.DateCreated.Equals(input.DateCreated)) - ) && - ( - this.DateUpdated == input.DateUpdated || - (this.DateUpdated != null && - this.DateUpdated.Equals(input.DateUpdated)) - ) && - ( - this.Revision == input.Revision || - this.Revision.Equals(input.Revision) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.QueueId == input.QueueId || - (this.QueueId != null && - this.QueueId.Equals(input.QueueId)) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.MaxSize == input.MaxSize || - (this.MaxSize != null && - this.MaxSize.Equals(input.MaxSize)) - ) && - ( - this.CurrentSize == input.CurrentSize || - (this.CurrentSize != null && - this.CurrentSize.Equals(input.CurrentSize)) - ) && - ( - this.AverageQueueRemovalTime == input.AverageQueueRemovalTime || - (this.AverageQueueRemovalTime != null && - this.AverageQueueRemovalTime.Equals(input.AverageQueueRemovalTime)) - ) && - ( - this.SubresourceUris == input.SubresourceUris || - (this.SubresourceUris != null && - this.SubresourceUris.Equals(input.SubresourceUris)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DateCreated != null) - { - hashCode = (hashCode * 59) + this.DateCreated.GetHashCode(); - } - if (this.DateUpdated != null) - { - hashCode = (hashCode * 59) + this.DateUpdated.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Revision.GetHashCode(); - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.QueueId != null) - { - hashCode = (hashCode * 59) + this.QueueId.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.MaxSize != null) - { - hashCode = (hashCode * 59) + this.MaxSize.GetHashCode(); - } - if (this.CurrentSize != null) - { - hashCode = (hashCode * 59) + this.CurrentSize.GetHashCode(); - } - if (this.AverageQueueRemovalTime != null) - { - hashCode = (hashCode * 59) + this.AverageQueueRemovalTime.GetHashCode(); - } - if (this.SubresourceUris != null) - { - hashCode = (hashCode * 59) + this.SubresourceUris.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/QueueResultAllOf.cs b/src/freeclimb/Model/QueueResultAllOf.cs deleted file mode 100644 index e6cf3fc5..00000000 --- a/src/freeclimb/Model/QueueResultAllOf.cs +++ /dev/null @@ -1,262 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// QueueResultAllOf - /// - [DataContract(Name = "QueueResult_allOf")] - public partial class QueueResultAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// ID of the account that created this Queue.. - /// A string that uniquely identifies this Queue resource.. - /// A description for this Queue.. - /// The maximum number of Calls permitted in the Queue. Default is 100. Maximum is 1000.. - /// Count of Calls currently in the Queue.. - /// The average amount of time (in seconds) for a call to be removed from the queue.. - /// List of subresources for this Queue (which includes Queue members).. - public QueueResultAllOf(string accountId = default(string), string queueId = default(string), string alias = default(string), int? maxSize = default(int?), int? currentSize = default(int?), int? averageQueueRemovalTime = default(int?), Object subresourceUris = default(Object)) - { - this.AccountId = accountId; - this.QueueId = queueId; - this.Alias = alias; - this.MaxSize = maxSize; - this.CurrentSize = currentSize; - this.AverageQueueRemovalTime = averageQueueRemovalTime; - this.SubresourceUris = subresourceUris; - } - - /// - /// ID of the account that created this Queue. - /// - /// ID of the account that created this Queue. - [DataMember(Name = "accountId", EmitDefaultValue = true)] - public string AccountId { get; set; } - - /// - /// A string that uniquely identifies this Queue resource. - /// - /// A string that uniquely identifies this Queue resource. - [DataMember(Name = "queueId", EmitDefaultValue = true)] - public string QueueId { get; set; } - - /// - /// A description for this Queue. - /// - /// A description for this Queue. - [DataMember(Name = "alias", EmitDefaultValue = true)] - public string Alias { get; set; } - - /// - /// The maximum number of Calls permitted in the Queue. Default is 100. Maximum is 1000. - /// - /// The maximum number of Calls permitted in the Queue. Default is 100. Maximum is 1000. - [DataMember(Name = "maxSize", EmitDefaultValue = true)] - public int? MaxSize { get; set; } - - /// - /// Count of Calls currently in the Queue. - /// - /// Count of Calls currently in the Queue. - [DataMember(Name = "currentSize", EmitDefaultValue = true)] - public int? CurrentSize { get; set; } - - /// - /// The average amount of time (in seconds) for a call to be removed from the queue. - /// - /// The average amount of time (in seconds) for a call to be removed from the queue. - [DataMember(Name = "averageQueueRemovalTime", EmitDefaultValue = true)] - public int? AverageQueueRemovalTime { get; set; } - - /// - /// List of subresources for this Queue (which includes Queue members). - /// - /// List of subresources for this Queue (which includes Queue members). - [DataMember(Name = "subresourceUris", EmitDefaultValue = true)] - public Object SubresourceUris { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class QueueResultAllOf {\n"); - sb.Append(" AccountId: ").Append(AccountId).Append("\n"); - sb.Append(" QueueId: ").Append(QueueId).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" MaxSize: ").Append(MaxSize).Append("\n"); - sb.Append(" CurrentSize: ").Append(CurrentSize).Append("\n"); - sb.Append(" AverageQueueRemovalTime: ").Append(AverageQueueRemovalTime).Append("\n"); - sb.Append(" SubresourceUris: ").Append(SubresourceUris).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the QueueResultAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("accountId", AccountId); - props.Add("queueId", QueueId); - props.Add("alias", Alias); - props.Add("maxSize", MaxSize); - props.Add("currentSize", CurrentSize); - props.Add("averageQueueRemovalTime", AverageQueueRemovalTime); - props.Add("subresourceUris", SubresourceUris); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as QueueResultAllOf); - } - - /// - /// Returns true if QueueResultAllOf instances are equal - /// - /// Instance of QueueResultAllOf to be compared - /// Boolean - public bool Equals(QueueResultAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.QueueId == input.QueueId || - (this.QueueId != null && - this.QueueId.Equals(input.QueueId)) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.MaxSize == input.MaxSize || - (this.MaxSize != null && - this.MaxSize.Equals(input.MaxSize)) - ) && - ( - this.CurrentSize == input.CurrentSize || - (this.CurrentSize != null && - this.CurrentSize.Equals(input.CurrentSize)) - ) && - ( - this.AverageQueueRemovalTime == input.AverageQueueRemovalTime || - (this.AverageQueueRemovalTime != null && - this.AverageQueueRemovalTime.Equals(input.AverageQueueRemovalTime)) - ) && - ( - this.SubresourceUris == input.SubresourceUris || - (this.SubresourceUris != null && - this.SubresourceUris.Equals(input.SubresourceUris)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.QueueId != null) - { - hashCode = (hashCode * 59) + this.QueueId.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.MaxSize != null) - { - hashCode = (hashCode * 59) + this.MaxSize.GetHashCode(); - } - if (this.CurrentSize != null) - { - hashCode = (hashCode * 59) + this.CurrentSize.GetHashCode(); - } - if (this.AverageQueueRemovalTime != null) - { - hashCode = (hashCode * 59) + this.AverageQueueRemovalTime.GetHashCode(); - } - if (this.SubresourceUris != null) - { - hashCode = (hashCode * 59) + this.SubresourceUris.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/QueueWaitWebhook.cs b/src/freeclimb/Model/QueueWaitWebhook.cs new file mode 100644 index 00000000..3434cbcd --- /dev/null +++ b/src/freeclimb/Model/QueueWaitWebhook.cs @@ -0,0 +1,281 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// 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 + /// + [DataContract(Name = "QueueWaitWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class QueueWaitWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (default to "QueueWaitWebhook"). + /// Account ID associated with your account.. + /// Unique identifier for this Call, generated by FreeClimb. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// This is only populated if request pertains to a conference. Otherwise, it is set to null.. + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null.. + /// Current queue position of the enqueued Call.. + /// Time (in seconds) the Call spent in the Queue. This is only available if the Call was actually enqueued.. + /// Current number of enqueued Calls in this Queue.. + public QueueWaitWebhook( + string requestType = @"QueueWaitWebhook", + string accountId = default(string), + string callId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + string queuePosition = default(string), + int queueTime = default(int), + int currentQueueSize = default(int) + ) + : base() + { + base.RequestType = requestType; + + this.AccountId = accountId; + + this.CallId = callId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.QueuePosition = queuePosition; + + this.QueueTime = queueTime; + + this.CurrentQueueSize = currentQueueSize; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance QueueWaitWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static QueueWaitWebhook Deserialize(string jsonPayload) + { + return (QueueWaitWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(QueueWaitWebhook), + _serializerSettings + ); + } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Unique identifier for this Call, generated by FreeClimb + /// + /// Unique identifier for this Call, generated by FreeClimb + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// This is only populated if request pertains to a conference. Otherwise, it is set to null. + /// + /// This is only populated if request pertains to a conference. Otherwise, it is set to null. + [DataMember(Name = "conferenceId", EmitDefaultValue = true)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// Current queue position of the enqueued Call. + /// + /// Current queue position of the enqueued Call. + [DataMember(Name = "queuePosition", EmitDefaultValue = false)] + public string QueuePosition { get; set; } + + /// + /// Time (in seconds) the Call spent in the Queue. This is only available if the Call was actually enqueued. + /// + /// Time (in seconds) the Call spent in the Queue. This is only available if the Call was actually enqueued. + [DataMember(Name = "queueTime", EmitDefaultValue = false)] + public int QueueTime { get; set; } + + /// + /// Current number of enqueued Calls in this Queue. + /// + /// Current number of enqueued Calls in this Queue. + [DataMember(Name = "currentQueueSize", EmitDefaultValue = false)] + public int CurrentQueueSize { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class QueueWaitWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" QueuePosition: ").Append(QueuePosition).Append("\n"); + sb.Append(" QueueTime: ").Append(QueueTime).Append("\n"); + sb.Append(" CurrentQueueSize: ").Append(CurrentQueueSize).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the QueueWaitWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("accountId", AccountId); + props.Add("callId", CallId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("queuePosition", QueuePosition); + props.Add("queueTime", QueueTime); + props.Add("currentQueueSize", CurrentQueueSize); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/RecordUtterance.cs b/src/freeclimb/Model/RecordUtterance.cs index 48dcf2d1..194e2b1e 100644 --- a/src/freeclimb/Model/RecordUtterance.cs +++ b/src/freeclimb/Model/RecordUtterance.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,39 +33,14 @@ namespace freeclimb.Model /// [DataContract(Name = "RecordUtterance")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class RecordUtterance : PerclCommand, IEquatable, IValidatableObject + public partial class RecordUtterance : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected RecordUtterance() { } + /// /// Initializes a new instance of the class. /// @@ -77,18 +52,37 @@ protected RecordUtterance() { } /// 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.. /// Parameter `privacyMode` will not log the `text` as required by PCI compliance.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "RecordUtterance"). - public RecordUtterance(string actionUrl = default(string), int silenceTimeoutMs = default(int), string finishOnKey = default(string), int maxLengthSec = default(int), bool playBeep = default(bool), bool autoStart = default(bool), bool privacyMode = default(bool), string command = "RecordUtterance") : base(command) + public RecordUtterance( + string actionUrl = default(string), + int silenceTimeoutMs = default(int), + string finishOnKey = default(string), + int maxLengthSec = default(int), + bool playBeep = default(bool), + bool autoStart = default(bool), + bool privacyMode = default(bool), + string command = @"RecordUtterance" + ) + : base(command) { // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for RecordUtterance and cannot be null"); + if (actionUrl == null) + { + throw new ArgumentNullException( + "actionUrl is a required property for RecordUtterance and cannot be null" + ); } this.ActionUrl = actionUrl; + this.SilenceTimeoutMs = silenceTimeoutMs; + this.FinishOnKey = finishOnKey; + this.MaxLengthSec = maxLengthSec; + this.PlayBeep = playBeep; + this.AutoStart = autoStart; + this.PrivacyMode = privacyMode; } @@ -96,7 +90,7 @@ protected RecordUtterance() { } /// URL to which information on the completed recording is submitted. The PerCL received in response is then used to continue with Call processing. /// /// URL to which information on the completed recording is submitted. The PerCL received in response is then used to continue with Call processing. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = true)] public string ActionUrl { get; set; } /// @@ -177,110 +171,32 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the RecordUtterance instance. + /// Retrieve the KVP Dictionary for the RecordUtterance instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - props.Add("silenceTimeoutMs", SilenceTimeoutMs); - props.Add("finishOnKey", FinishOnKey); - props.Add("maxLengthSec", MaxLengthSec); - props.Add("playBeep", PlayBeep); - props.Add("autoStart", AutoStart); - props.Add("privacyMode", PrivacyMode); + props.Add("actionUrl", ActionUrl); + props.Add("silenceTimeoutMs", SilenceTimeoutMs); + props.Add("finishOnKey", FinishOnKey); + props.Add("maxLengthSec", MaxLengthSec); + props.Add("playBeep", PlayBeep); + props.Add("autoStart", AutoStart); + props.Add("privacyMode", PrivacyMode); IDictionary command = new Dictionary(); - command.Add("RecordUtterance",props); + command.Add("RecordUtterance", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RecordUtterance); - } - - /// - /// Returns true if RecordUtterance instances are equal - /// - /// Instance of RecordUtterance to be compared - /// Boolean - public bool Equals(RecordUtterance input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && base.Equals(input) && - ( - this.SilenceTimeoutMs == input.SilenceTimeoutMs || - this.SilenceTimeoutMs.Equals(input.SilenceTimeoutMs) - ) && base.Equals(input) && - ( - this.FinishOnKey == input.FinishOnKey || - (this.FinishOnKey != null && - this.FinishOnKey.Equals(input.FinishOnKey)) - ) && base.Equals(input) && - ( - this.MaxLengthSec == input.MaxLengthSec || - this.MaxLengthSec.Equals(input.MaxLengthSec) - ) && base.Equals(input) && - ( - this.PlayBeep == input.PlayBeep || - this.PlayBeep.Equals(input.PlayBeep) - ) && base.Equals(input) && - ( - this.AutoStart == input.AutoStart || - this.AutoStart.Equals(input.AutoStart) - ) && base.Equals(input) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SilenceTimeoutMs.GetHashCode(); - if (this.FinishOnKey != null) - { - hashCode = (hashCode * 59) + this.FinishOnKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MaxLengthSec.GetHashCode(); - hashCode = (hashCode * 59) + this.PlayBeep.GetHashCode(); - hashCode = (hashCode * 59) + this.AutoStart.GetHashCode(); - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -290,14 +206,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/RecordUtteranceAllOf.cs b/src/freeclimb/Model/RecordUtteranceAllOf.cs deleted file mode 100644 index b91ff65b..00000000 --- a/src/freeclimb/Model/RecordUtteranceAllOf.cs +++ /dev/null @@ -1,251 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// RecordUtteranceAllOf - /// - [DataContract(Name = "RecordUtterance_allOf")] - public partial class RecordUtteranceAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RecordUtteranceAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// URL to which information on the completed recording is submitted. The PerCL received in response is then used to continue with Call processing. (required). - /// Interval of silence that should elapse before ending the recording.. - /// Key that triggers the end of the recording. any digit, '#', or '*'. - /// Maximum length for the command execution in seconds.. - /// Indicates whether to play a beep sound before the start of the recording. If set to `false`, no beep is played.. - /// 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.. - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance.. - public RecordUtteranceAllOf(string actionUrl = default(string), int silenceTimeoutMs = default(int), string finishOnKey = default(string), int maxLengthSec = default(int), bool playBeep = default(bool), bool autoStart = default(bool), bool privacyMode = default(bool)) - { - // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for RecordUtteranceAllOf and cannot be null"); - } - this.ActionUrl = actionUrl; - this.SilenceTimeoutMs = silenceTimeoutMs; - this.FinishOnKey = finishOnKey; - this.MaxLengthSec = maxLengthSec; - this.PlayBeep = playBeep; - this.AutoStart = autoStart; - this.PrivacyMode = privacyMode; - } - - /// - /// URL to which information on the completed recording is submitted. The PerCL received in response is then used to continue with Call processing. - /// - /// URL to which information on the completed recording is submitted. The PerCL received in response is then used to continue with Call processing. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] - public string ActionUrl { get; set; } - - /// - /// Interval of silence that should elapse before ending the recording. - /// - /// Interval of silence that should elapse before ending the recording. - [DataMember(Name = "silenceTimeoutMs", EmitDefaultValue = false)] - public int SilenceTimeoutMs { get; set; } - - /// - /// Key that triggers the end of the recording. any digit, '#', or '*' - /// - /// Key that triggers the end of the recording. any digit, '#', or '*' - [DataMember(Name = "finishOnKey", EmitDefaultValue = false)] - public string FinishOnKey { get; set; } - - /// - /// Maximum length for the command execution in seconds. - /// - /// Maximum length for the command execution in seconds. - [DataMember(Name = "maxLengthSec", EmitDefaultValue = false)] - public int MaxLengthSec { get; set; } - - /// - /// Indicates whether to play a beep sound before the start of the recording. If set to `false`, no beep is played. - /// - /// Indicates whether to play a beep sound before the start of the recording. If set to `false`, no beep is played. - [DataMember(Name = "playBeep", EmitDefaultValue = true)] - public bool PlayBeep { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "autoStart", EmitDefaultValue = true)] - public bool AutoStart { get; set; } - - /// - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance. - /// - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance. - [DataMember(Name = "privacyMode", EmitDefaultValue = true)] - public bool PrivacyMode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RecordUtteranceAllOf {\n"); - sb.Append(" ActionUrl: ").Append(ActionUrl).Append("\n"); - sb.Append(" SilenceTimeoutMs: ").Append(SilenceTimeoutMs).Append("\n"); - sb.Append(" FinishOnKey: ").Append(FinishOnKey).Append("\n"); - sb.Append(" MaxLengthSec: ").Append(MaxLengthSec).Append("\n"); - sb.Append(" PlayBeep: ").Append(PlayBeep).Append("\n"); - sb.Append(" AutoStart: ").Append(AutoStart).Append("\n"); - sb.Append(" PrivacyMode: ").Append(PrivacyMode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the RecordUtteranceAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - props.Add("silenceTimeoutMs", SilenceTimeoutMs); - props.Add("finishOnKey", FinishOnKey); - props.Add("maxLengthSec", MaxLengthSec); - props.Add("playBeep", PlayBeep); - props.Add("autoStart", AutoStart); - props.Add("privacyMode", PrivacyMode); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RecordUtteranceAllOf); - } - - /// - /// Returns true if RecordUtteranceAllOf instances are equal - /// - /// Instance of RecordUtteranceAllOf to be compared - /// Boolean - public bool Equals(RecordUtteranceAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && - ( - this.SilenceTimeoutMs == input.SilenceTimeoutMs || - this.SilenceTimeoutMs.Equals(input.SilenceTimeoutMs) - ) && - ( - this.FinishOnKey == input.FinishOnKey || - (this.FinishOnKey != null && - this.FinishOnKey.Equals(input.FinishOnKey)) - ) && - ( - this.MaxLengthSec == input.MaxLengthSec || - this.MaxLengthSec.Equals(input.MaxLengthSec) - ) && - ( - this.PlayBeep == input.PlayBeep || - this.PlayBeep.Equals(input.PlayBeep) - ) && - ( - this.AutoStart == input.AutoStart || - this.AutoStart.Equals(input.AutoStart) - ) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SilenceTimeoutMs.GetHashCode(); - if (this.FinishOnKey != null) - { - hashCode = (hashCode * 59) + this.FinishOnKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MaxLengthSec.GetHashCode(); - hashCode = (hashCode * 59) + this.PlayBeep.GetHashCode(); - hashCode = (hashCode * 59) + this.AutoStart.GetHashCode(); - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/RecordWebhook.cs b/src/freeclimb/Model/RecordWebhook.cs new file mode 100644 index 00000000..7da85280 --- /dev/null +++ b/src/freeclimb/Model/RecordWebhook.cs @@ -0,0 +1,345 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// The RecordUtterance command has completed and its actionUrl is being invoked. + /// + [DataContract(Name = "RecordWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class RecordWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Gets or Sets TermReason + /// + [DataMember(Name = "termReason", EmitDefaultValue = false)] + public RecordUtteranceTermReason? TermReason { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// The context or reason why this request is being made. Will be record - The RecordUtterance command has completed and its actionUrl is being invoked. (default to "RecordWebhook"). + /// Account ID associated with your account.. + /// Unique identifier for this Call, generated by FreeClimb. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// This is only populated if request pertains to a conference. Otherwise, it is set to null.. + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null.. + /// ID of the recording.. + /// 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.. + /// Size of the recording in bytes. + /// File type of the recording (audio/wav). + /// Duration of the recorded audio rounded up to the nearest second (in seconds). + /// termReason. + /// ID of Call that created this leg (child call).. + /// 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.. + public RecordWebhook( + string requestType = @"RecordWebhook", + string accountId = default(string), + string callId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + string recordingId = default(string), + string recordingUrl = default(string), + string recordingSize = default(string), + string recordingFormat = default(string), + int recordingDurationSec = default(int), + RecordUtteranceTermReason? termReason = default(RecordUtteranceTermReason?), + string parentCallId = default(string), + bool privacyMode = default(bool) + ) + : base() + { + base.RequestType = requestType; + + this.AccountId = accountId; + + this.CallId = callId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.RecordingId = recordingId; + + this.RecordingUrl = recordingUrl; + + this.RecordingSize = recordingSize; + + this.RecordingFormat = recordingFormat; + + this.RecordingDurationSec = recordingDurationSec; + + this.TermReason = termReason; + + this.ParentCallId = parentCallId; + + this.PrivacyMode = privacyMode; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance RecordWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static RecordWebhook Deserialize(string jsonPayload) + { + return (RecordWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(RecordWebhook), + _serializerSettings + ); + } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Unique identifier for this Call, generated by FreeClimb + /// + /// Unique identifier for this Call, generated by FreeClimb + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// This is only populated if request pertains to a conference. Otherwise, it is set to null. + /// + /// This is only populated if request pertains to a conference. Otherwise, it is set to null. + [DataMember(Name = "conferenceId", EmitDefaultValue = true)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// ID of the recording. + /// + /// ID of the recording. + [DataMember(Name = "recordingId", EmitDefaultValue = false)] + public string RecordingId { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "recordingUrl", EmitDefaultValue = false)] + public string RecordingUrl { get; set; } + + /// + /// Size of the recording in bytes + /// + /// Size of the recording in bytes + [DataMember(Name = "recordingSize", EmitDefaultValue = false)] + public string RecordingSize { get; set; } + + /// + /// File type of the recording (audio/wav) + /// + /// File type of the recording (audio/wav) + [DataMember(Name = "recordingFormat", EmitDefaultValue = false)] + public string RecordingFormat { get; set; } + + /// + /// Duration of the recorded audio rounded up to the nearest second (in seconds) + /// + /// Duration of the recorded audio rounded up to the nearest second (in seconds) + [DataMember(Name = "recordingDurationSec", EmitDefaultValue = false)] + public int RecordingDurationSec { get; set; } + + /// + /// ID of Call that created this leg (child call). + /// + /// ID of Call that created this leg (child call). + [DataMember(Name = "parentCallId", EmitDefaultValue = false)] + public string ParentCallId { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "privacyMode", EmitDefaultValue = true)] + public bool PrivacyMode { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RecordWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" RecordingId: ").Append(RecordingId).Append("\n"); + sb.Append(" RecordingUrl: ").Append(RecordingUrl).Append("\n"); + sb.Append(" RecordingSize: ").Append(RecordingSize).Append("\n"); + sb.Append(" RecordingFormat: ").Append(RecordingFormat).Append("\n"); + sb.Append(" RecordingDurationSec: ").Append(RecordingDurationSec).Append("\n"); + sb.Append(" TermReason: ").Append(TermReason).Append("\n"); + sb.Append(" ParentCallId: ").Append(ParentCallId).Append("\n"); + sb.Append(" PrivacyMode: ").Append(PrivacyMode).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the RecordWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("accountId", AccountId); + props.Add("callId", CallId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("recordingId", RecordingId); + props.Add("recordingUrl", RecordingUrl); + props.Add("recordingSize", RecordingSize); + props.Add("recordingFormat", RecordingFormat); + props.Add("recordingDurationSec", RecordingDurationSec); + props.Add("termReason", TermReason); + props.Add("parentCallId", ParentCallId); + props.Add("privacyMode", PrivacyMode); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/RecordingList.cs b/src/freeclimb/Model/RecordingList.cs index 0e3a9f8b..ba112c8b 100644 --- a/src/freeclimb/Model/RecordingList.cs +++ b/src/freeclimb/Model/RecordingList.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// RecordingList /// [DataContract(Name = "RecordingList")] - public partial class RecordingList : IPagination, IEquatable, IValidatableObject + public partial class RecordingList : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,31 @@ public partial class RecordingList : IPagination, IEquatable, IVa /// Number of items per page. /// Uri to retrieve the next page of items. /// recordings. - public RecordingList(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List recordings = default(List)) + public RecordingList( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List recordings = default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.Recordings = recordings; } @@ -138,151 +154,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the RecordingList instance. + /// Retrieve the KVP Dictionary for the RecordingList instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in Recordings) { nested.Add(item); } - props.Add("recordings", nested); + props.Add("recordings", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RecordingList); - } - - /// - /// Returns true if RecordingList instances are equal - /// - /// Instance of RecordingList to be compared - /// Boolean - public bool Equals(RecordingList input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.Recordings == input.Recordings || - this.Recordings != null && - input.Recordings != null && - this.Recordings.SequenceEqual(input.Recordings) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.Recordings != null) - { - hashCode = (hashCode * 59) + this.Recordings.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/RecordingListAllOf.cs b/src/freeclimb/Model/RecordingListAllOf.cs deleted file mode 100644 index ae4c4937..00000000 --- a/src/freeclimb/Model/RecordingListAllOf.cs +++ /dev/null @@ -1,147 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// RecordingListAllOf - /// - [DataContract(Name = "RecordingList_allOf")] - public partial class RecordingListAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// recordings. - public RecordingListAllOf(List recordings = default(List)) - { - this.Recordings = recordings; - } - - /// - /// Gets or Sets Recordings - /// - [DataMember(Name = "recordings", EmitDefaultValue = true)] - public List Recordings { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RecordingListAllOf {\n"); - sb.Append(" Recordings: ").Append(Recordings).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the RecordingListAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in Recordings) - { - nested.Add(item); - } - props.Add("recordings", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RecordingListAllOf); - } - - /// - /// Returns true if RecordingListAllOf instances are equal - /// - /// Instance of RecordingListAllOf to be compared - /// Boolean - public bool Equals(RecordingListAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Recordings == input.Recordings || - this.Recordings != null && - input.Recordings != null && - this.Recordings.SequenceEqual(input.Recordings) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Recordings != null) - { - hashCode = (hashCode * 59) + this.Recordings.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/RecordingResult.cs b/src/freeclimb/Model/RecordingResult.cs index 2b5f79c4..2ba6e93b 100644 --- a/src/freeclimb/Model/RecordingResult.cs +++ b/src/freeclimb/Model/RecordingResult.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// RecordingResult /// [DataContract(Name = "RecordingResult")] - public partial class RecordingResult : IEquatable, IValidatableObject + public partial class RecordingResult : IValidatableObject { /// /// Initializes a new instance of the class. @@ -45,16 +45,34 @@ public partial class RecordingResult : IEquatable, IValidatable /// ID of the Call that was recorded. If a Conference was recorded, this value is empty and the conferenceId property is populated.. /// Length of the recording in seconds.. /// ID of the Conference that was recorded. If a Call was recorded, this value is empty and the callId property is populated.. - public RecordingResult(string uri = default(string), string dateCreated = default(string), string dateUpdated = default(string), int revision = default(int), string recordingId = default(string), string accountId = default(string), string callId = default(string), int? durationSec = default(int?), string conferenceId = default(string)) + public RecordingResult( + string uri = default(string), + string dateCreated = default(string), + string dateUpdated = default(string), + int revision = default(int), + string recordingId = default(string), + string accountId = default(string), + string callId = default(string), + int? durationSec = default(int?), + string conferenceId = default(string) + ) { this.Uri = uri; + this.DateCreated = dateCreated; + this.DateUpdated = dateUpdated; + this.Revision = revision; + this.RecordingId = recordingId; + this.AccountId = accountId; + this.CallId = callId; + this.DurationSec = durationSec; + this.ConferenceId = conferenceId; } @@ -148,151 +166,41 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the RecordingResult instance. + /// Retrieve the KVP Dictionary for the RecordingResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("uri", Uri); - props.Add("dateCreated", DateCreated); - props.Add("dateUpdated", DateUpdated); - props.Add("revision", Revision); - props.Add("recordingId", RecordingId); - props.Add("accountId", AccountId); - props.Add("callId", CallId); - props.Add("durationSec", DurationSec); - props.Add("conferenceId", ConferenceId); + props.Add("uri", Uri); + props.Add("dateCreated", DateCreated); + props.Add("dateUpdated", DateUpdated); + props.Add("revision", Revision); + props.Add("recordingId", RecordingId); + props.Add("accountId", AccountId); + props.Add("callId", CallId); + props.Add("durationSec", DurationSec); + props.Add("conferenceId", ConferenceId); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RecordingResult); - } - - /// - /// Returns true if RecordingResult instances are equal - /// - /// Instance of RecordingResult to be compared - /// Boolean - public bool Equals(RecordingResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Uri == input.Uri || - (this.Uri != null && - this.Uri.Equals(input.Uri)) - ) && - ( - this.DateCreated == input.DateCreated || - (this.DateCreated != null && - this.DateCreated.Equals(input.DateCreated)) - ) && - ( - this.DateUpdated == input.DateUpdated || - (this.DateUpdated != null && - this.DateUpdated.Equals(input.DateUpdated)) - ) && - ( - this.Revision == input.Revision || - this.Revision.Equals(input.Revision) - ) && - ( - this.RecordingId == input.RecordingId || - (this.RecordingId != null && - this.RecordingId.Equals(input.RecordingId)) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.CallId == input.CallId || - (this.CallId != null && - this.CallId.Equals(input.CallId)) - ) && - ( - this.DurationSec == input.DurationSec || - (this.DurationSec != null && - this.DurationSec.Equals(input.DurationSec)) - ) && - ( - this.ConferenceId == input.ConferenceId || - (this.ConferenceId != null && - this.ConferenceId.Equals(input.ConferenceId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uri != null) - { - hashCode = (hashCode * 59) + this.Uri.GetHashCode(); - } - if (this.DateCreated != null) - { - hashCode = (hashCode * 59) + this.DateCreated.GetHashCode(); - } - if (this.DateUpdated != null) - { - hashCode = (hashCode * 59) + this.DateUpdated.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Revision.GetHashCode(); - if (this.RecordingId != null) - { - hashCode = (hashCode * 59) + this.RecordingId.GetHashCode(); - } - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.CallId != null) - { - hashCode = (hashCode * 59) + this.CallId.GetHashCode(); - } - if (this.DurationSec != null) - { - hashCode = (hashCode * 59) + this.DurationSec.GetHashCode(); - } - if (this.ConferenceId != null) - { - hashCode = (hashCode * 59) + this.ConferenceId.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/RecordingResultAllOf.cs b/src/freeclimb/Model/RecordingResultAllOf.cs deleted file mode 100644 index 376feb77..00000000 --- a/src/freeclimb/Model/RecordingResultAllOf.cs +++ /dev/null @@ -1,222 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// RecordingResultAllOf - /// - [DataContract(Name = "RecordingResult_allOf")] - public partial class RecordingResultAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// String that uniquely identifies this recording resource.. - /// ID of the account that created this recording.. - /// ID of the Call that was recorded. If a Conference was recorded, this value is empty and the conferenceId property is populated.. - /// Length of the recording in seconds.. - /// ID of the Conference that was recorded. If a Call was recorded, this value is empty and the callId property is populated.. - public RecordingResultAllOf(string recordingId = default(string), string accountId = default(string), string callId = default(string), int? durationSec = default(int?), string conferenceId = default(string)) - { - this.RecordingId = recordingId; - this.AccountId = accountId; - this.CallId = callId; - this.DurationSec = durationSec; - this.ConferenceId = conferenceId; - } - - /// - /// String that uniquely identifies this recording resource. - /// - /// String that uniquely identifies this recording resource. - [DataMember(Name = "recordingId", EmitDefaultValue = true)] - public string RecordingId { get; set; } - - /// - /// ID of the account that created this recording. - /// - /// ID of the account that created this recording. - [DataMember(Name = "accountId", EmitDefaultValue = true)] - public string AccountId { get; set; } - - /// - /// ID of the Call that was recorded. If a Conference was recorded, this value is empty and the conferenceId property is populated. - /// - /// ID of the Call that was recorded. If a Conference was recorded, this value is empty and the conferenceId property is populated. - [DataMember(Name = "callId", EmitDefaultValue = true)] - public string CallId { get; set; } - - /// - /// Length of the recording in seconds. - /// - /// Length of the recording in seconds. - [DataMember(Name = "durationSec", EmitDefaultValue = true)] - public int? DurationSec { get; set; } - - /// - /// ID of the Conference that was recorded. If a Call was recorded, this value is empty and the callId property is populated. - /// - /// ID of the Conference that was recorded. If a Call was recorded, this value is empty and the callId property is populated. - [DataMember(Name = "conferenceId", EmitDefaultValue = true)] - public string ConferenceId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RecordingResultAllOf {\n"); - sb.Append(" RecordingId: ").Append(RecordingId).Append("\n"); - sb.Append(" AccountId: ").Append(AccountId).Append("\n"); - sb.Append(" CallId: ").Append(CallId).Append("\n"); - sb.Append(" DurationSec: ").Append(DurationSec).Append("\n"); - sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the RecordingResultAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("recordingId", RecordingId); - props.Add("accountId", AccountId); - props.Add("callId", CallId); - props.Add("durationSec", DurationSec); - props.Add("conferenceId", ConferenceId); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RecordingResultAllOf); - } - - /// - /// Returns true if RecordingResultAllOf instances are equal - /// - /// Instance of RecordingResultAllOf to be compared - /// Boolean - public bool Equals(RecordingResultAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.RecordingId == input.RecordingId || - (this.RecordingId != null && - this.RecordingId.Equals(input.RecordingId)) - ) && - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.CallId == input.CallId || - (this.CallId != null && - this.CallId.Equals(input.CallId)) - ) && - ( - this.DurationSec == input.DurationSec || - (this.DurationSec != null && - this.DurationSec.Equals(input.DurationSec)) - ) && - ( - this.ConferenceId == input.ConferenceId || - (this.ConferenceId != null && - this.ConferenceId.Equals(input.ConferenceId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RecordingId != null) - { - hashCode = (hashCode * 59) + this.RecordingId.GetHashCode(); - } - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.CallId != null) - { - hashCode = (hashCode * 59) + this.CallId.GetHashCode(); - } - if (this.DurationSec != null) - { - hashCode = (hashCode * 59) + this.DurationSec.GetHashCode(); - } - if (this.ConferenceId != null) - { - hashCode = (hashCode * 59) + this.ConferenceId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/Redirect.cs b/src/freeclimb/Model/Redirect.cs index 1ed4e4f0..661f3628 100644 --- a/src/freeclimb/Model/Redirect.cs +++ b/src/freeclimb/Model/Redirect.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,49 +33,28 @@ namespace freeclimb.Model /// [DataContract(Name = "Redirect")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class Redirect : PerclCommand, IEquatable, IValidatableObject + public partial class Redirect : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected Redirect() { } + /// /// Initializes a new instance of the class. /// /// 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. (required). /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "Redirect"). - public Redirect(string actionUrl = default(string), string command = "Redirect") : base(command) + public Redirect(string actionUrl = default(string), string command = @"Redirect") + : base(command) { // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for Redirect and cannot be null"); + if (actionUrl == null) + { + throw new ArgumentNullException( + "actionUrl is a required property for Redirect and cannot be null" + ); } this.ActionUrl = actionUrl; } @@ -84,7 +63,7 @@ protected Redirect() { } /// 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. /// /// 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. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = true)] public string ActionUrl { get; set; } /// @@ -117,70 +96,26 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the Redirect instance. + /// Retrieve the KVP Dictionary for the Redirect instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); + props.Add("actionUrl", ActionUrl); IDictionary command = new Dictionary(); - command.Add("Redirect",props); + command.Add("Redirect", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Redirect); - } - - /// - /// Returns true if Redirect instances are equal - /// - /// Instance of Redirect to be compared - /// Boolean - public bool Equals(Redirect input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -190,14 +125,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/RedirectAllOf.cs b/src/freeclimb/Model/RedirectAllOf.cs deleted file mode 100644 index aeb6d148..00000000 --- a/src/freeclimb/Model/RedirectAllOf.cs +++ /dev/null @@ -1,151 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// RedirectAllOf - /// - [DataContract(Name = "Redirect_allOf")] - public partial class RedirectAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RedirectAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - public RedirectAllOf(string actionUrl = default(string)) - { - // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for RedirectAllOf and cannot be null"); - } - this.ActionUrl = actionUrl; - } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] - public string ActionUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RedirectAllOf {\n"); - sb.Append(" ActionUrl: ").Append(ActionUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the RedirectAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RedirectAllOf); - } - - /// - /// Returns true if RedirectAllOf instances are equal - /// - /// Instance of RedirectAllOf to be compared - /// Boolean - public bool Equals(RedirectAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/RedirectWebhook.cs b/src/freeclimb/Model/RedirectWebhook.cs new file mode 100644 index 00000000..586fb18e --- /dev/null +++ b/src/freeclimb/Model/RedirectWebhook.cs @@ -0,0 +1,255 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// The Redirect command is executing and its actionUrl is being invoked. A PerCL response is expected. + /// + [DataContract(Name = "RedirectWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class RedirectWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// Context or reason why this request is being made. Will be redirect - The Redirect command is executing and its actionUrl is being invoked. (default to "RedirectWebhook"). + /// Account ID associated with your account.. + /// Unique identifier for this Call, generated by FreeClimb. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// This is only populated if request pertains to a conference. Otherwise, it is set to null.. + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null.. + /// ID of Call that created this leg (child call).. + public RedirectWebhook( + string requestType = @"RedirectWebhook", + string accountId = default(string), + string callId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + string parentCallId = default(string) + ) + : base() + { + base.RequestType = requestType; + + this.AccountId = accountId; + + this.CallId = callId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.ParentCallId = parentCallId; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance RedirectWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static RedirectWebhook Deserialize(string jsonPayload) + { + return (RedirectWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(RedirectWebhook), + _serializerSettings + ); + } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Unique identifier for this Call, generated by FreeClimb + /// + /// Unique identifier for this Call, generated by FreeClimb + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// This is only populated if request pertains to a conference. Otherwise, it is set to null. + /// + /// This is only populated if request pertains to a conference. Otherwise, it is set to null. + [DataMember(Name = "conferenceId", EmitDefaultValue = true)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// ID of Call that created this leg (child call). + /// + /// ID of Call that created this leg (child call). + [DataMember(Name = "parentCallId", EmitDefaultValue = false)] + public string ParentCallId { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RedirectWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" ParentCallId: ").Append(ParentCallId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the RedirectWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("accountId", AccountId); + props.Add("callId", CallId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("parentCallId", ParentCallId); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/Reject.cs b/src/freeclimb/Model/Reject.cs index 716336cb..f1c1d450 100644 --- a/src/freeclimb/Model/Reject.cs +++ b/src/freeclimb/Model/Reject.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,40 +33,15 @@ namespace freeclimb.Model /// [DataContract(Name = "Reject")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class Reject : PerclCommand, IEquatable, IValidatableObject + public partial class Reject : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// /// 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.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "Reject"). - public Reject(string reason = default(string), string command = "Reject") : base(command) + public Reject(string reason = default(string), string command = @"Reject") + : base(command) { this.Reason = reason; } @@ -108,70 +83,26 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the Reject instance. + /// Retrieve the KVP Dictionary for the Reject instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("reason", Reason); + props.Add("reason", Reason); IDictionary command = new Dictionary(); - command.Add("Reject",props); + command.Add("Reject", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Reject); - } - - /// - /// Returns true if Reject instances are equal - /// - /// Instance of Reject to be compared - /// Boolean - public bool Equals(Reject input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -181,14 +112,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/RejectAllOf.cs b/src/freeclimb/Model/RejectAllOf.cs deleted file mode 100644 index 9c048c98..00000000 --- a/src/freeclimb/Model/RejectAllOf.cs +++ /dev/null @@ -1,142 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// RejectAllOf - /// - [DataContract(Name = "Reject_allOf")] - public partial class RejectAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// 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.. - public RejectAllOf(string reason = default(string)) - { - this.Reason = reason; - } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public string Reason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RejectAllOf {\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the RejectAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("reason", Reason); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RejectAllOf); - } - - /// - /// Returns true if RejectAllOf instances are equal - /// - /// Instance of RejectAllOf to be compared - /// Boolean - public bool Equals(RejectAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/RemoveFromConference.cs b/src/freeclimb/Model/RemoveFromConference.cs index 0a242733..f4ee3347 100644 --- a/src/freeclimb/Model/RemoveFromConference.cs +++ b/src/freeclimb/Model/RemoveFromConference.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,41 +33,14 @@ namespace freeclimb.Model /// [DataContract(Name = "RemoveFromConference")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class RemoveFromConference : PerclCommand, IEquatable, IValidatableObject + public partial class RemoveFromConference : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "RemoveFromConference"). - public RemoveFromConference(string command = "RemoveFromConference") : base(command) - { - } + public RemoveFromConference(string command = @"RemoveFromConference") + : base(command) { } /// /// Returns the string presentation of the object @@ -98,60 +71,25 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the RemoveFromConference instance. + /// Retrieve the KVP Dictionary for the RemoveFromConference instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); IDictionary command = new Dictionary(); - command.Add("RemoveFromConference",props); + command.Add("RemoveFromConference", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RemoveFromConference); - } - - /// - /// Returns true if RemoveFromConference instances are equal - /// - /// Instance of RemoveFromConference to be compared - /// Boolean - public bool Equals(RemoveFromConference input) - { - if (input == null) - { - return false; - } - return base.Equals(input); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -161,14 +99,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/RemoveFromQueueNotificationWebhook.cs b/src/freeclimb/Model/RemoveFromQueueNotificationWebhook.cs new file mode 100644 index 00000000..1956cffd --- /dev/null +++ b/src/freeclimb/Model/RemoveFromQueueNotificationWebhook.cs @@ -0,0 +1,267 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// 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. + /// + [DataContract(Name = "RemoveFromQueueNotificationWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class RemoveFromQueueNotificationWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets CallStatus + /// + [DataMember(Name = "callStatus", EmitDefaultValue = true)] + public CallStatus? CallStatus { get; set; } + + /// + /// Gets or Sets Direction + /// + [DataMember(Name = "direction", EmitDefaultValue = true)] + public CallDirection? Direction { get; set; } + + /// + /// Gets or Sets QueueResult + /// + [DataMember(Name = "queueResult", EmitDefaultValue = false)] + public QueueResultStatus? QueueResult { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// 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. (default to "RemoveFromQueueNotificationWebhook"). + /// Account ID associated with your account.. + /// Unique identifier for this Call, generated by FreeClimb. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format).. + /// callStatus. + /// direction. + /// This is only populated if request pertains to a conference. Otherwise, it is set to null.. + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null.. + /// queueResult. + /// Time (in seconds) the Call spent in the Queue. This is only available if the Call was actually enqueued.. + public RemoveFromQueueNotificationWebhook( + string requestType = @"RemoveFromQueueNotificationWebhook", + string accountId = default(string), + string callId = default(string), + string from = default(string), + string to = default(string), + CallStatus? callStatus = default(CallStatus?), + CallDirection? direction = default(CallDirection?), + string conferenceId = default(string), + string queueId = default(string), + QueueResultStatus? queueResult = default(QueueResultStatus?), + int queueTime = default(int) + ) + : base() + { + base.RequestType = requestType; + + this.AccountId = accountId; + + this.CallId = callId; + + this.From = from; + + this.To = to; + + this.CallStatus = callStatus; + + this.Direction = direction; + + this.ConferenceId = conferenceId; + + this.QueueId = queueId; + + this.QueueResult = queueResult; + + this.QueueTime = queueTime; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance RemoveFromQueueNotificationWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static RemoveFromQueueNotificationWebhook Deserialize(string jsonPayload) + { + return (RemoveFromQueueNotificationWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(RemoveFromQueueNotificationWebhook), + _serializerSettings + ); + } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Unique identifier for this Call, generated by FreeClimb + /// + /// Unique identifier for this Call, generated by FreeClimb + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// This is only populated if request pertains to a conference. Otherwise, it is set to null. + /// + /// This is only populated if request pertains to a conference. Otherwise, it is set to null. + [DataMember(Name = "conferenceId", EmitDefaultValue = true)] + public string ConferenceId { get; set; } + + /// + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null. + /// + /// This is only populated if the request pertains to a queue. Otherwise, it is set to null. + [DataMember(Name = "queueId", EmitDefaultValue = true)] + public string QueueId { get; set; } + + /// + /// Time (in seconds) the Call spent in the Queue. This is only available if the Call was actually enqueued. + /// + /// Time (in seconds) the Call spent in the Queue. This is only available if the Call was actually enqueued. + [DataMember(Name = "queueTime", EmitDefaultValue = false)] + public int QueueTime { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RemoveFromQueueNotificationWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" CallStatus: ").Append(CallStatus).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" ConferenceId: ").Append(ConferenceId).Append("\n"); + sb.Append(" QueueId: ").Append(QueueId).Append("\n"); + sb.Append(" QueueResult: ").Append(QueueResult).Append("\n"); + sb.Append(" QueueTime: ").Append(QueueTime).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the RemoveFromQueueNotificationWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("accountId", AccountId); + props.Add("callId", CallId); + props.Add("from", From); + props.Add("to", To); + props.Add("callStatus", CallStatus); + props.Add("direction", Direction); + props.Add("conferenceId", ConferenceId); + props.Add("queueId", QueueId); + props.Add("queueResult", QueueResult); + props.Add("queueTime", QueueTime); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/SMSTenDLCBrand.cs b/src/freeclimb/Model/SMSTenDLCBrand.cs index 1ef3a07f..6f01b338 100644 --- a/src/freeclimb/Model/SMSTenDLCBrand.cs +++ b/src/freeclimb/Model/SMSTenDLCBrand.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,368 +31,49 @@ namespace freeclimb.Model /// A brand is a business identity behind the campaign. /// [DataContract(Name = "SMSTenDLCBrand")] - public partial class SMSTenDLCBrand : IEquatable, IValidatableObject + public partial class SMSTenDLCBrand : IValidatableObject { /// - /// Entity type behind the brand. This is the form of business establishment. - /// - /// Entity type behind the brand. This is the form of business establishment. - [JsonConverter(typeof(StringEnumConverter))] - public enum EntityTypeEnum - { - /// - /// Enum PRIVATE_PROFIT for value: PRIVATE_PROFIT - /// - [EnumMember(Value = "PRIVATE_PROFIT")] - PRIVATE_PROFIT = 1, - - /// - /// Enum PUBLIC_PROFIT for value: PUBLIC_PROFIT - /// - [EnumMember(Value = "PUBLIC_PROFIT")] - PUBLIC_PROFIT = 2, - - /// - /// Enum NON_PROFIT for value: NON_PROFIT - /// - [EnumMember(Value = "NON_PROFIT")] - NON_PROFIT = 3, - - /// - /// Enum GOVERNMENT for value: GOVERNMENT - /// - [EnumMember(Value = "GOVERNMENT")] - GOVERNMENT = 4, - - /// - /// Enum SOLE_PROPRIETOR for value: SOLE_PROPRIETOR - /// - [EnumMember(Value = "SOLE_PROPRIETOR")] - SOLE_PROPRIETOR = 5 - - } - - - /// - /// Entity type behind the brand. This is the form of business establishment. - /// - /// Entity type behind the brand. This is the form of business establishment. - [DataMember(Name = "entityType", IsRequired = true, EmitDefaultValue = false)] - public EntityTypeEnum EntityType { get; set; } - /// - /// (Required for public company) stock exchange. + /// Gets or Sets EntityType /// - /// (Required for public company) stock exchange. - [JsonConverter(typeof(StringEnumConverter))] - public enum StockExchangeEnum - { - /// - /// Enum NONE for value: NONE - /// - [EnumMember(Value = "NONE")] - NONE = 1, - - /// - /// Enum NASDAQ for value: NASDAQ - /// - [EnumMember(Value = "NASDAQ")] - NASDAQ = 2, - - /// - /// Enum NYSE for value: NYSE - /// - [EnumMember(Value = "NYSE")] - NYSE = 3, - - /// - /// Enum AMEX for value: AMEX - /// - [EnumMember(Value = "AMEX")] - AMEX = 4, - - /// - /// Enum AMX for value: AMX - /// - [EnumMember(Value = "AMX")] - AMX = 5, - - /// - /// Enum ASX for value: ASX - /// - [EnumMember(Value = "ASX")] - ASX = 6, - - /// - /// Enum B3 for value: B3 - /// - [EnumMember(Value = "B3")] - B3 = 7, - - /// - /// Enum BME for value: BME - /// - [EnumMember(Value = "BME")] - BME = 8, - - /// - /// Enum BSE for value: BSE - /// - [EnumMember(Value = "BSE")] - BSE = 9, - - /// - /// Enum FRA for value: FRA - /// - [EnumMember(Value = "FRA")] - FRA = 10, - - /// - /// Enum ICEX for value: ICEX - /// - [EnumMember(Value = "ICEX")] - ICEX = 11, - - /// - /// Enum JPX for value: JPX - /// - [EnumMember(Value = "JPX")] - JPX = 12, - - /// - /// Enum JSE for value: JSE - /// - [EnumMember(Value = "JSE")] - JSE = 13, - - /// - /// Enum KRX for value: KRX - /// - [EnumMember(Value = "KRX")] - KRX = 14, - - /// - /// Enum LON for value: LON - /// - [EnumMember(Value = "LON")] - LON = 15, - - /// - /// Enum NSE for value: NSE - /// - [EnumMember(Value = "NSE")] - NSE = 16, - - /// - /// Enum OMX for value: OMX - /// - [EnumMember(Value = "OMX")] - OMX = 17, - - /// - /// Enum SEHK for value: SEHK - /// - [EnumMember(Value = "SEHK")] - SEHK = 18, - - /// - /// Enum SGX for value: SGX - /// - [EnumMember(Value = "SGX")] - SGX = 19, - - /// - /// Enum SSE for value: SSE - /// - [EnumMember(Value = "SSE")] - SSE = 20, - - /// - /// Enum STO for value: STO - /// - [EnumMember(Value = "STO")] - STO = 21, - - /// - /// Enum SWX for value: SWX - /// - [EnumMember(Value = "SWX")] - SWX = 22, - - /// - /// Enum SZSE for value: SZSE - /// - [EnumMember(Value = "SZSE")] - SZSE = 23, - - /// - /// Enum TSX for value: TSX - /// - [EnumMember(Value = "TSX")] - TSX = 24, - - /// - /// Enum TWSE for value: TWSE - /// - [EnumMember(Value = "TWSE")] - TWSE = 25, - - /// - /// Enum VSE for value: VSE - /// - [EnumMember(Value = "VSE")] - VSE = 26, - - /// - /// Enum OTHER for value: OTHER - /// - [EnumMember(Value = "OTHER")] - OTHER = 27 - - } - + [DataMember(Name = "entityType", IsRequired = true, EmitDefaultValue = true)] + public SMSTenDLCBrandEntityType EntityType { get; set; } /// - /// (Required for public company) stock exchange. + /// Gets or Sets StockExchange /// - /// (Required for public company) stock exchange. [DataMember(Name = "stockExchange", EmitDefaultValue = false)] - public StockExchangeEnum? StockExchange { get; set; } - /// - /// Brand relationship to the CSP - /// - /// Brand relationship to the CSP - [JsonConverter(typeof(StringEnumConverter))] - public enum BrandRelationshipEnum - { - /// - /// Enum BASIC_ACCOUNT for value: BASIC_ACCOUNT - /// - [EnumMember(Value = "BASIC_ACCOUNT")] - BASIC_ACCOUNT = 1, - - /// - /// Enum SMALL_ACCOUNT for value: SMALL_ACCOUNT - /// - [EnumMember(Value = "SMALL_ACCOUNT")] - SMALL_ACCOUNT = 2, - - /// - /// Enum MEDIUM_ACCOUNT for value: MEDIUM_ACCOUNT - /// - [EnumMember(Value = "MEDIUM_ACCOUNT")] - MEDIUM_ACCOUNT = 3, - - /// - /// Enum LARGE_ACCOUNT for value: LARGE_ACCOUNT - /// - [EnumMember(Value = "LARGE_ACCOUNT")] - LARGE_ACCOUNT = 4, - - /// - /// Enum KEY_ACCOUNT for value: KEY_ACCOUNT - /// - [EnumMember(Value = "KEY_ACCOUNT")] - KEY_ACCOUNT = 5 + public SMSTenDLCBrandStockExchange? StockExchange { get; set; } - } - - - /// - /// Brand relationship to the CSP - /// - /// Brand relationship to the CSP - [DataMember(Name = "brandRelationship", IsRequired = true, EmitDefaultValue = false)] - public BrandRelationshipEnum BrandRelationship { get; set; } /// - /// The type of the Alternative business identifier + /// Gets or Sets BrandRelationship /// - /// The type of the Alternative business identifier - [JsonConverter(typeof(StringEnumConverter))] - public enum AltBusinessIdTypeEnum - { - /// - /// Enum NONE for value: NONE - /// - [EnumMember(Value = "NONE")] - NONE = 1, - - /// - /// Enum DUNS for value: DUNS - /// - [EnumMember(Value = "DUNS")] - DUNS = 2, - - /// - /// Enum GIIN for value: GIIN - /// - [EnumMember(Value = "GIIN")] - GIIN = 3, - - /// - /// Enum LEI for value: LEI - /// - [EnumMember(Value = "LEI")] - LEI = 4 - - } - + [DataMember(Name = "brandRelationship", IsRequired = true, EmitDefaultValue = true)] + public SMSTenDLCBrandRelationship BrandRelationship { get; set; } /// - /// The type of the Alternative business identifier + /// Gets or Sets AltBusinessIdType /// - /// The type of the Alternative business identifier [DataMember(Name = "altBusinessIdType", EmitDefaultValue = false)] - public AltBusinessIdTypeEnum? AltBusinessIdType { get; set; } - /// - /// TCR assessment of the brand identification status. - /// - /// TCR assessment of the brand identification status. - [JsonConverter(typeof(StringEnumConverter))] - public enum IdentityStatusEnum - { - /// - /// Enum SELF_DECLARED for value: SELF_DECLARED - /// - [EnumMember(Value = "SELF_DECLARED")] - SELF_DECLARED = 1, - - /// - /// Enum UNVERIFIED for value: UNVERIFIED - /// - [EnumMember(Value = "UNVERIFIED")] - UNVERIFIED = 2, - - /// - /// Enum VERIFIED for value: VERIFIED - /// - [EnumMember(Value = "VERIFIED")] - VERIFIED = 3, - - /// - /// Enum VETTED_VERIFIED for value: VETTED_VERIFIED - /// - [EnumMember(Value = "VETTED_VERIFIED")] - VETTED_VERIFIED = 4 - - } - + public SMSTenDLCBrandAltBusinessIdType? AltBusinessIdType { get; set; } /// - /// TCR assessment of the brand identification status. + /// Gets or Sets IdentityStatus /// - /// TCR assessment of the brand identification status. - [DataMember(Name = "identityStatus", IsRequired = true, EmitDefaultValue = false)] - public IdentityStatusEnum IdentityStatus { get; set; } + [DataMember(Name = "identityStatus", IsRequired = true, EmitDefaultValue = true)] + public SMSTenDLCBrandIdentityStatus IdentityStatus { get; set; } + /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected SMSTenDLCBrand() { } + /// /// Initializes a new instance of the class. /// /// ID of the account that created this Queue.. - /// Entity type behind the brand. This is the form of business establishment. (required). + /// entityType (required). /// First or given name. . /// Last or Surname.. /// Display or marketing name of the brand. (required). @@ -407,67 +88,139 @@ protected SMSTenDLCBrand() { } /// ISO2 2 characters country code. Example: US - United States (required). /// Valid email address of brand support contact. (required). /// (Required for public company) stock symbol.. - /// (Required for public company) stock exchange.. + /// stockExchange. /// IP address of the browser requesting to create brand identity.. /// Brand website URL.. - /// Brand relationship to the CSP (required). + /// brandRelationship (required). /// Vertical or industry segment of the brand. (required). /// Alternate business identifier such as DUNS, LEI, or GIIN. - /// The type of the Alternative business identifier. + /// altBusinessIdType. /// 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 brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names.. /// Test brand. (required). - /// TCR assessment of the brand identification status. (required). + /// identityStatus (required). /// Unix timestamp when brand was created.. - public SMSTenDLCBrand(string accountId = default(string), EntityTypeEnum entityType = default(EntityTypeEnum), string firstName = default(string), string lastName = default(string), string displayName = default(string), string companyName = default(string), string ein = default(string), string einIssuingCountry = default(string), string phone = default(string), string street = default(string), string city = default(string), string state = default(string), string postalCode = default(string), string country = default(string), string email = default(string), string stockSymbol = default(string), StockExchangeEnum? stockExchange = default(StockExchangeEnum?), string ipAddress = default(string), string website = default(string), BrandRelationshipEnum brandRelationship = default(BrandRelationshipEnum), string vertical = default(string), string altBusinessId = default(string), AltBusinessIdTypeEnum? altBusinessIdType = default(AltBusinessIdTypeEnum?), string referenceId = default(string), Dictionary optionalAttributes = default(Dictionary), bool mock = default(bool), IdentityStatusEnum identityStatus = default(IdentityStatusEnum), DateTime createDate = default(DateTime)) + public SMSTenDLCBrand( + string accountId = default(string), + SMSTenDLCBrandEntityType entityType = default(SMSTenDLCBrandEntityType), + string firstName = default(string), + string lastName = default(string), + string displayName = default(string), + string companyName = default(string), + string ein = default(string), + string einIssuingCountry = default(string), + string phone = default(string), + string street = default(string), + string city = default(string), + string state = default(string), + string postalCode = default(string), + string country = default(string), + string email = default(string), + string stockSymbol = default(string), + SMSTenDLCBrandStockExchange? stockExchange = default(SMSTenDLCBrandStockExchange?), + string ipAddress = default(string), + string website = default(string), + SMSTenDLCBrandRelationship brandRelationship = default(SMSTenDLCBrandRelationship), + string vertical = default(string), + string altBusinessId = default(string), + SMSTenDLCBrandAltBusinessIdType? altBusinessIdType = + default(SMSTenDLCBrandAltBusinessIdType?), + string referenceId = default(string), + Dictionary optionalAttributes = default(Dictionary), + bool mock = default(bool), + SMSTenDLCBrandIdentityStatus identityStatus = default(SMSTenDLCBrandIdentityStatus), + DateTime createDate = default(DateTime) + ) { this.EntityType = entityType; + // to ensure "displayName" is required (not null) - if (displayName == null) { - throw new ArgumentNullException("displayName is a required property for SMSTenDLCBrand and cannot be null"); + if (displayName == null) + { + throw new ArgumentNullException( + "displayName is a required property for SMSTenDLCBrand and cannot be null" + ); } this.DisplayName = displayName; + // to ensure "phone" is required (not null) - if (phone == null) { - throw new ArgumentNullException("phone is a required property for SMSTenDLCBrand and cannot be null"); + if (phone == null) + { + throw new ArgumentNullException( + "phone is a required property for SMSTenDLCBrand and cannot be null" + ); } this.Phone = phone; + // to ensure "country" is required (not null) - if (country == null) { - throw new ArgumentNullException("country is a required property for SMSTenDLCBrand and cannot be null"); + if (country == null) + { + throw new ArgumentNullException( + "country is a required property for SMSTenDLCBrand and cannot be null" + ); } this.Country = country; + // to ensure "email" is required (not null) - if (email == null) { - throw new ArgumentNullException("email is a required property for SMSTenDLCBrand and cannot be null"); + if (email == null) + { + throw new ArgumentNullException( + "email is a required property for SMSTenDLCBrand and cannot be null" + ); } this.Email = email; + this.BrandRelationship = brandRelationship; + // to ensure "vertical" is required (not null) - if (vertical == null) { - throw new ArgumentNullException("vertical is a required property for SMSTenDLCBrand and cannot be null"); + if (vertical == null) + { + throw new ArgumentNullException( + "vertical is a required property for SMSTenDLCBrand and cannot be null" + ); } this.Vertical = vertical; + this.Mock = mock; + this.IdentityStatus = identityStatus; + this.AccountId = accountId; + this.FirstName = firstName; + this.LastName = lastName; + this.CompanyName = companyName; + this.Ein = ein; + this.EinIssuingCountry = einIssuingCountry; + this.Street = street; + this.City = city; + this.State = state; + this.PostalCode = postalCode; + this.StockSymbol = stockSymbol; + this.StockExchange = stockExchange; + this.IpAddress = ipAddress; + this.Website = website; + this.AltBusinessId = altBusinessId; + this.AltBusinessIdType = altBusinessIdType; + this.ReferenceId = referenceId; + this.OptionalAttributes = optionalAttributes; + this.CreateDate = createDate; } @@ -493,6 +246,7 @@ public bool ShouldSerializeCspId() { return false; } + /// /// Unique identifier assigned to the brand by the registry. /// @@ -508,10 +262,14 @@ public bool ShouldSerializeBrandId() { return false; } + /// - /// First or given name. + /// First or given name. /// /// First or given name. + /* + John + */ [DataMember(Name = "firstName", EmitDefaultValue = false)] public string FirstName { get; set; } @@ -519,6 +277,9 @@ public bool ShouldSerializeBrandId() /// Last or Surname. /// /// Last or Surname. + /* + Doe + */ [DataMember(Name = "lastName", EmitDefaultValue = false)] public string LastName { get; set; } @@ -526,13 +287,19 @@ public bool ShouldSerializeBrandId() /// Display or marketing name of the brand. /// /// Display or marketing name of the brand. - [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = false)] + /* + ABC Mobile + */ + [DataMember(Name = "displayName", IsRequired = true, EmitDefaultValue = true)] public string DisplayName { get; set; } /// /// (Required for Non-profit/private/public) Legal company name. /// /// (Required for Non-profit/private/public) Legal company name. + /* + ABC Inc. + */ [DataMember(Name = "companyName", EmitDefaultValue = false)] public string CompanyName { get; set; } @@ -540,6 +307,9 @@ public bool ShouldSerializeBrandId() /// (Required for Non-profit) Government assigned corporate tax ID. EIN is 9-digits in U.S. /// /// (Required for Non-profit) Government assigned corporate tax ID. EIN is 9-digits in U.S. + /* + 111111111 + */ [DataMember(Name = "ein", EmitDefaultValue = false)] public string Ein { get; set; } @@ -547,6 +317,9 @@ public bool ShouldSerializeBrandId() /// ISO2 2 characters country code. Example: US - United States /// /// ISO2 2 characters country code. Example: US - United States + /* + US + */ [DataMember(Name = "einIssuingCountry", EmitDefaultValue = false)] public string EinIssuingCountry { get; set; } @@ -554,13 +327,19 @@ public bool ShouldSerializeBrandId() /// Valid phone number in e.164 international format. /// /// Valid phone number in e.164 international format. - [DataMember(Name = "phone", IsRequired = true, EmitDefaultValue = false)] + /* + +12024567890 + */ + [DataMember(Name = "phone", IsRequired = true, EmitDefaultValue = true)] public string Phone { get; set; } /// /// Street number and name. /// /// Street number and name. + /* + 123 6th Ave + */ [DataMember(Name = "street", EmitDefaultValue = false)] public string Street { get; set; } @@ -568,6 +347,9 @@ public bool ShouldSerializeBrandId() /// City name /// /// City name + /* + New York + */ [DataMember(Name = "city", EmitDefaultValue = false)] public string City { get; set; } @@ -575,6 +357,9 @@ public bool ShouldSerializeBrandId() /// State. Must be 2 letters code for United States. /// /// State. Must be 2 letters code for United States. + /* + NY + */ [DataMember(Name = "state", EmitDefaultValue = false)] public string State { get; set; } @@ -582,6 +367,9 @@ public bool ShouldSerializeBrandId() /// Postal codes. Use 5 digit zipcode for United States /// /// Postal codes. Use 5 digit zipcode for United States + /* + 10001 + */ [DataMember(Name = "postalCode", EmitDefaultValue = false)] public string PostalCode { get; set; } @@ -589,20 +377,26 @@ public bool ShouldSerializeBrandId() /// ISO2 2 characters country code. Example: US - United States /// /// ISO2 2 characters country code. Example: US - United States - [DataMember(Name = "country", IsRequired = true, EmitDefaultValue = false)] + /* + US + */ + [DataMember(Name = "country", IsRequired = true, EmitDefaultValue = true)] public string Country { get; set; } /// /// Valid email address of brand support contact. /// /// Valid email address of brand support contact. - [DataMember(Name = "email", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "email", IsRequired = true, EmitDefaultValue = true)] public string Email { get; set; } /// /// (Required for public company) stock symbol. /// /// (Required for public company) stock symbol. + /* + ABC + */ [DataMember(Name = "stockSymbol", EmitDefaultValue = false)] public string StockSymbol { get; set; } @@ -617,6 +411,9 @@ public bool ShouldSerializeBrandId() /// Brand website URL. /// /// Brand website URL. + /* + http://www.abcmobile.com + */ [DataMember(Name = "website", EmitDefaultValue = false)] public string Website { get; set; } @@ -624,7 +421,7 @@ public bool ShouldSerializeBrandId() /// Vertical or industry segment of the brand. /// /// Vertical or industry segment of the brand. - [DataMember(Name = "vertical", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "vertical", IsRequired = true, EmitDefaultValue = true)] public string Vertical { get; set; } /// @@ -649,6 +446,7 @@ public bool ShouldSerializeUniversalEin() { return false; } + /// /// Caller supplied brand reference ID. If supplied, the value must be unique across all submitted brands. Can be used to prevent duplicate brand registrations. /// @@ -726,466 +524,234 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the SMSTenDLCBrand instance. + /// Retrieve the KVP Dictionary for the SMSTenDLCBrand instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("accountId", AccountId); - props.Add("entityType", EntityType); - props.Add("cspId", CspId); - props.Add("brandId", BrandId); - props.Add("firstName", FirstName); - props.Add("lastName", LastName); - props.Add("displayName", DisplayName); - props.Add("companyName", CompanyName); - props.Add("ein", Ein); - props.Add("einIssuingCountry", EinIssuingCountry); - props.Add("phone", Phone); - props.Add("street", Street); - props.Add("city", City); - props.Add("state", State); - props.Add("postalCode", PostalCode); - props.Add("country", Country); - props.Add("email", Email); - props.Add("stockSymbol", StockSymbol); - props.Add("stockExchange", StockExchange); - props.Add("ipAddress", IpAddress); - props.Add("website", Website); - props.Add("brandRelationship", BrandRelationship); - props.Add("vertical", Vertical); - props.Add("altBusinessId", AltBusinessId); - props.Add("altBusinessIdType", AltBusinessIdType); - props.Add("universalEin", UniversalEin); - props.Add("referenceId", ReferenceId); - props.Add("optionalAttributes", OptionalAttributes); - props.Add("mock", Mock); - props.Add("identityStatus", IdentityStatus); - props.Add("createDate", CreateDate); + props.Add("accountId", AccountId); + props.Add("entityType", EntityType); + props.Add("cspId", CspId); + props.Add("brandId", BrandId); + props.Add("firstName", FirstName); + props.Add("lastName", LastName); + props.Add("displayName", DisplayName); + props.Add("companyName", CompanyName); + props.Add("ein", Ein); + props.Add("einIssuingCountry", EinIssuingCountry); + props.Add("phone", Phone); + props.Add("street", Street); + props.Add("city", City); + props.Add("state", State); + props.Add("postalCode", PostalCode); + props.Add("country", Country); + props.Add("email", Email); + props.Add("stockSymbol", StockSymbol); + props.Add("stockExchange", StockExchange); + props.Add("ipAddress", IpAddress); + props.Add("website", Website); + props.Add("brandRelationship", BrandRelationship); + props.Add("vertical", Vertical); + props.Add("altBusinessId", AltBusinessId); + props.Add("altBusinessIdType", AltBusinessIdType); + props.Add("universalEin", UniversalEin); + props.Add("referenceId", ReferenceId); + props.Add("optionalAttributes", OptionalAttributes); + props.Add("mock", Mock); + props.Add("identityStatus", IdentityStatus); + props.Add("createDate", CreateDate); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SMSTenDLCBrand); - } - - /// - /// Returns true if SMSTenDLCBrand instances are equal - /// - /// Instance of SMSTenDLCBrand to be compared - /// Boolean - public bool Equals(SMSTenDLCBrand input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.EntityType == input.EntityType || - this.EntityType.Equals(input.EntityType) - ) && - ( - this.CspId == input.CspId || - (this.CspId != null && - this.CspId.Equals(input.CspId)) - ) && - ( - this.BrandId == input.BrandId || - (this.BrandId != null && - this.BrandId.Equals(input.BrandId)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.CompanyName == input.CompanyName || - (this.CompanyName != null && - this.CompanyName.Equals(input.CompanyName)) - ) && - ( - this.Ein == input.Ein || - (this.Ein != null && - this.Ein.Equals(input.Ein)) - ) && - ( - this.EinIssuingCountry == input.EinIssuingCountry || - (this.EinIssuingCountry != null && - this.EinIssuingCountry.Equals(input.EinIssuingCountry)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Street == input.Street || - (this.Street != null && - this.Street.Equals(input.Street)) - ) && - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.StockSymbol == input.StockSymbol || - (this.StockSymbol != null && - this.StockSymbol.Equals(input.StockSymbol)) - ) && - ( - this.StockExchange == input.StockExchange || - this.StockExchange.Equals(input.StockExchange) - ) && - ( - this.IpAddress == input.IpAddress || - (this.IpAddress != null && - this.IpAddress.Equals(input.IpAddress)) - ) && - ( - this.Website == input.Website || - (this.Website != null && - this.Website.Equals(input.Website)) - ) && - ( - this.BrandRelationship == input.BrandRelationship || - this.BrandRelationship.Equals(input.BrandRelationship) - ) && - ( - this.Vertical == input.Vertical || - (this.Vertical != null && - this.Vertical.Equals(input.Vertical)) - ) && - ( - this.AltBusinessId == input.AltBusinessId || - (this.AltBusinessId != null && - this.AltBusinessId.Equals(input.AltBusinessId)) - ) && - ( - this.AltBusinessIdType == input.AltBusinessIdType || - this.AltBusinessIdType.Equals(input.AltBusinessIdType) - ) && - ( - this.UniversalEin == input.UniversalEin || - (this.UniversalEin != null && - this.UniversalEin.Equals(input.UniversalEin)) - ) && - ( - this.ReferenceId == input.ReferenceId || - (this.ReferenceId != null && - this.ReferenceId.Equals(input.ReferenceId)) - ) && - ( - this.OptionalAttributes == input.OptionalAttributes || - this.OptionalAttributes != null && - input.OptionalAttributes != null && - this.OptionalAttributes.SequenceEqual(input.OptionalAttributes) - ) && - ( - this.Mock == input.Mock || - this.Mock.Equals(input.Mock) - ) && - ( - this.IdentityStatus == input.IdentityStatus || - this.IdentityStatus.Equals(input.IdentityStatus) - ) && - ( - this.CreateDate == input.CreateDate || - (this.CreateDate != null && - this.CreateDate.Equals(input.CreateDate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EntityType.GetHashCode(); - if (this.CspId != null) - { - hashCode = (hashCode * 59) + this.CspId.GetHashCode(); - } - if (this.BrandId != null) - { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); - } - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.CompanyName != null) - { - hashCode = (hashCode * 59) + this.CompanyName.GetHashCode(); - } - if (this.Ein != null) - { - hashCode = (hashCode * 59) + this.Ein.GetHashCode(); - } - if (this.EinIssuingCountry != null) - { - hashCode = (hashCode * 59) + this.EinIssuingCountry.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.Street != null) - { - hashCode = (hashCode * 59) + this.Street.GetHashCode(); - } - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.StockSymbol != null) - { - hashCode = (hashCode * 59) + this.StockSymbol.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StockExchange.GetHashCode(); - if (this.IpAddress != null) - { - hashCode = (hashCode * 59) + this.IpAddress.GetHashCode(); - } - if (this.Website != null) - { - hashCode = (hashCode * 59) + this.Website.GetHashCode(); - } - hashCode = (hashCode * 59) + this.BrandRelationship.GetHashCode(); - if (this.Vertical != null) - { - hashCode = (hashCode * 59) + this.Vertical.GetHashCode(); - } - if (this.AltBusinessId != null) - { - hashCode = (hashCode * 59) + this.AltBusinessId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AltBusinessIdType.GetHashCode(); - if (this.UniversalEin != null) - { - hashCode = (hashCode * 59) + this.UniversalEin.GetHashCode(); - } - if (this.ReferenceId != null) - { - hashCode = (hashCode * 59) + this.ReferenceId.GetHashCode(); - } - if (this.OptionalAttributes != null) - { - hashCode = (hashCode * 59) + this.OptionalAttributes.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Mock.GetHashCode(); - hashCode = (hashCode * 59) + this.IdentityStatus.GetHashCode(); - if (this.CreateDate != null) - { - hashCode = (hashCode * 59) + this.CreateDate.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { // FirstName (string) maxLength if (this.FirstName != null && this.FirstName.Length > 100) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 100.", new [] { "FirstName" }); + yield return new ValidationResult( + "Invalid value for FirstName, length must be less than 100.", + new[] { "FirstName" } + ); } // LastName (string) maxLength if (this.LastName != null && this.LastName.Length > 100) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 100.", new [] { "LastName" }); + yield return new ValidationResult( + "Invalid value for LastName, length must be less than 100.", + new[] { "LastName" } + ); } // DisplayName (string) maxLength if (this.DisplayName != null && this.DisplayName.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, length must be less than 255.", new [] { "DisplayName" }); + yield return new ValidationResult( + "Invalid value for DisplayName, length must be less than 255.", + new[] { "DisplayName" } + ); } // CompanyName (string) maxLength if (this.CompanyName != null && this.CompanyName.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CompanyName, length must be less than 255.", new [] { "CompanyName" }); + yield return new ValidationResult( + "Invalid value for CompanyName, length must be less than 255.", + new[] { "CompanyName" } + ); } // Ein (string) maxLength if (this.Ein != null && this.Ein.Length > 21) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Ein, length must be less than 21.", new [] { "Ein" }); + yield return new ValidationResult( + "Invalid value for Ein, length must be less than 21.", + new[] { "Ein" } + ); } // EinIssuingCountry (string) maxLength if (this.EinIssuingCountry != null && this.EinIssuingCountry.Length > 2) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EinIssuingCountry, length must be less than 2.", new [] { "EinIssuingCountry" }); + yield return new ValidationResult( + "Invalid value for EinIssuingCountry, length must be less than 2.", + new[] { "EinIssuingCountry" } + ); } // Phone (string) maxLength if (this.Phone != null && this.Phone.Length > 20) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Phone, length must be less than 20.", new [] { "Phone" }); + yield return new ValidationResult( + "Invalid value for Phone, length must be less than 20.", + new[] { "Phone" } + ); } // Street (string) maxLength if (this.Street != null && this.Street.Length > 100) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Street, length must be less than 100.", new [] { "Street" }); + yield return new ValidationResult( + "Invalid value for Street, length must be less than 100.", + new[] { "Street" } + ); } // City (string) maxLength if (this.City != null && this.City.Length > 100) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for City, length must be less than 100.", new [] { "City" }); + yield return new ValidationResult( + "Invalid value for City, length must be less than 100.", + new[] { "City" } + ); } // State (string) maxLength if (this.State != null && this.State.Length > 20) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for State, length must be less than 20.", new [] { "State" }); + yield return new ValidationResult( + "Invalid value for State, length must be less than 20.", + new[] { "State" } + ); } // PostalCode (string) maxLength if (this.PostalCode != null && this.PostalCode.Length > 10) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PostalCode, length must be less than 10.", new [] { "PostalCode" }); + yield return new ValidationResult( + "Invalid value for PostalCode, length must be less than 10.", + new[] { "PostalCode" } + ); } // Country (string) maxLength if (this.Country != null && this.Country.Length > 2) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Country, length must be less than 2.", new [] { "Country" }); + yield return new ValidationResult( + "Invalid value for Country, length must be less than 2.", + new[] { "Country" } + ); } // Email (string) maxLength if (this.Email != null && this.Email.Length > 100) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Email, length must be less than 100.", new [] { "Email" }); + yield return new ValidationResult( + "Invalid value for Email, length must be less than 100.", + new[] { "Email" } + ); } // StockSymbol (string) maxLength if (this.StockSymbol != null && this.StockSymbol.Length > 10) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StockSymbol, length must be less than 10.", new [] { "StockSymbol" }); + yield return new ValidationResult( + "Invalid value for StockSymbol, length must be less than 10.", + new[] { "StockSymbol" } + ); } // IpAddress (string) maxLength if (this.IpAddress != null && this.IpAddress.Length > 50) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for IpAddress, length must be less than 50.", new [] { "IpAddress" }); + yield return new ValidationResult( + "Invalid value for IpAddress, length must be less than 50.", + new[] { "IpAddress" } + ); } // Website (string) maxLength if (this.Website != null && this.Website.Length > 100) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Website, length must be less than 100.", new [] { "Website" }); + yield return new ValidationResult( + "Invalid value for Website, length must be less than 100.", + new[] { "Website" } + ); } // Vertical (string) maxLength if (this.Vertical != null && this.Vertical.Length > 50) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Vertical, length must be less than 50.", new [] { "Vertical" }); + yield return new ValidationResult( + "Invalid value for Vertical, length must be less than 50.", + new[] { "Vertical" } + ); } // AltBusinessId (string) maxLength if (this.AltBusinessId != null && this.AltBusinessId.Length > 50) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AltBusinessId, length must be less than 50.", new [] { "AltBusinessId" }); + yield return new ValidationResult( + "Invalid value for AltBusinessId, length must be less than 50.", + new[] { "AltBusinessId" } + ); } // ReferenceId (string) maxLength if (this.ReferenceId != null && this.ReferenceId.Length > 50) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReferenceId, length must be less than 50.", new [] { "ReferenceId" }); + yield return new ValidationResult( + "Invalid value for ReferenceId, length must be less than 50.", + new[] { "ReferenceId" } + ); } yield break; } } - } diff --git a/src/freeclimb/Model/SMSTenDLCBrandsListResult.cs b/src/freeclimb/Model/SMSTenDLCBrandsListResult.cs index 3a7a8f05..bd9b0fc2 100644 --- a/src/freeclimb/Model/SMSTenDLCBrandsListResult.cs +++ b/src/freeclimb/Model/SMSTenDLCBrandsListResult.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// SMSTenDLCBrandsListResult /// [DataContract(Name = "SMSTenDLCBrandsListResult")] - public partial class SMSTenDLCBrandsListResult : IPagination, IEquatable, IValidatableObject + public partial class SMSTenDLCBrandsListResult : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,31 @@ public partial class SMSTenDLCBrandsListResult : IPagination, IEquatableNumber of items per page. /// Uri to retrieve the next page of items. /// brands. - public SMSTenDLCBrandsListResult(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List brands = default(List)) + public SMSTenDLCBrandsListResult( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List brands = default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.Brands = brands; } @@ -138,151 +154,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the SMSTenDLCBrandsListResult instance. + /// Retrieve the KVP Dictionary for the SMSTenDLCBrandsListResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in Brands) { nested.Add(item); } - props.Add("brands", nested); + props.Add("brands", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SMSTenDLCBrandsListResult); - } - - /// - /// Returns true if SMSTenDLCBrandsListResult instances are equal - /// - /// Instance of SMSTenDLCBrandsListResult to be compared - /// Boolean - public bool Equals(SMSTenDLCBrandsListResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.Brands == input.Brands || - this.Brands != null && - input.Brands != null && - this.Brands.SequenceEqual(input.Brands) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.Brands != null) - { - hashCode = (hashCode * 59) + this.Brands.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/SMSTenDLCBrandsListResultAllOf.cs b/src/freeclimb/Model/SMSTenDLCBrandsListResultAllOf.cs deleted file mode 100644 index df668971..00000000 --- a/src/freeclimb/Model/SMSTenDLCBrandsListResultAllOf.cs +++ /dev/null @@ -1,147 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// SMSTenDLCBrandsListResultAllOf - /// - [DataContract(Name = "SMSTenDLCBrandsListResult_allOf")] - public partial class SMSTenDLCBrandsListResultAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// brands. - public SMSTenDLCBrandsListResultAllOf(List brands = default(List)) - { - this.Brands = brands; - } - - /// - /// Gets or Sets Brands - /// - [DataMember(Name = "brands", EmitDefaultValue = true)] - public List Brands { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SMSTenDLCBrandsListResultAllOf {\n"); - sb.Append(" Brands: ").Append(Brands).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the SMSTenDLCBrandsListResultAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in Brands) - { - nested.Add(item); - } - props.Add("brands", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SMSTenDLCBrandsListResultAllOf); - } - - /// - /// Returns true if SMSTenDLCBrandsListResultAllOf instances are equal - /// - /// Instance of SMSTenDLCBrandsListResultAllOf to be compared - /// Boolean - public bool Equals(SMSTenDLCBrandsListResultAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Brands == input.Brands || - this.Brands != null && - input.Brands != null && - this.Brands.SequenceEqual(input.Brands) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Brands != null) - { - hashCode = (hashCode * 59) + this.Brands.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/SMSTenDLCCampaign.cs b/src/freeclimb/Model/SMSTenDLCCampaign.cs index fed05391..266d61c2 100644 --- a/src/freeclimb/Model/SMSTenDLCCampaign.cs +++ b/src/freeclimb/Model/SMSTenDLCCampaign.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,41 +31,20 @@ namespace freeclimb.Model /// SMSTenDLCCampaign /// [DataContract(Name = "SMSTenDLCCampaign")] - public partial class SMSTenDLCCampaign : IEquatable, IValidatableObject + public partial class SMSTenDLCCampaign : IValidatableObject { /// - /// Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. - /// - /// Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum ACTIVE for value: ACTIVE - /// - [EnumMember(Value = "ACTIVE")] - ACTIVE = 1, - - /// - /// Enum EXPIRED for value: EXPIRED - /// - [EnumMember(Value = "EXPIRED")] - EXPIRED = 2 - - } - - - /// - /// Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. + /// Gets or Sets Status /// - /// Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public SMSTenDLCCampaignStatus? Status { get; set; } + /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected SMSTenDLCCampaign() { } + /// /// Initializes a new instance of the class. /// @@ -73,7 +52,7 @@ protected SMSTenDLCCampaign() { } /// Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. (required). /// Alphanumeric identifier of the CSP associated with this campaign. (required). /// Alphanumeric identifier of the reseller that you want to associate with this campaign.. - /// Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. . + /// status. /// Unix timestamp when campaign was created.. /// Campaign subscription auto-renewal status.. /// Campaign recent billed date.. @@ -105,67 +84,157 @@ protected SMSTenDLCCampaign() { } /// Caller supplied campaign reference ID. If supplied, the value must be unique across all submitted campaigns. Can be used to prevent duplicate campaign registrations.. /// Campaign created from mock brand. Mocked campaign cannot be shared with an upstream CNP. (required). /// When the campaign would be due for its next renew/bill date.. - public SMSTenDLCCampaign(string accountId = default(string), string campaignId = default(string), string cspId = default(string), string resellerId = default(string), StatusEnum? status = default(StatusEnum?), DateTime createDate = default(DateTime), bool autoRenewal = default(bool), DateTime? billedDate = default(DateTime?), string brandId = default(string), string usecase = default(string), List subUsecases = default(List), string description = default(string), bool embeddedLink = false, bool embeddedPhone = false, bool affiliateMarketing = default(bool), bool numberPool = false, bool ageGated = default(bool), bool directLending = default(bool), bool subscriberOptin = false, bool subscriberOptout = false, bool subscriberHelp = false, string sample1 = default(string), string sample2 = default(string), string sample3 = default(string), string sample4 = default(string), string sample5 = default(string), string messageFlow = default(string), string helpMessage = default(string), string optinKeywords = default(string), string optoutKeywords = default(string), string helpKeywords = default(string), string optinMessage = default(string), string optoutMessage = default(string), string referenceId = default(string), bool mock = default(bool), DateTime? nextRenewalOrExpirationDate = default(DateTime?)) + public SMSTenDLCCampaign( + string accountId = default(string), + string campaignId = default(string), + string cspId = default(string), + string resellerId = default(string), + SMSTenDLCCampaignStatus? status = default(SMSTenDLCCampaignStatus?), + DateTime createDate = default(DateTime), + bool autoRenewal = default(bool), + DateTime? billedDate = default(DateTime?), + string brandId = default(string), + string usecase = default(string), + List subUsecases = default(List), + string description = default(string), + bool embeddedLink = false, + bool embeddedPhone = false, + bool affiliateMarketing = default(bool), + bool numberPool = false, + bool ageGated = default(bool), + bool directLending = default(bool), + bool subscriberOptin = false, + bool subscriberOptout = false, + bool subscriberHelp = false, + string sample1 = default(string), + string sample2 = default(string), + string sample3 = default(string), + string sample4 = default(string), + string sample5 = default(string), + string messageFlow = default(string), + string helpMessage = default(string), + string optinKeywords = default(string), + string optoutKeywords = default(string), + string helpKeywords = default(string), + string optinMessage = default(string), + string optoutMessage = default(string), + string referenceId = default(string), + bool mock = default(bool), + DateOnly? nextRenewalOrExpirationDate = default(DateOnly?) + ) { // to ensure "campaignId" is required (not null) - if (campaignId == null) { - throw new ArgumentNullException("campaignId is a required property for SMSTenDLCCampaign and cannot be null"); + if (campaignId == null) + { + throw new ArgumentNullException( + "campaignId is a required property for SMSTenDLCCampaign and cannot be null" + ); } this.CampaignId = campaignId; + // to ensure "cspId" is required (not null) - if (cspId == null) { - throw new ArgumentNullException("cspId is a required property for SMSTenDLCCampaign and cannot be null"); + if (cspId == null) + { + throw new ArgumentNullException( + "cspId is a required property for SMSTenDLCCampaign and cannot be null" + ); } this.CspId = cspId; + // to ensure "brandId" is required (not null) - if (brandId == null) { - throw new ArgumentNullException("brandId is a required property for SMSTenDLCCampaign and cannot be null"); + if (brandId == null) + { + throw new ArgumentNullException( + "brandId is a required property for SMSTenDLCCampaign and cannot be null" + ); } this.BrandId = brandId; + // to ensure "usecase" is required (not null) - if (usecase == null) { - throw new ArgumentNullException("usecase is a required property for SMSTenDLCCampaign and cannot be null"); + if (usecase == null) + { + throw new ArgumentNullException( + "usecase is a required property for SMSTenDLCCampaign and cannot be null" + ); } this.Usecase = usecase; + // to ensure "subUsecases" is required (not null) - if (subUsecases == null) { - throw new ArgumentNullException("subUsecases is a required property for SMSTenDLCCampaign and cannot be null"); + if (subUsecases == null) + { + throw new ArgumentNullException( + "subUsecases is a required property for SMSTenDLCCampaign and cannot be null" + ); } this.SubUsecases = subUsecases; + // to ensure "description" is required (not null) - if (description == null) { - throw new ArgumentNullException("description is a required property for SMSTenDLCCampaign and cannot be null"); + if (description == null) + { + throw new ArgumentNullException( + "description is a required property for SMSTenDLCCampaign and cannot be null" + ); } this.Description = description; + this.Mock = mock; + this.AccountId = accountId; + this.ResellerId = resellerId; + this.Status = status; + this.CreateDate = createDate; + this.AutoRenewal = autoRenewal; + this.BilledDate = billedDate; + this.EmbeddedLink = embeddedLink; + this.EmbeddedPhone = embeddedPhone; + this.AffiliateMarketing = affiliateMarketing; + this.NumberPool = numberPool; + this.AgeGated = ageGated; + this.DirectLending = directLending; + this.SubscriberOptin = subscriberOptin; + this.SubscriberOptout = subscriberOptout; + this.SubscriberHelp = subscriberHelp; + this.Sample1 = sample1; + this.Sample2 = sample2; + this.Sample3 = sample3; + this.Sample4 = sample4; + this.Sample5 = sample5; + this.MessageFlow = messageFlow; + this.HelpMessage = helpMessage; + this.OptinKeywords = optinKeywords; + this.OptoutKeywords = optoutKeywords; + this.HelpKeywords = helpKeywords; + this.OptinMessage = optinMessage; + this.OptoutMessage = optoutMessage; + this.ReferenceId = referenceId; + this.NextRenewalOrExpirationDate = nextRenewalOrExpirationDate; } @@ -180,14 +249,14 @@ protected SMSTenDLCCampaign() { } /// Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. /// /// Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. - [DataMember(Name = "campaignId", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "campaignId", IsRequired = true, EmitDefaultValue = true)] public string CampaignId { get; set; } /// /// Alphanumeric identifier of the CSP associated with this campaign. /// /// Alphanumeric identifier of the CSP associated with this campaign. - [DataMember(Name = "cspId", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "cspId", IsRequired = true, EmitDefaultValue = true)] public string CspId { get; set; } /// @@ -222,28 +291,28 @@ protected SMSTenDLCCampaign() { } /// Alphanumeric identifier of the brand associated with this campaign. /// /// Alphanumeric identifier of the brand associated with this campaign. - [DataMember(Name = "brandId", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "brandId", IsRequired = true, EmitDefaultValue = true)] public string BrandId { get; set; } /// /// Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. /// /// Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. - [DataMember(Name = "usecase", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "usecase", IsRequired = true, EmitDefaultValue = true)] public string Usecase { get; set; } /// /// Campaign sub-usecases. Must be of defined valid sub-usecase types. Use `/registry/enum/usecase` operation to retrieve list of valid sub-usecases /// /// Campaign sub-usecases. Must be of defined valid sub-usecase types. Use `/registry/enum/usecase` operation to retrieve list of valid sub-usecases - [DataMember(Name = "subUsecases", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "subUsecases", IsRequired = true, EmitDefaultValue = true)] public List SubUsecases { get; set; } /// /// Summary description of this campaign. /// /// Summary description of this campaign. - [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] public string Description { get; set; } /// @@ -410,9 +479,11 @@ protected SMSTenDLCCampaign() { } /// When the campaign would be due for its next renew/bill date. /// /// When the campaign would be due for its next renew/bill date. + /* + Fri Dec 31 19:00:00 EST 1999 + */ [DataMember(Name = "nextRenewalOrExpirationDate", EmitDefaultValue = true)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? NextRenewalOrExpirationDate { get; set; } + public DateOnly? NextRenewalOrExpirationDate { get; set; } /// /// Returns the string presentation of the object @@ -457,7 +528,9 @@ public override string ToString() sb.Append(" OptoutMessage: ").Append(OptoutMessage).Append("\n"); sb.Append(" ReferenceId: ").Append(ReferenceId).Append("\n"); sb.Append(" Mock: ").Append(Mock).Append("\n"); - sb.Append(" NextRenewalOrExpirationDate: ").Append(NextRenewalOrExpirationDate).Append("\n"); + sb.Append(" NextRenewalOrExpirationDate: ") + .Append(NextRenewalOrExpirationDate) + .Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -468,485 +541,226 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the SMSTenDLCCampaign instance. + /// Retrieve the KVP Dictionary for the SMSTenDLCCampaign instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("accountId", AccountId); - props.Add("campaignId", CampaignId); - props.Add("cspId", CspId); - props.Add("resellerId", ResellerId); - props.Add("status", Status); - props.Add("createDate", CreateDate); - props.Add("autoRenewal", AutoRenewal); - props.Add("billedDate", BilledDate); - props.Add("brandId", BrandId); - props.Add("usecase", Usecase); + props.Add("accountId", AccountId); + props.Add("campaignId", CampaignId); + props.Add("cspId", CspId); + props.Add("resellerId", ResellerId); + props.Add("status", Status); + props.Add("createDate", CreateDate); + props.Add("autoRenewal", AutoRenewal); + props.Add("billedDate", BilledDate); + props.Add("brandId", BrandId); + props.Add("usecase", Usecase); List nested = new List(); foreach (var item in SubUsecases) { nested.Add(item); } - props.Add("subUsecases", nested); - props.Add("description", Description); - props.Add("embeddedLink", EmbeddedLink); - props.Add("embeddedPhone", EmbeddedPhone); - props.Add("affiliateMarketing", AffiliateMarketing); - props.Add("numberPool", NumberPool); - props.Add("ageGated", AgeGated); - props.Add("directLending", DirectLending); - props.Add("subscriberOptin", SubscriberOptin); - props.Add("subscriberOptout", SubscriberOptout); - props.Add("subscriberHelp", SubscriberHelp); - props.Add("sample1", Sample1); - props.Add("sample2", Sample2); - props.Add("sample3", Sample3); - props.Add("sample4", Sample4); - props.Add("sample5", Sample5); - props.Add("messageFlow", MessageFlow); - props.Add("helpMessage", HelpMessage); - props.Add("optinKeywords", OptinKeywords); - props.Add("optoutKeywords", OptoutKeywords); - props.Add("helpKeywords", HelpKeywords); - props.Add("optinMessage", OptinMessage); - props.Add("optoutMessage", OptoutMessage); - props.Add("referenceId", ReferenceId); - props.Add("mock", Mock); - props.Add("nextRenewalOrExpirationDate", NextRenewalOrExpirationDate); + props.Add("subUsecases", nested); + props.Add("description", Description); + props.Add("embeddedLink", EmbeddedLink); + props.Add("embeddedPhone", EmbeddedPhone); + props.Add("affiliateMarketing", AffiliateMarketing); + props.Add("numberPool", NumberPool); + props.Add("ageGated", AgeGated); + props.Add("directLending", DirectLending); + props.Add("subscriberOptin", SubscriberOptin); + props.Add("subscriberOptout", SubscriberOptout); + props.Add("subscriberHelp", SubscriberHelp); + props.Add("sample1", Sample1); + props.Add("sample2", Sample2); + props.Add("sample3", Sample3); + props.Add("sample4", Sample4); + props.Add("sample5", Sample5); + props.Add("messageFlow", MessageFlow); + props.Add("helpMessage", HelpMessage); + props.Add("optinKeywords", OptinKeywords); + props.Add("optoutKeywords", OptoutKeywords); + props.Add("helpKeywords", HelpKeywords); + props.Add("optinMessage", OptinMessage); + props.Add("optoutMessage", OptoutMessage); + props.Add("referenceId", ReferenceId); + props.Add("mock", Mock); + props.Add("nextRenewalOrExpirationDate", NextRenewalOrExpirationDate); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SMSTenDLCCampaign); - } - - /// - /// Returns true if SMSTenDLCCampaign instances are equal - /// - /// Instance of SMSTenDLCCampaign to be compared - /// Boolean - public bool Equals(SMSTenDLCCampaign input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.CampaignId == input.CampaignId || - (this.CampaignId != null && - this.CampaignId.Equals(input.CampaignId)) - ) && - ( - this.CspId == input.CspId || - (this.CspId != null && - this.CspId.Equals(input.CspId)) - ) && - ( - this.ResellerId == input.ResellerId || - (this.ResellerId != null && - this.ResellerId.Equals(input.ResellerId)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.CreateDate == input.CreateDate || - (this.CreateDate != null && - this.CreateDate.Equals(input.CreateDate)) - ) && - ( - this.AutoRenewal == input.AutoRenewal || - this.AutoRenewal.Equals(input.AutoRenewal) - ) && - ( - this.BilledDate == input.BilledDate || - (this.BilledDate != null && - this.BilledDate.Equals(input.BilledDate)) - ) && - ( - this.BrandId == input.BrandId || - (this.BrandId != null && - this.BrandId.Equals(input.BrandId)) - ) && - ( - this.Usecase == input.Usecase || - (this.Usecase != null && - this.Usecase.Equals(input.Usecase)) - ) && - ( - this.SubUsecases == input.SubUsecases || - this.SubUsecases != null && - input.SubUsecases != null && - this.SubUsecases.SequenceEqual(input.SubUsecases) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.EmbeddedLink == input.EmbeddedLink || - this.EmbeddedLink.Equals(input.EmbeddedLink) - ) && - ( - this.EmbeddedPhone == input.EmbeddedPhone || - this.EmbeddedPhone.Equals(input.EmbeddedPhone) - ) && - ( - this.AffiliateMarketing == input.AffiliateMarketing || - this.AffiliateMarketing.Equals(input.AffiliateMarketing) - ) && - ( - this.NumberPool == input.NumberPool || - this.NumberPool.Equals(input.NumberPool) - ) && - ( - this.AgeGated == input.AgeGated || - this.AgeGated.Equals(input.AgeGated) - ) && - ( - this.DirectLending == input.DirectLending || - this.DirectLending.Equals(input.DirectLending) - ) && - ( - this.SubscriberOptin == input.SubscriberOptin || - this.SubscriberOptin.Equals(input.SubscriberOptin) - ) && - ( - this.SubscriberOptout == input.SubscriberOptout || - this.SubscriberOptout.Equals(input.SubscriberOptout) - ) && - ( - this.SubscriberHelp == input.SubscriberHelp || - this.SubscriberHelp.Equals(input.SubscriberHelp) - ) && - ( - this.Sample1 == input.Sample1 || - (this.Sample1 != null && - this.Sample1.Equals(input.Sample1)) - ) && - ( - this.Sample2 == input.Sample2 || - (this.Sample2 != null && - this.Sample2.Equals(input.Sample2)) - ) && - ( - this.Sample3 == input.Sample3 || - (this.Sample3 != null && - this.Sample3.Equals(input.Sample3)) - ) && - ( - this.Sample4 == input.Sample4 || - (this.Sample4 != null && - this.Sample4.Equals(input.Sample4)) - ) && - ( - this.Sample5 == input.Sample5 || - (this.Sample5 != null && - this.Sample5.Equals(input.Sample5)) - ) && - ( - this.MessageFlow == input.MessageFlow || - (this.MessageFlow != null && - this.MessageFlow.Equals(input.MessageFlow)) - ) && - ( - this.HelpMessage == input.HelpMessage || - (this.HelpMessage != null && - this.HelpMessage.Equals(input.HelpMessage)) - ) && - ( - this.OptinKeywords == input.OptinKeywords || - (this.OptinKeywords != null && - this.OptinKeywords.Equals(input.OptinKeywords)) - ) && - ( - this.OptoutKeywords == input.OptoutKeywords || - (this.OptoutKeywords != null && - this.OptoutKeywords.Equals(input.OptoutKeywords)) - ) && - ( - this.HelpKeywords == input.HelpKeywords || - (this.HelpKeywords != null && - this.HelpKeywords.Equals(input.HelpKeywords)) - ) && - ( - this.OptinMessage == input.OptinMessage || - (this.OptinMessage != null && - this.OptinMessage.Equals(input.OptinMessage)) - ) && - ( - this.OptoutMessage == input.OptoutMessage || - (this.OptoutMessage != null && - this.OptoutMessage.Equals(input.OptoutMessage)) - ) && - ( - this.ReferenceId == input.ReferenceId || - (this.ReferenceId != null && - this.ReferenceId.Equals(input.ReferenceId)) - ) && - ( - this.Mock == input.Mock || - this.Mock.Equals(input.Mock) - ) && - ( - this.NextRenewalOrExpirationDate == input.NextRenewalOrExpirationDate || - (this.NextRenewalOrExpirationDate != null && - this.NextRenewalOrExpirationDate.Equals(input.NextRenewalOrExpirationDate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.CampaignId != null) - { - hashCode = (hashCode * 59) + this.CampaignId.GetHashCode(); - } - if (this.CspId != null) - { - hashCode = (hashCode * 59) + this.CspId.GetHashCode(); - } - if (this.ResellerId != null) - { - hashCode = (hashCode * 59) + this.ResellerId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.CreateDate != null) - { - hashCode = (hashCode * 59) + this.CreateDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AutoRenewal.GetHashCode(); - if (this.BilledDate != null) - { - hashCode = (hashCode * 59) + this.BilledDate.GetHashCode(); - } - if (this.BrandId != null) - { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); - } - if (this.Usecase != null) - { - hashCode = (hashCode * 59) + this.Usecase.GetHashCode(); - } - if (this.SubUsecases != null) - { - hashCode = (hashCode * 59) + this.SubUsecases.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EmbeddedLink.GetHashCode(); - hashCode = (hashCode * 59) + this.EmbeddedPhone.GetHashCode(); - hashCode = (hashCode * 59) + this.AffiliateMarketing.GetHashCode(); - hashCode = (hashCode * 59) + this.NumberPool.GetHashCode(); - hashCode = (hashCode * 59) + this.AgeGated.GetHashCode(); - hashCode = (hashCode * 59) + this.DirectLending.GetHashCode(); - hashCode = (hashCode * 59) + this.SubscriberOptin.GetHashCode(); - hashCode = (hashCode * 59) + this.SubscriberOptout.GetHashCode(); - hashCode = (hashCode * 59) + this.SubscriberHelp.GetHashCode(); - if (this.Sample1 != null) - { - hashCode = (hashCode * 59) + this.Sample1.GetHashCode(); - } - if (this.Sample2 != null) - { - hashCode = (hashCode * 59) + this.Sample2.GetHashCode(); - } - if (this.Sample3 != null) - { - hashCode = (hashCode * 59) + this.Sample3.GetHashCode(); - } - if (this.Sample4 != null) - { - hashCode = (hashCode * 59) + this.Sample4.GetHashCode(); - } - if (this.Sample5 != null) - { - hashCode = (hashCode * 59) + this.Sample5.GetHashCode(); - } - if (this.MessageFlow != null) - { - hashCode = (hashCode * 59) + this.MessageFlow.GetHashCode(); - } - if (this.HelpMessage != null) - { - hashCode = (hashCode * 59) + this.HelpMessage.GetHashCode(); - } - if (this.OptinKeywords != null) - { - hashCode = (hashCode * 59) + this.OptinKeywords.GetHashCode(); - } - if (this.OptoutKeywords != null) - { - hashCode = (hashCode * 59) + this.OptoutKeywords.GetHashCode(); - } - if (this.HelpKeywords != null) - { - hashCode = (hashCode * 59) + this.HelpKeywords.GetHashCode(); - } - if (this.OptinMessage != null) - { - hashCode = (hashCode * 59) + this.OptinMessage.GetHashCode(); - } - if (this.OptoutMessage != null) - { - hashCode = (hashCode * 59) + this.OptoutMessage.GetHashCode(); - } - if (this.ReferenceId != null) - { - hashCode = (hashCode * 59) + this.ReferenceId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Mock.GetHashCode(); - if (this.NextRenewalOrExpirationDate != null) - { - hashCode = (hashCode * 59) + this.NextRenewalOrExpirationDate.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { // ResellerId (string) maxLength if (this.ResellerId != null && this.ResellerId.Length > 8) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ResellerId, length must be less than 8.", new [] { "ResellerId" }); + yield return new ValidationResult( + "Invalid value for ResellerId, length must be less than 8.", + new[] { "ResellerId" } + ); } // BrandId (string) maxLength if (this.BrandId != null && this.BrandId.Length > 8) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BrandId, length must be less than 8.", new [] { "BrandId" }); + yield return new ValidationResult( + "Invalid value for BrandId, length must be less than 8.", + new[] { "BrandId" } + ); } // Usecase (string) maxLength if (this.Usecase != null && this.Usecase.Length > 20) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Usecase, length must be less than 20.", new [] { "Usecase" }); + yield return new ValidationResult( + "Invalid value for Usecase, length must be less than 20.", + new[] { "Usecase" } + ); } // Description (string) maxLength if (this.Description != null && this.Description.Length > 4096) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 4096.", new [] { "Description" }); + yield return new ValidationResult( + "Invalid value for Description, length must be less than 4096.", + new[] { "Description" } + ); } // Sample1 (string) maxLength if (this.Sample1 != null && this.Sample1.Length > 1024) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sample1, length must be less than 1024.", new [] { "Sample1" }); + yield return new ValidationResult( + "Invalid value for Sample1, length must be less than 1024.", + new[] { "Sample1" } + ); } // Sample2 (string) maxLength if (this.Sample2 != null && this.Sample2.Length > 1024) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sample2, length must be less than 1024.", new [] { "Sample2" }); + yield return new ValidationResult( + "Invalid value for Sample2, length must be less than 1024.", + new[] { "Sample2" } + ); } // Sample3 (string) maxLength if (this.Sample3 != null && this.Sample3.Length > 1024) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sample3, length must be less than 1024.", new [] { "Sample3" }); + yield return new ValidationResult( + "Invalid value for Sample3, length must be less than 1024.", + new[] { "Sample3" } + ); } // Sample4 (string) maxLength if (this.Sample4 != null && this.Sample4.Length > 1024) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sample4, length must be less than 1024.", new [] { "Sample4" }); + yield return new ValidationResult( + "Invalid value for Sample4, length must be less than 1024.", + new[] { "Sample4" } + ); } // Sample5 (string) maxLength if (this.Sample5 != null && this.Sample5.Length > 1024) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sample5, length must be less than 1024.", new [] { "Sample5" }); + yield return new ValidationResult( + "Invalid value for Sample5, length must be less than 1024.", + new[] { "Sample5" } + ); } // MessageFlow (string) maxLength if (this.MessageFlow != null && this.MessageFlow.Length > 2048) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MessageFlow, length must be less than 2048.", new [] { "MessageFlow" }); + yield return new ValidationResult( + "Invalid value for MessageFlow, length must be less than 2048.", + new[] { "MessageFlow" } + ); } // HelpMessage (string) maxLength if (this.HelpMessage != null && this.HelpMessage.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HelpMessage, length must be less than 255.", new [] { "HelpMessage" }); + yield return new ValidationResult( + "Invalid value for HelpMessage, length must be less than 255.", + new[] { "HelpMessage" } + ); } // OptinKeywords (string) maxLength if (this.OptinKeywords != null && this.OptinKeywords.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for OptinKeywords, length must be less than 255.", new [] { "OptinKeywords" }); + yield return new ValidationResult( + "Invalid value for OptinKeywords, length must be less than 255.", + new[] { "OptinKeywords" } + ); } // OptoutKeywords (string) maxLength if (this.OptoutKeywords != null && this.OptoutKeywords.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for OptoutKeywords, length must be less than 255.", new [] { "OptoutKeywords" }); + yield return new ValidationResult( + "Invalid value for OptoutKeywords, length must be less than 255.", + new[] { "OptoutKeywords" } + ); } // HelpKeywords (string) maxLength if (this.HelpKeywords != null && this.HelpKeywords.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HelpKeywords, length must be less than 255.", new [] { "HelpKeywords" }); + yield return new ValidationResult( + "Invalid value for HelpKeywords, length must be less than 255.", + new[] { "HelpKeywords" } + ); } // OptinMessage (string) maxLength if (this.OptinMessage != null && this.OptinMessage.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for OptinMessage, length must be less than 255.", new [] { "OptinMessage" }); + yield return new ValidationResult( + "Invalid value for OptinMessage, length must be less than 255.", + new[] { "OptinMessage" } + ); } // OptoutMessage (string) maxLength if (this.OptoutMessage != null && this.OptoutMessage.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for OptoutMessage, length must be less than 255.", new [] { "OptoutMessage" }); + yield return new ValidationResult( + "Invalid value for OptoutMessage, length must be less than 255.", + new[] { "OptoutMessage" } + ); } // ReferenceId (string) maxLength if (this.ReferenceId != null && this.ReferenceId.Length > 50) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReferenceId, length must be less than 50.", new [] { "ReferenceId" }); + yield return new ValidationResult( + "Invalid value for ReferenceId, length must be less than 50.", + new[] { "ReferenceId" } + ); } yield break; } } - } diff --git a/src/freeclimb/Model/SMSTenDLCCampaignsListResult.cs b/src/freeclimb/Model/SMSTenDLCCampaignsListResult.cs index 4cf221e3..71ebab33 100644 --- a/src/freeclimb/Model/SMSTenDLCCampaignsListResult.cs +++ b/src/freeclimb/Model/SMSTenDLCCampaignsListResult.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// SMSTenDLCCampaignsListResult /// [DataContract(Name = "SMSTenDLCCampaignsListResult")] - public partial class SMSTenDLCCampaignsListResult : IPagination, IEquatable, IValidatableObject + public partial class SMSTenDLCCampaignsListResult : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,31 @@ public partial class SMSTenDLCCampaignsListResult : IPagination, IEquatableNumber of items per page. /// Uri to retrieve the next page of items. /// campaigns. - public SMSTenDLCCampaignsListResult(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List campaigns = default(List)) + public SMSTenDLCCampaignsListResult( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List campaigns = default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.Campaigns = campaigns; } @@ -138,151 +154,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the SMSTenDLCCampaignsListResult instance. + /// Retrieve the KVP Dictionary for the SMSTenDLCCampaignsListResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in Campaigns) { nested.Add(item); } - props.Add("campaigns", nested); + props.Add("campaigns", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SMSTenDLCCampaignsListResult); - } - - /// - /// Returns true if SMSTenDLCCampaignsListResult instances are equal - /// - /// Instance of SMSTenDLCCampaignsListResult to be compared - /// Boolean - public bool Equals(SMSTenDLCCampaignsListResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.Campaigns == input.Campaigns || - this.Campaigns != null && - input.Campaigns != null && - this.Campaigns.SequenceEqual(input.Campaigns) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.Campaigns != null) - { - hashCode = (hashCode * 59) + this.Campaigns.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/SMSTenDLCCampaignsListResultAllOf.cs b/src/freeclimb/Model/SMSTenDLCCampaignsListResultAllOf.cs deleted file mode 100644 index db5787f2..00000000 --- a/src/freeclimb/Model/SMSTenDLCCampaignsListResultAllOf.cs +++ /dev/null @@ -1,147 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// SMSTenDLCCampaignsListResultAllOf - /// - [DataContract(Name = "SMSTenDLCCampaignsListResult_allOf")] - public partial class SMSTenDLCCampaignsListResultAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// campaigns. - public SMSTenDLCCampaignsListResultAllOf(List campaigns = default(List)) - { - this.Campaigns = campaigns; - } - - /// - /// Gets or Sets Campaigns - /// - [DataMember(Name = "campaigns", EmitDefaultValue = true)] - public List Campaigns { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SMSTenDLCCampaignsListResultAllOf {\n"); - sb.Append(" Campaigns: ").Append(Campaigns).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the SMSTenDLCCampaignsListResultAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in Campaigns) - { - nested.Add(item); - } - props.Add("campaigns", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SMSTenDLCCampaignsListResultAllOf); - } - - /// - /// Returns true if SMSTenDLCCampaignsListResultAllOf instances are equal - /// - /// Instance of SMSTenDLCCampaignsListResultAllOf to be compared - /// Boolean - public bool Equals(SMSTenDLCCampaignsListResultAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Campaigns == input.Campaigns || - this.Campaigns != null && - input.Campaigns != null && - this.Campaigns.SequenceEqual(input.Campaigns) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Campaigns != null) - { - hashCode = (hashCode * 59) + this.Campaigns.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/SMSTenDLCPartnerCampaign.cs b/src/freeclimb/Model/SMSTenDLCPartnerCampaign.cs index e9ce2080..f2744de6 100644 --- a/src/freeclimb/Model/SMSTenDLCPartnerCampaign.cs +++ b/src/freeclimb/Model/SMSTenDLCPartnerCampaign.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,47 +31,26 @@ namespace freeclimb.Model /// SMSTenDLCPartnerCampaign /// [DataContract(Name = "SMSTenDLCPartnerCampaign")] - public partial class SMSTenDLCPartnerCampaign : IEquatable, IValidatableObject + public partial class SMSTenDLCPartnerCampaign : IValidatableObject { /// - /// Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. - /// - /// Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum ACTIVE for value: ACTIVE - /// - [EnumMember(Value = "ACTIVE")] - ACTIVE = 1, - - /// - /// Enum EXPIRED for value: EXPIRED - /// - [EnumMember(Value = "EXPIRED")] - EXPIRED = 2 - - } - - - /// - /// Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. + /// Gets or Sets Status /// - /// Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } + public SMSTenDLCPartnerCampaignStatus? Status { get; set; } + /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected SMSTenDLCPartnerCampaign() { } + /// /// Initializes a new instance of the class. /// /// ID of the account that created this Queue.. /// Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. (required). - /// Current campaign status. Possible values: ACTIVE, EXPIRED. A newly created campaign defaults to ACTIVE status. . + /// status. /// Unix timestamp when campaign was created.. /// Alphanumeric identifier of the brand associated with this campaign. (required). /// Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. (required). @@ -98,52 +77,122 @@ protected SMSTenDLCPartnerCampaign() { } /// Subscriber opt-in message.. /// Subscriber opt-out message.. /// brand. - public SMSTenDLCPartnerCampaign(string accountId = default(string), string campaignId = default(string), StatusEnum? status = default(StatusEnum?), DateTime createDate = default(DateTime), string brandId = default(string), string usecase = default(string), string description = default(string), bool embeddedLink = false, bool embeddedPhone = false, bool affiliateMarketing = default(bool), bool numberPool = false, bool ageGated = default(bool), bool directLending = default(bool), bool subscriberOptin = false, bool subscriberOptout = false, bool subscriberHelp = false, string sample1 = default(string), string sample2 = default(string), string sample3 = default(string), string sample4 = default(string), string sample5 = default(string), string messageFlow = default(string), string helpMessage = default(string), string optinKeywords = default(string), string optoutKeywords = default(string), string helpKeywords = default(string), string optinMessage = default(string), string optoutMessage = default(string), SMSTenDLCPartnerCampaignBrand brand = default(SMSTenDLCPartnerCampaignBrand)) + public SMSTenDLCPartnerCampaign( + string accountId = default(string), + string campaignId = default(string), + SMSTenDLCPartnerCampaignStatus? status = default(SMSTenDLCPartnerCampaignStatus?), + DateTime createDate = default(DateTime), + string brandId = default(string), + string usecase = default(string), + string description = default(string), + bool embeddedLink = false, + bool embeddedPhone = false, + bool affiliateMarketing = default(bool), + bool numberPool = false, + bool ageGated = default(bool), + bool directLending = default(bool), + bool subscriberOptin = false, + bool subscriberOptout = false, + bool subscriberHelp = false, + string sample1 = default(string), + string sample2 = default(string), + string sample3 = default(string), + string sample4 = default(string), + string sample5 = default(string), + string messageFlow = default(string), + string helpMessage = default(string), + string optinKeywords = default(string), + string optoutKeywords = default(string), + string helpKeywords = default(string), + string optinMessage = default(string), + string optoutMessage = default(string), + SMSTenDLCPartnerCampaignBrand brand = default(SMSTenDLCPartnerCampaignBrand) + ) { // to ensure "campaignId" is required (not null) - if (campaignId == null) { - throw new ArgumentNullException("campaignId is a required property for SMSTenDLCPartnerCampaign and cannot be null"); + if (campaignId == null) + { + throw new ArgumentNullException( + "campaignId is a required property for SMSTenDLCPartnerCampaign and cannot be null" + ); } this.CampaignId = campaignId; + // to ensure "brandId" is required (not null) - if (brandId == null) { - throw new ArgumentNullException("brandId is a required property for SMSTenDLCPartnerCampaign and cannot be null"); + if (brandId == null) + { + throw new ArgumentNullException( + "brandId is a required property for SMSTenDLCPartnerCampaign and cannot be null" + ); } this.BrandId = brandId; + // to ensure "usecase" is required (not null) - if (usecase == null) { - throw new ArgumentNullException("usecase is a required property for SMSTenDLCPartnerCampaign and cannot be null"); + if (usecase == null) + { + throw new ArgumentNullException( + "usecase is a required property for SMSTenDLCPartnerCampaign and cannot be null" + ); } this.Usecase = usecase; + // to ensure "description" is required (not null) - if (description == null) { - throw new ArgumentNullException("description is a required property for SMSTenDLCPartnerCampaign and cannot be null"); + if (description == null) + { + throw new ArgumentNullException( + "description is a required property for SMSTenDLCPartnerCampaign and cannot be null" + ); } this.Description = description; + this.AccountId = accountId; + this.Status = status; + this.CreateDate = createDate; + this.EmbeddedLink = embeddedLink; + this.EmbeddedPhone = embeddedPhone; + this.AffiliateMarketing = affiliateMarketing; + this.NumberPool = numberPool; + this.AgeGated = ageGated; + this.DirectLending = directLending; + this.SubscriberOptin = subscriberOptin; + this.SubscriberOptout = subscriberOptout; + this.SubscriberHelp = subscriberHelp; + this.Sample1 = sample1; + this.Sample2 = sample2; + this.Sample3 = sample3; + this.Sample4 = sample4; + this.Sample5 = sample5; + this.MessageFlow = messageFlow; + this.HelpMessage = helpMessage; + this.OptinKeywords = optinKeywords; + this.OptoutKeywords = optoutKeywords; + this.HelpKeywords = helpKeywords; + this.OptinMessage = optinMessage; + this.OptoutMessage = optoutMessage; + this.Brand = brand; } @@ -158,7 +207,7 @@ protected SMSTenDLCPartnerCampaign() { } /// Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. /// /// Alphanumeric identifier assigned by the registry for a campaign. This identifier is required by the NetNumber OSR SMS enabling process of 10DLC. - [DataMember(Name = "campaignId", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "campaignId", IsRequired = true, EmitDefaultValue = true)] public string CampaignId { get; set; } /// @@ -172,21 +221,21 @@ protected SMSTenDLCPartnerCampaign() { } /// Alphanumeric identifier of the brand associated with this campaign. /// /// Alphanumeric identifier of the brand associated with this campaign. - [DataMember(Name = "brandId", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "brandId", IsRequired = true, EmitDefaultValue = true)] public string BrandId { get; set; } /// /// Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. /// /// Campaign usecase. Must be of defined valid types. Use `/registry/enum/usecase` operation to retrieve usecases available for given brand. - [DataMember(Name = "usecase", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "usecase", IsRequired = true, EmitDefaultValue = true)] public string Usecase { get; set; } /// /// Summary description of this campaign. /// /// Summary description of this campaign. - [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] public string Description { get; set; } /// @@ -388,405 +437,196 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the SMSTenDLCPartnerCampaign instance. + /// Retrieve the KVP Dictionary for the SMSTenDLCPartnerCampaign instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("accountId", AccountId); - props.Add("campaignId", CampaignId); - props.Add("status", Status); - props.Add("createDate", CreateDate); - props.Add("brandId", BrandId); - props.Add("usecase", Usecase); - props.Add("description", Description); - props.Add("embeddedLink", EmbeddedLink); - props.Add("embeddedPhone", EmbeddedPhone); - props.Add("affiliateMarketing", AffiliateMarketing); - props.Add("numberPool", NumberPool); - props.Add("ageGated", AgeGated); - props.Add("directLending", DirectLending); - props.Add("subscriberOptin", SubscriberOptin); - props.Add("subscriberOptout", SubscriberOptout); - props.Add("subscriberHelp", SubscriberHelp); - props.Add("sample1", Sample1); - props.Add("sample2", Sample2); - props.Add("sample3", Sample3); - props.Add("sample4", Sample4); - props.Add("sample5", Sample5); - props.Add("messageFlow", MessageFlow); - props.Add("helpMessage", HelpMessage); - props.Add("optinKeywords", OptinKeywords); - props.Add("optoutKeywords", OptoutKeywords); - props.Add("helpKeywords", HelpKeywords); - props.Add("optinMessage", OptinMessage); - props.Add("optoutMessage", OptoutMessage); - props.Add("brand", Brand); + props.Add("accountId", AccountId); + props.Add("campaignId", CampaignId); + props.Add("status", Status); + props.Add("createDate", CreateDate); + props.Add("brandId", BrandId); + props.Add("usecase", Usecase); + props.Add("description", Description); + props.Add("embeddedLink", EmbeddedLink); + props.Add("embeddedPhone", EmbeddedPhone); + props.Add("affiliateMarketing", AffiliateMarketing); + props.Add("numberPool", NumberPool); + props.Add("ageGated", AgeGated); + props.Add("directLending", DirectLending); + props.Add("subscriberOptin", SubscriberOptin); + props.Add("subscriberOptout", SubscriberOptout); + props.Add("subscriberHelp", SubscriberHelp); + props.Add("sample1", Sample1); + props.Add("sample2", Sample2); + props.Add("sample3", Sample3); + props.Add("sample4", Sample4); + props.Add("sample5", Sample5); + props.Add("messageFlow", MessageFlow); + props.Add("helpMessage", HelpMessage); + props.Add("optinKeywords", OptinKeywords); + props.Add("optoutKeywords", OptoutKeywords); + props.Add("helpKeywords", HelpKeywords); + props.Add("optinMessage", OptinMessage); + props.Add("optoutMessage", OptoutMessage); + props.Add("brand", Brand); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SMSTenDLCPartnerCampaign); - } - - /// - /// Returns true if SMSTenDLCPartnerCampaign instances are equal - /// - /// Instance of SMSTenDLCPartnerCampaign to be compared - /// Boolean - public bool Equals(SMSTenDLCPartnerCampaign input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.CampaignId == input.CampaignId || - (this.CampaignId != null && - this.CampaignId.Equals(input.CampaignId)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.CreateDate == input.CreateDate || - (this.CreateDate != null && - this.CreateDate.Equals(input.CreateDate)) - ) && - ( - this.BrandId == input.BrandId || - (this.BrandId != null && - this.BrandId.Equals(input.BrandId)) - ) && - ( - this.Usecase == input.Usecase || - (this.Usecase != null && - this.Usecase.Equals(input.Usecase)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.EmbeddedLink == input.EmbeddedLink || - this.EmbeddedLink.Equals(input.EmbeddedLink) - ) && - ( - this.EmbeddedPhone == input.EmbeddedPhone || - this.EmbeddedPhone.Equals(input.EmbeddedPhone) - ) && - ( - this.AffiliateMarketing == input.AffiliateMarketing || - this.AffiliateMarketing.Equals(input.AffiliateMarketing) - ) && - ( - this.NumberPool == input.NumberPool || - this.NumberPool.Equals(input.NumberPool) - ) && - ( - this.AgeGated == input.AgeGated || - this.AgeGated.Equals(input.AgeGated) - ) && - ( - this.DirectLending == input.DirectLending || - this.DirectLending.Equals(input.DirectLending) - ) && - ( - this.SubscriberOptin == input.SubscriberOptin || - this.SubscriberOptin.Equals(input.SubscriberOptin) - ) && - ( - this.SubscriberOptout == input.SubscriberOptout || - this.SubscriberOptout.Equals(input.SubscriberOptout) - ) && - ( - this.SubscriberHelp == input.SubscriberHelp || - this.SubscriberHelp.Equals(input.SubscriberHelp) - ) && - ( - this.Sample1 == input.Sample1 || - (this.Sample1 != null && - this.Sample1.Equals(input.Sample1)) - ) && - ( - this.Sample2 == input.Sample2 || - (this.Sample2 != null && - this.Sample2.Equals(input.Sample2)) - ) && - ( - this.Sample3 == input.Sample3 || - (this.Sample3 != null && - this.Sample3.Equals(input.Sample3)) - ) && - ( - this.Sample4 == input.Sample4 || - (this.Sample4 != null && - this.Sample4.Equals(input.Sample4)) - ) && - ( - this.Sample5 == input.Sample5 || - (this.Sample5 != null && - this.Sample5.Equals(input.Sample5)) - ) && - ( - this.MessageFlow == input.MessageFlow || - (this.MessageFlow != null && - this.MessageFlow.Equals(input.MessageFlow)) - ) && - ( - this.HelpMessage == input.HelpMessage || - (this.HelpMessage != null && - this.HelpMessage.Equals(input.HelpMessage)) - ) && - ( - this.OptinKeywords == input.OptinKeywords || - (this.OptinKeywords != null && - this.OptinKeywords.Equals(input.OptinKeywords)) - ) && - ( - this.OptoutKeywords == input.OptoutKeywords || - (this.OptoutKeywords != null && - this.OptoutKeywords.Equals(input.OptoutKeywords)) - ) && - ( - this.HelpKeywords == input.HelpKeywords || - (this.HelpKeywords != null && - this.HelpKeywords.Equals(input.HelpKeywords)) - ) && - ( - this.OptinMessage == input.OptinMessage || - (this.OptinMessage != null && - this.OptinMessage.Equals(input.OptinMessage)) - ) && - ( - this.OptoutMessage == input.OptoutMessage || - (this.OptoutMessage != null && - this.OptoutMessage.Equals(input.OptoutMessage)) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.CampaignId != null) - { - hashCode = (hashCode * 59) + this.CampaignId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.CreateDate != null) - { - hashCode = (hashCode * 59) + this.CreateDate.GetHashCode(); - } - if (this.BrandId != null) - { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); - } - if (this.Usecase != null) - { - hashCode = (hashCode * 59) + this.Usecase.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EmbeddedLink.GetHashCode(); - hashCode = (hashCode * 59) + this.EmbeddedPhone.GetHashCode(); - hashCode = (hashCode * 59) + this.AffiliateMarketing.GetHashCode(); - hashCode = (hashCode * 59) + this.NumberPool.GetHashCode(); - hashCode = (hashCode * 59) + this.AgeGated.GetHashCode(); - hashCode = (hashCode * 59) + this.DirectLending.GetHashCode(); - hashCode = (hashCode * 59) + this.SubscriberOptin.GetHashCode(); - hashCode = (hashCode * 59) + this.SubscriberOptout.GetHashCode(); - hashCode = (hashCode * 59) + this.SubscriberHelp.GetHashCode(); - if (this.Sample1 != null) - { - hashCode = (hashCode * 59) + this.Sample1.GetHashCode(); - } - if (this.Sample2 != null) - { - hashCode = (hashCode * 59) + this.Sample2.GetHashCode(); - } - if (this.Sample3 != null) - { - hashCode = (hashCode * 59) + this.Sample3.GetHashCode(); - } - if (this.Sample4 != null) - { - hashCode = (hashCode * 59) + this.Sample4.GetHashCode(); - } - if (this.Sample5 != null) - { - hashCode = (hashCode * 59) + this.Sample5.GetHashCode(); - } - if (this.MessageFlow != null) - { - hashCode = (hashCode * 59) + this.MessageFlow.GetHashCode(); - } - if (this.HelpMessage != null) - { - hashCode = (hashCode * 59) + this.HelpMessage.GetHashCode(); - } - if (this.OptinKeywords != null) - { - hashCode = (hashCode * 59) + this.OptinKeywords.GetHashCode(); - } - if (this.OptoutKeywords != null) - { - hashCode = (hashCode * 59) + this.OptoutKeywords.GetHashCode(); - } - if (this.HelpKeywords != null) - { - hashCode = (hashCode * 59) + this.HelpKeywords.GetHashCode(); - } - if (this.OptinMessage != null) - { - hashCode = (hashCode * 59) + this.OptinMessage.GetHashCode(); - } - if (this.OptoutMessage != null) - { - hashCode = (hashCode * 59) + this.OptoutMessage.GetHashCode(); - } - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { // BrandId (string) maxLength if (this.BrandId != null && this.BrandId.Length > 8) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BrandId, length must be less than 8.", new [] { "BrandId" }); + yield return new ValidationResult( + "Invalid value for BrandId, length must be less than 8.", + new[] { "BrandId" } + ); } // Usecase (string) maxLength if (this.Usecase != null && this.Usecase.Length > 20) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Usecase, length must be less than 20.", new [] { "Usecase" }); + yield return new ValidationResult( + "Invalid value for Usecase, length must be less than 20.", + new[] { "Usecase" } + ); } // Description (string) maxLength if (this.Description != null && this.Description.Length > 4096) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 4096.", new [] { "Description" }); + yield return new ValidationResult( + "Invalid value for Description, length must be less than 4096.", + new[] { "Description" } + ); } // Sample1 (string) maxLength if (this.Sample1 != null && this.Sample1.Length > 1024) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sample1, length must be less than 1024.", new [] { "Sample1" }); + yield return new ValidationResult( + "Invalid value for Sample1, length must be less than 1024.", + new[] { "Sample1" } + ); } // Sample2 (string) maxLength if (this.Sample2 != null && this.Sample2.Length > 1024) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sample2, length must be less than 1024.", new [] { "Sample2" }); + yield return new ValidationResult( + "Invalid value for Sample2, length must be less than 1024.", + new[] { "Sample2" } + ); } // Sample3 (string) maxLength if (this.Sample3 != null && this.Sample3.Length > 1024) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sample3, length must be less than 1024.", new [] { "Sample3" }); + yield return new ValidationResult( + "Invalid value for Sample3, length must be less than 1024.", + new[] { "Sample3" } + ); } // Sample4 (string) maxLength if (this.Sample4 != null && this.Sample4.Length > 1024) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sample4, length must be less than 1024.", new [] { "Sample4" }); + yield return new ValidationResult( + "Invalid value for Sample4, length must be less than 1024.", + new[] { "Sample4" } + ); } // Sample5 (string) maxLength if (this.Sample5 != null && this.Sample5.Length > 1024) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Sample5, length must be less than 1024.", new [] { "Sample5" }); + yield return new ValidationResult( + "Invalid value for Sample5, length must be less than 1024.", + new[] { "Sample5" } + ); } // MessageFlow (string) maxLength if (this.MessageFlow != null && this.MessageFlow.Length > 2048) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MessageFlow, length must be less than 2048.", new [] { "MessageFlow" }); + yield return new ValidationResult( + "Invalid value for MessageFlow, length must be less than 2048.", + new[] { "MessageFlow" } + ); } // HelpMessage (string) maxLength if (this.HelpMessage != null && this.HelpMessage.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HelpMessage, length must be less than 255.", new [] { "HelpMessage" }); + yield return new ValidationResult( + "Invalid value for HelpMessage, length must be less than 255.", + new[] { "HelpMessage" } + ); } // OptinKeywords (string) maxLength if (this.OptinKeywords != null && this.OptinKeywords.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for OptinKeywords, length must be less than 255.", new [] { "OptinKeywords" }); + yield return new ValidationResult( + "Invalid value for OptinKeywords, length must be less than 255.", + new[] { "OptinKeywords" } + ); } // OptoutKeywords (string) maxLength if (this.OptoutKeywords != null && this.OptoutKeywords.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for OptoutKeywords, length must be less than 255.", new [] { "OptoutKeywords" }); + yield return new ValidationResult( + "Invalid value for OptoutKeywords, length must be less than 255.", + new[] { "OptoutKeywords" } + ); } // HelpKeywords (string) maxLength if (this.HelpKeywords != null && this.HelpKeywords.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HelpKeywords, length must be less than 255.", new [] { "HelpKeywords" }); + yield return new ValidationResult( + "Invalid value for HelpKeywords, length must be less than 255.", + new[] { "HelpKeywords" } + ); } // OptinMessage (string) maxLength if (this.OptinMessage != null && this.OptinMessage.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for OptinMessage, length must be less than 255.", new [] { "OptinMessage" }); + yield return new ValidationResult( + "Invalid value for OptinMessage, length must be less than 255.", + new[] { "OptinMessage" } + ); } // OptoutMessage (string) maxLength if (this.OptoutMessage != null && this.OptoutMessage.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for OptoutMessage, length must be less than 255.", new [] { "OptoutMessage" }); + yield return new ValidationResult( + "Invalid value for OptoutMessage, length must be less than 255.", + new[] { "OptoutMessage" } + ); } yield break; } } - } diff --git a/src/freeclimb/Model/SMSTenDLCPartnerCampaignBrand.cs b/src/freeclimb/Model/SMSTenDLCPartnerCampaignBrand.cs index f2dfc0cb..f6c073cd 100644 --- a/src/freeclimb/Model/SMSTenDLCPartnerCampaignBrand.cs +++ b/src/freeclimb/Model/SMSTenDLCPartnerCampaignBrand.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,13 +31,14 @@ namespace freeclimb.Model /// SMSTenDLCPartnerCampaignBrand /// [DataContract(Name = "SMSTenDLCPartnerCampaignBrand")] - public partial class SMSTenDLCPartnerCampaignBrand : IEquatable, IValidatableObject + public partial class SMSTenDLCPartnerCampaignBrand : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected SMSTenDLCPartnerCampaignBrand() { } + /// /// Initializes a new instance of the class. /// @@ -51,25 +52,51 @@ protected SMSTenDLCPartnerCampaignBrand() { } /// Brand website URL.. /// Optional brand attributes. Please refer to GET /enum/optionalAttributeNames for dictionary of optional attribute names.. /// External vetting score.. - public SMSTenDLCPartnerCampaignBrand(string accountId = default(string), string firstName = default(string), string lastName = default(string), string displayName = default(string), string companyName = default(string), string phone = default(string), string email = default(string), string website = default(string), Dictionary optionalAttributes = default(Dictionary), int evpVettingScore = default(int)) + public SMSTenDLCPartnerCampaignBrand( + string accountId = default(string), + string firstName = default(string), + string lastName = default(string), + string displayName = default(string), + string companyName = default(string), + string phone = default(string), + string email = default(string), + string website = default(string), + Dictionary optionalAttributes = default(Dictionary), + int evpVettingScore = default(int) + ) { // to ensure "phone" is required (not null) - if (phone == null) { - throw new ArgumentNullException("phone is a required property for SMSTenDLCPartnerCampaignBrand and cannot be null"); + if (phone == null) + { + throw new ArgumentNullException( + "phone is a required property for SMSTenDLCPartnerCampaignBrand and cannot be null" + ); } this.Phone = phone; + // to ensure "email" is required (not null) - if (email == null) { - throw new ArgumentNullException("email is a required property for SMSTenDLCPartnerCampaignBrand and cannot be null"); + if (email == null) + { + throw new ArgumentNullException( + "email is a required property for SMSTenDLCPartnerCampaignBrand and cannot be null" + ); } this.Email = email; + this.AccountId = accountId; + this.FirstName = firstName; + this.LastName = lastName; + this.DisplayName = displayName; + this.CompanyName = companyName; + this.Website = website; + this.OptionalAttributes = optionalAttributes; + this.EvpVettingScore = evpVettingScore; } @@ -95,10 +122,14 @@ public bool ShouldSerializeBrandId() { return false; } + /// - /// First or given name. + /// First or given name. /// /// First or given name. + /* + John + */ [DataMember(Name = "firstName", EmitDefaultValue = false)] public string FirstName { get; set; } @@ -106,6 +137,9 @@ public bool ShouldSerializeBrandId() /// Last or Surname. /// /// Last or Surname. + /* + Doe + */ [DataMember(Name = "lastName", EmitDefaultValue = false)] public string LastName { get; set; } @@ -113,6 +147,9 @@ public bool ShouldSerializeBrandId() /// Display or marketing name of the brand. /// /// Display or marketing name of the brand. + /* + ABC Mobile + */ [DataMember(Name = "displayName", EmitDefaultValue = false)] public string DisplayName { get; set; } @@ -120,6 +157,9 @@ public bool ShouldSerializeBrandId() /// (Required for Non-profit/private/public) Legal company name. /// /// (Required for Non-profit/private/public) Legal company name. + /* + ABC Inc. + */ [DataMember(Name = "companyName", EmitDefaultValue = false)] public string CompanyName { get; set; } @@ -127,20 +167,26 @@ public bool ShouldSerializeBrandId() /// Valid phone number in e.164 international format. /// /// Valid phone number in e.164 international format. - [DataMember(Name = "phone", IsRequired = true, EmitDefaultValue = false)] + /* + +12024567890 + */ + [DataMember(Name = "phone", IsRequired = true, EmitDefaultValue = true)] public string Phone { get; set; } /// /// Valid email address of brand support contact. /// /// Valid email address of brand support contact. - [DataMember(Name = "email", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "email", IsRequired = true, EmitDefaultValue = true)] public string Email { get; set; } /// /// Brand website URL. /// /// Brand website URL. + /* + http://www.abcmobile.com + */ [DataMember(Name = "website", EmitDefaultValue = false)] public string Website { get; set; } @@ -187,214 +233,106 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the SMSTenDLCPartnerCampaignBrand instance. + /// Retrieve the KVP Dictionary for the SMSTenDLCPartnerCampaignBrand instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("accountId", AccountId); - props.Add("brandId", BrandId); - props.Add("firstName", FirstName); - props.Add("lastName", LastName); - props.Add("displayName", DisplayName); - props.Add("companyName", CompanyName); - props.Add("phone", Phone); - props.Add("email", Email); - props.Add("website", Website); - props.Add("optionalAttributes", OptionalAttributes); - props.Add("evpVettingScore", EvpVettingScore); + props.Add("accountId", AccountId); + props.Add("brandId", BrandId); + props.Add("firstName", FirstName); + props.Add("lastName", LastName); + props.Add("displayName", DisplayName); + props.Add("companyName", CompanyName); + props.Add("phone", Phone); + props.Add("email", Email); + props.Add("website", Website); + props.Add("optionalAttributes", OptionalAttributes); + props.Add("evpVettingScore", EvpVettingScore); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SMSTenDLCPartnerCampaignBrand); - } - - /// - /// Returns true if SMSTenDLCPartnerCampaignBrand instances are equal - /// - /// Instance of SMSTenDLCPartnerCampaignBrand to be compared - /// Boolean - public bool Equals(SMSTenDLCPartnerCampaignBrand input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.BrandId == input.BrandId || - (this.BrandId != null && - this.BrandId.Equals(input.BrandId)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.CompanyName == input.CompanyName || - (this.CompanyName != null && - this.CompanyName.Equals(input.CompanyName)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Website == input.Website || - (this.Website != null && - this.Website.Equals(input.Website)) - ) && - ( - this.OptionalAttributes == input.OptionalAttributes || - this.OptionalAttributes != null && - input.OptionalAttributes != null && - this.OptionalAttributes.SequenceEqual(input.OptionalAttributes) - ) && - ( - this.EvpVettingScore == input.EvpVettingScore || - this.EvpVettingScore.Equals(input.EvpVettingScore) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.BrandId != null) - { - hashCode = (hashCode * 59) + this.BrandId.GetHashCode(); - } - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.CompanyName != null) - { - hashCode = (hashCode * 59) + this.CompanyName.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Website != null) - { - hashCode = (hashCode * 59) + this.Website.GetHashCode(); - } - if (this.OptionalAttributes != null) - { - hashCode = (hashCode * 59) + this.OptionalAttributes.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EvpVettingScore.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { // FirstName (string) maxLength if (this.FirstName != null && this.FirstName.Length > 100) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 100.", new [] { "FirstName" }); + yield return new ValidationResult( + "Invalid value for FirstName, length must be less than 100.", + new[] { "FirstName" } + ); } // LastName (string) maxLength if (this.LastName != null && this.LastName.Length > 100) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 100.", new [] { "LastName" }); + yield return new ValidationResult( + "Invalid value for LastName, length must be less than 100.", + new[] { "LastName" } + ); } // DisplayName (string) maxLength if (this.DisplayName != null && this.DisplayName.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, length must be less than 255.", new [] { "DisplayName" }); + yield return new ValidationResult( + "Invalid value for DisplayName, length must be less than 255.", + new[] { "DisplayName" } + ); } // CompanyName (string) maxLength if (this.CompanyName != null && this.CompanyName.Length > 255) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CompanyName, length must be less than 255.", new [] { "CompanyName" }); + yield return new ValidationResult( + "Invalid value for CompanyName, length must be less than 255.", + new[] { "CompanyName" } + ); } // Phone (string) maxLength if (this.Phone != null && this.Phone.Length > 20) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Phone, length must be less than 20.", new [] { "Phone" }); + yield return new ValidationResult( + "Invalid value for Phone, length must be less than 20.", + new[] { "Phone" } + ); } // Email (string) maxLength if (this.Email != null && this.Email.Length > 100) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Email, length must be less than 100.", new [] { "Email" }); + yield return new ValidationResult( + "Invalid value for Email, length must be less than 100.", + new[] { "Email" } + ); } // Website (string) maxLength if (this.Website != null && this.Website.Length > 100) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Website, length must be less than 100.", new [] { "Website" }); + yield return new ValidationResult( + "Invalid value for Website, length must be less than 100.", + new[] { "Website" } + ); } yield break; } } - } diff --git a/src/freeclimb/Model/SMSTenDLCPartnerCampaignsListResult.cs b/src/freeclimb/Model/SMSTenDLCPartnerCampaignsListResult.cs index 20337098..dcc7b048 100644 --- a/src/freeclimb/Model/SMSTenDLCPartnerCampaignsListResult.cs +++ b/src/freeclimb/Model/SMSTenDLCPartnerCampaignsListResult.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// SMSTenDLCPartnerCampaignsListResult /// [DataContract(Name = "SMSTenDLCPartnerCampaignsListResult")] - public partial class SMSTenDLCPartnerCampaignsListResult : IPagination, IEquatable, IValidatableObject + public partial class SMSTenDLCPartnerCampaignsListResult : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,32 @@ public partial class SMSTenDLCPartnerCampaignsListResult : IPagination, IEquatab /// Number of items per page. /// Uri to retrieve the next page of items. /// partnerCampaigns. - public SMSTenDLCPartnerCampaignsListResult(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List partnerCampaigns = default(List)) + public SMSTenDLCPartnerCampaignsListResult( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List partnerCampaigns = + default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.PartnerCampaigns = partnerCampaigns; } @@ -138,151 +155,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the SMSTenDLCPartnerCampaignsListResult instance. + /// Retrieve the KVP Dictionary for the SMSTenDLCPartnerCampaignsListResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in PartnerCampaigns) { nested.Add(item); } - props.Add("partnerCampaigns", nested); + props.Add("partnerCampaigns", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SMSTenDLCPartnerCampaignsListResult); - } - - /// - /// Returns true if SMSTenDLCPartnerCampaignsListResult instances are equal - /// - /// Instance of SMSTenDLCPartnerCampaignsListResult to be compared - /// Boolean - public bool Equals(SMSTenDLCPartnerCampaignsListResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.PartnerCampaigns == input.PartnerCampaigns || - this.PartnerCampaigns != null && - input.PartnerCampaigns != null && - this.PartnerCampaigns.SequenceEqual(input.PartnerCampaigns) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.PartnerCampaigns != null) - { - hashCode = (hashCode * 59) + this.PartnerCampaigns.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/SMSTenDLCPartnerCampaignsListResultAllOf.cs b/src/freeclimb/Model/SMSTenDLCPartnerCampaignsListResultAllOf.cs deleted file mode 100644 index fe43f144..00000000 --- a/src/freeclimb/Model/SMSTenDLCPartnerCampaignsListResultAllOf.cs +++ /dev/null @@ -1,147 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// SMSTenDLCPartnerCampaignsListResultAllOf - /// - [DataContract(Name = "SMSTenDLCPartnerCampaignsListResult_allOf")] - public partial class SMSTenDLCPartnerCampaignsListResultAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// partnerCampaigns. - public SMSTenDLCPartnerCampaignsListResultAllOf(List partnerCampaigns = default(List)) - { - this.PartnerCampaigns = partnerCampaigns; - } - - /// - /// Gets or Sets PartnerCampaigns - /// - [DataMember(Name = "partnerCampaigns", EmitDefaultValue = true)] - public List PartnerCampaigns { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SMSTenDLCPartnerCampaignsListResultAllOf {\n"); - sb.Append(" PartnerCampaigns: ").Append(PartnerCampaigns).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the SMSTenDLCPartnerCampaignsListResultAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in PartnerCampaigns) - { - nested.Add(item); - } - props.Add("partnerCampaigns", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SMSTenDLCPartnerCampaignsListResultAllOf); - } - - /// - /// Returns true if SMSTenDLCPartnerCampaignsListResultAllOf instances are equal - /// - /// Instance of SMSTenDLCPartnerCampaignsListResultAllOf to be compared - /// Boolean - public bool Equals(SMSTenDLCPartnerCampaignsListResultAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.PartnerCampaigns == input.PartnerCampaigns || - this.PartnerCampaigns != null && - input.PartnerCampaigns != null && - this.PartnerCampaigns.SequenceEqual(input.PartnerCampaigns) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PartnerCampaigns != null) - { - hashCode = (hashCode * 59) + this.PartnerCampaigns.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/SMSTollFreeCampaign.cs b/src/freeclimb/Model/SMSTollFreeCampaign.cs index 68385fe9..306c5acb 100644 --- a/src/freeclimb/Model/SMSTollFreeCampaign.cs +++ b/src/freeclimb/Model/SMSTollFreeCampaign.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,97 +31,88 @@ namespace freeclimb.Model /// SMSTollFreeCampaign /// [DataContract(Name = "SMSTollFreeCampaign")] - public partial class SMSTollFreeCampaign : IEquatable, IValidatableObject + public partial class SMSTollFreeCampaign : IValidatableObject { /// - /// Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. + /// Gets or Sets RegistrationStatus /// - /// Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. - [JsonConverter(typeof(StringEnumConverter))] - public enum RegistrationStatusEnum - { - /// - /// Enum UNREGISTERED for value: UNREGISTERED - /// - [EnumMember(Value = "UNREGISTERED")] - UNREGISTERED = 1, - - /// - /// Enum INITIATED for value: INITIATED - /// - [EnumMember(Value = "INITIATED")] - INITIATED = 2, - - /// - /// Enum PENDING for value: PENDING - /// - [EnumMember(Value = "PENDING")] - PENDING = 3, - - /// - /// Enum DECLINED for value: DECLINED - /// - [EnumMember(Value = "DECLINED")] - DECLINED = 4, - - /// - /// Enum REGISTERED for value: REGISTERED - /// - [EnumMember(Value = "REGISTERED")] - REGISTERED = 5 - - } - + [DataMember(Name = "registrationStatus", IsRequired = true, EmitDefaultValue = true)] + public SMSTollFreeCampaignRegistrationStatus RegistrationStatus { get; set; } - /// - /// Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. - /// - /// Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. - [DataMember(Name = "registrationStatus", IsRequired = true, EmitDefaultValue = false)] - public RegistrationStatusEnum RegistrationStatus { get; set; } /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected SMSTollFreeCampaign() { } + /// /// Initializes a new instance of the class. /// /// ID of the account that created this toll-free campaign (required). /// Alphanumeric identifier used by the platform to identify this toll-free campaign (required). /// useCase (required). - /// Current toll-free campaign registration status.Possible values: UNREGISTERED,INITIATED,PENDING,DECLINED,REGISTERED. A newly created campaign defaults to INITIATED status. (required). + /// registrationStatus (required). /// dateCreated (required). /// dateUpdated (required). /// revision (required). - public SMSTollFreeCampaign(string accountId = default(string), string campaignId = default(string), string useCase = default(string), RegistrationStatusEnum registrationStatus = default(RegistrationStatusEnum), string dateCreated = default(string), string dateUpdated = default(string), int revision = default(int)) + public SMSTollFreeCampaign( + string accountId = default(string), + string campaignId = default(string), + string useCase = default(string), + SMSTollFreeCampaignRegistrationStatus registrationStatus = + default(SMSTollFreeCampaignRegistrationStatus), + string dateCreated = default(string), + string dateUpdated = default(string), + int revision = default(int) + ) { // to ensure "accountId" is required (not null) - if (accountId == null) { - throw new ArgumentNullException("accountId is a required property for SMSTollFreeCampaign and cannot be null"); + if (accountId == null) + { + throw new ArgumentNullException( + "accountId is a required property for SMSTollFreeCampaign and cannot be null" + ); } this.AccountId = accountId; + // to ensure "campaignId" is required (not null) - if (campaignId == null) { - throw new ArgumentNullException("campaignId is a required property for SMSTollFreeCampaign and cannot be null"); + if (campaignId == null) + { + throw new ArgumentNullException( + "campaignId is a required property for SMSTollFreeCampaign and cannot be null" + ); } this.CampaignId = campaignId; + // to ensure "useCase" is required (not null) - if (useCase == null) { - throw new ArgumentNullException("useCase is a required property for SMSTollFreeCampaign and cannot be null"); + if (useCase == null) + { + throw new ArgumentNullException( + "useCase is a required property for SMSTollFreeCampaign and cannot be null" + ); } this.UseCase = useCase; + this.RegistrationStatus = registrationStatus; + // to ensure "dateCreated" is required (not null) - if (dateCreated == null) { - throw new ArgumentNullException("dateCreated is a required property for SMSTollFreeCampaign and cannot be null"); + if (dateCreated == null) + { + throw new ArgumentNullException( + "dateCreated is a required property for SMSTollFreeCampaign and cannot be null" + ); } this.DateCreated = dateCreated; + // to ensure "dateUpdated" is required (not null) - if (dateUpdated == null) { - throw new ArgumentNullException("dateUpdated is a required property for SMSTollFreeCampaign and cannot be null"); + if (dateUpdated == null) + { + throw new ArgumentNullException( + "dateUpdated is a required property for SMSTollFreeCampaign and cannot be null" + ); } this.DateUpdated = dateUpdated; + this.Revision = revision; } @@ -136,31 +127,31 @@ protected SMSTollFreeCampaign() { } /// Alphanumeric identifier used by the platform to identify this toll-free campaign /// /// Alphanumeric identifier used by the platform to identify this toll-free campaign - [DataMember(Name = "campaignId", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "campaignId", IsRequired = true, EmitDefaultValue = true)] public string CampaignId { get; set; } /// /// Gets or Sets UseCase /// - [DataMember(Name = "useCase", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "useCase", IsRequired = true, EmitDefaultValue = true)] public string UseCase { get; set; } /// /// Gets or Sets DateCreated /// - [DataMember(Name = "dateCreated", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "dateCreated", IsRequired = true, EmitDefaultValue = true)] public string DateCreated { get; set; } /// /// Gets or Sets DateUpdated /// - [DataMember(Name = "dateUpdated", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "dateUpdated", IsRequired = true, EmitDefaultValue = true)] public string DateUpdated { get; set; } /// /// Gets or Sets Revision /// - [DataMember(Name = "revision", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "revision", IsRequired = true, EmitDefaultValue = true)] public int Revision { get; set; } /// @@ -188,127 +179,39 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the SMSTollFreeCampaign instance. + /// Retrieve the KVP Dictionary for the SMSTollFreeCampaign instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("accountId", AccountId); - props.Add("campaignId", CampaignId); - props.Add("useCase", UseCase); - props.Add("registrationStatus", RegistrationStatus); - props.Add("dateCreated", DateCreated); - props.Add("dateUpdated", DateUpdated); - props.Add("revision", Revision); + props.Add("accountId", AccountId); + props.Add("campaignId", CampaignId); + props.Add("useCase", UseCase); + props.Add("registrationStatus", RegistrationStatus); + props.Add("dateCreated", DateCreated); + props.Add("dateUpdated", DateUpdated); + props.Add("revision", Revision); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SMSTollFreeCampaign); - } - - /// - /// Returns true if SMSTollFreeCampaign instances are equal - /// - /// Instance of SMSTollFreeCampaign to be compared - /// Boolean - public bool Equals(SMSTollFreeCampaign input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.CampaignId == input.CampaignId || - (this.CampaignId != null && - this.CampaignId.Equals(input.CampaignId)) - ) && - ( - this.UseCase == input.UseCase || - (this.UseCase != null && - this.UseCase.Equals(input.UseCase)) - ) && - ( - this.RegistrationStatus == input.RegistrationStatus || - this.RegistrationStatus.Equals(input.RegistrationStatus) - ) && - ( - this.DateCreated == input.DateCreated || - (this.DateCreated != null && - this.DateCreated.Equals(input.DateCreated)) - ) && - ( - this.DateUpdated == input.DateUpdated || - (this.DateUpdated != null && - this.DateUpdated.Equals(input.DateUpdated)) - ) && - ( - this.Revision == input.Revision || - this.Revision.Equals(input.Revision) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.CampaignId != null) - { - hashCode = (hashCode * 59) + this.CampaignId.GetHashCode(); - } - if (this.UseCase != null) - { - hashCode = (hashCode * 59) + this.UseCase.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RegistrationStatus.GetHashCode(); - if (this.DateCreated != null) - { - hashCode = (hashCode * 59) + this.DateCreated.GetHashCode(); - } - if (this.DateUpdated != null) - { - hashCode = (hashCode * 59) + this.DateUpdated.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Revision.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/SMSTollFreeCampaignsListResult.cs b/src/freeclimb/Model/SMSTollFreeCampaignsListResult.cs index 3c252f0a..c630b407 100644 --- a/src/freeclimb/Model/SMSTollFreeCampaignsListResult.cs +++ b/src/freeclimb/Model/SMSTollFreeCampaignsListResult.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using freeclimb.Utils; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; -using freeclimb.Utils; namespace freeclimb.Model { @@ -32,7 +32,7 @@ namespace freeclimb.Model /// SMSTollFreeCampaignsListResult /// [DataContract(Name = "SMSTollFreeCampaignsListResult")] - public partial class SMSTollFreeCampaignsListResult : IPagination, IEquatable, IValidatableObject + public partial class SMSTollFreeCampaignsListResult : IValidatableObject, IPagination { /// /// Initializes a new instance of the class. @@ -45,15 +45,31 @@ public partial class SMSTollFreeCampaignsListResult : IPagination, IEquatableNumber of items per page. /// Uri to retrieve the next page of items. /// brands. - public SMSTollFreeCampaignsListResult(int? total = default(int?), int? start = default(int?), int? end = default(int?), int? page = default(int?), int? numPages = default(int?), int? pageSize = default(int?), string nextPageUri = default(string), List brands = default(List)) + public SMSTollFreeCampaignsListResult( + int? total = default(int?), + int? start = default(int?), + int? end = default(int?), + int? page = default(int?), + int? numPages = default(int?), + int? pageSize = default(int?), + string nextPageUri = default(string), + List brands = default(List) + ) { this.Total = total; + this.Start = start; + this.End = end; + this.Page = page; + this.NumPages = numPages; + this.PageSize = pageSize; + this.NextPageUri = nextPageUri; + this.Brands = brands; } @@ -138,151 +154,45 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the SMSTollFreeCampaignsListResult instance. + /// Retrieve the KVP Dictionary for the SMSTollFreeCampaignsListResult instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("total", Total); - props.Add("start", Start); - props.Add("end", End); - props.Add("page", Page); - props.Add("numPages", NumPages); - props.Add("pageSize", PageSize); - props.Add("nextPageUri", NextPageUri); + props.Add("total", Total); + props.Add("start", Start); + props.Add("end", End); + props.Add("page", Page); + props.Add("numPages", NumPages); + props.Add("pageSize", PageSize); + props.Add("nextPageUri", NextPageUri); List nested = new List(); foreach (var item in Brands) { nested.Add(item); } - props.Add("brands", nested); + props.Add("brands", nested); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SMSTollFreeCampaignsListResult); - } - - /// - /// Returns true if SMSTollFreeCampaignsListResult instances are equal - /// - /// Instance of SMSTollFreeCampaignsListResult to be compared - /// Boolean - public bool Equals(SMSTollFreeCampaignsListResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Total == input.Total || - (this.Total != null && - this.Total.Equals(input.Total)) - ) && - ( - this.Start == input.Start || - (this.Start != null && - this.Start.Equals(input.Start)) - ) && - ( - this.End == input.End || - (this.End != null && - this.End.Equals(input.End)) - ) && - ( - this.Page == input.Page || - (this.Page != null && - this.Page.Equals(input.Page)) - ) && - ( - this.NumPages == input.NumPages || - (this.NumPages != null && - this.NumPages.Equals(input.NumPages)) - ) && - ( - this.PageSize == input.PageSize || - (this.PageSize != null && - this.PageSize.Equals(input.PageSize)) - ) && - ( - this.NextPageUri == input.NextPageUri || - (this.NextPageUri != null && - this.NextPageUri.Equals(input.NextPageUri)) - ) && - ( - this.Brands == input.Brands || - this.Brands != null && - input.Brands != null && - this.Brands.SequenceEqual(input.Brands) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Total != null) - { - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - } - if (this.Start != null) - { - hashCode = (hashCode * 59) + this.Start.GetHashCode(); - } - if (this.End != null) - { - hashCode = (hashCode * 59) + this.End.GetHashCode(); - } - if (this.Page != null) - { - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - } - if (this.NumPages != null) - { - hashCode = (hashCode * 59) + this.NumPages.GetHashCode(); - } - if (this.PageSize != null) - { - hashCode = (hashCode * 59) + this.PageSize.GetHashCode(); - } - if (this.NextPageUri != null) - { - hashCode = (hashCode * 59) + this.NextPageUri.GetHashCode(); - } - if (this.Brands != null) - { - hashCode = (hashCode * 59) + this.Brands.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/SMSTollFreeCampaignsListResultAllOf.cs b/src/freeclimb/Model/SMSTollFreeCampaignsListResultAllOf.cs deleted file mode 100644 index 6de3b7f4..00000000 --- a/src/freeclimb/Model/SMSTollFreeCampaignsListResultAllOf.cs +++ /dev/null @@ -1,147 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// SMSTollFreeCampaignsListResultAllOf - /// - [DataContract(Name = "SMSTollFreeCampaignsListResult_allOf")] - public partial class SMSTollFreeCampaignsListResultAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// brands. - public SMSTollFreeCampaignsListResultAllOf(List brands = default(List)) - { - this.Brands = brands; - } - - /// - /// Gets or Sets Brands - /// - [DataMember(Name = "brands", EmitDefaultValue = true)] - public List Brands { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SMSTollFreeCampaignsListResultAllOf {\n"); - sb.Append(" Brands: ").Append(Brands).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the SMSTollFreeCampaignsListResultAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - List nested = new List(); - foreach (var item in Brands) - { - nested.Add(item); - } - props.Add("brands", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SMSTollFreeCampaignsListResultAllOf); - } - - /// - /// Returns true if SMSTollFreeCampaignsListResultAllOf instances are equal - /// - /// Instance of SMSTollFreeCampaignsListResultAllOf to be compared - /// Boolean - public bool Equals(SMSTollFreeCampaignsListResultAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Brands == input.Brands || - this.Brands != null && - input.Brands != null && - this.Brands.SequenceEqual(input.Brands) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Brands != null) - { - hashCode = (hashCode * 59) + this.Brands.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/Say.cs b/src/freeclimb/Model/Say.cs index 0ccb0a2f..b296004c 100644 --- a/src/freeclimb/Model/Say.cs +++ b/src/freeclimb/Model/Say.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,39 +33,14 @@ namespace freeclimb.Model /// [DataContract(Name = "Say")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class Say : PerclCommand, IEquatable, IValidatableObject + public partial class Say : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected Say() { } + /// /// Initializes a new instance of the class. /// @@ -74,15 +49,28 @@ protected Say() { } /// Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up. (default to 1). /// Parameter `privacyMode` will not log the `text` as required by PCI compliance.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "Say"). - public Say(string text = default(string), string language = default(string), int loop = 1, bool privacyMode = default(bool), string command = "Say") : base(command) + public Say( + string text = default(string), + string language = default(string), + int loop = 1, + bool privacyMode = default(bool), + string command = @"Say" + ) + : base(command) { // to ensure "text" is required (not null) - if (text == null) { - throw new ArgumentNullException("text is a required property for Say and cannot be null"); + if (text == null) + { + throw new ArgumentNullException( + "text is a required property for Say and cannot be null" + ); } this.Text = text; + this.Language = language; + this.Loop = loop; + this.PrivacyMode = privacyMode; } @@ -90,7 +78,7 @@ protected Say() { } /// 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. /// /// 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. - [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] public string Text { get; set; } /// @@ -147,92 +135,29 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the Say instance. + /// Retrieve the KVP Dictionary for the Say instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("text", Text); - props.Add("language", Language); - props.Add("loop", Loop); - props.Add("privacyMode", PrivacyMode); + props.Add("text", Text); + props.Add("language", Language); + props.Add("loop", Loop); + props.Add("privacyMode", PrivacyMode); IDictionary command = new Dictionary(); - command.Add("Say",props); + command.Add("Say", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Say); - } - - /// - /// Returns true if Say instances are equal - /// - /// Instance of Say to be compared - /// Boolean - public bool Equals(Say input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ) && base.Equals(input) && - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ) && base.Equals(input) && - ( - this.Loop == input.Loop || - this.Loop.Equals(input.Loop) - ) && base.Equals(input) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } - if (this.Language != null) - { - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Loop.GetHashCode(); - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -242,14 +167,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/SayAllOf.cs b/src/freeclimb/Model/SayAllOf.cs deleted file mode 100644 index a15e7564..00000000 --- a/src/freeclimb/Model/SayAllOf.cs +++ /dev/null @@ -1,203 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// SayAllOf - /// - [DataContract(Name = "Say_allOf")] - public partial class SayAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SayAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// 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.. - /// Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up. (default to 1). - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance.. - public SayAllOf(string text = default(string), string language = default(string), int loop = 1, bool privacyMode = default(bool)) - { - // to ensure "text" is required (not null) - if (text == null) { - throw new ArgumentNullException("text is a required property for SayAllOf and cannot be null"); - } - this.Text = text; - this.Language = language; - this.Loop = loop; - this.PrivacyMode = privacyMode; - } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = false)] - public string Text { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "language", EmitDefaultValue = false)] - public string Language { get; set; } - - /// - /// Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up. - /// - /// Number of times the text is said. Specifying '0' causes the `Say` action to loop until the Call is hung up. - [DataMember(Name = "loop", EmitDefaultValue = false)] - public int Loop { get; set; } - - /// - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance. - /// - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance. - [DataMember(Name = "privacyMode", EmitDefaultValue = true)] - public bool PrivacyMode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SayAllOf {\n"); - sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" Loop: ").Append(Loop).Append("\n"); - sb.Append(" PrivacyMode: ").Append(PrivacyMode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the SayAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("text", Text); - props.Add("language", Language); - props.Add("loop", Loop); - props.Add("privacyMode", PrivacyMode); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SayAllOf); - } - - /// - /// Returns true if SayAllOf instances are equal - /// - /// Instance of SayAllOf to be compared - /// Boolean - public bool Equals(SayAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ) && - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ) && - ( - this.Loop == input.Loop || - this.Loop.Equals(input.Loop) - ) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } - if (this.Language != null) - { - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Loop.GetHashCode(); - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/SendDigits.cs b/src/freeclimb/Model/SendDigits.cs index 91907243..4e318073 100644 --- a/src/freeclimb/Model/SendDigits.cs +++ b/src/freeclimb/Model/SendDigits.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,39 +33,14 @@ namespace freeclimb.Model /// [DataContract(Name = "SendDigits")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class SendDigits : PerclCommand, IEquatable, IValidatableObject + public partial class SendDigits : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected SendDigits() { } + /// /// Initializes a new instance of the class. /// @@ -73,14 +48,25 @@ protected SendDigits() { } /// Pause between digits in milliseconds. Valid values are 100-1000 milliseconds and will be adjusted by FreeClimb to satisfy the constraint.. /// Parameter `privacyMode` will not log the `text` as required by PCI compliance.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "SendDigits"). - public SendDigits(string digits = default(string), int pauseMs = default(int), bool privacyMode = default(bool), string command = "SendDigits") : base(command) + public SendDigits( + string digits = default(string), + int pauseMs = default(int), + bool privacyMode = default(bool), + string command = @"SendDigits" + ) + : base(command) { // to ensure "digits" is required (not null) - if (digits == null) { - throw new ArgumentNullException("digits is a required property for SendDigits and cannot be null"); + if (digits == null) + { + throw new ArgumentNullException( + "digits is a required property for SendDigits and cannot be null" + ); } this.Digits = digits; + this.PauseMs = pauseMs; + this.PrivacyMode = privacyMode; } @@ -88,7 +74,7 @@ protected SendDigits() { } /// 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. /// /// 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. - [DataMember(Name = "digits", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "digits", IsRequired = true, EmitDefaultValue = true)] public string Digits { get; set; } /// @@ -137,82 +123,28 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the SendDigits instance. + /// Retrieve the KVP Dictionary for the SendDigits instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("digits", Digits); - props.Add("pauseMs", PauseMs); - props.Add("privacyMode", PrivacyMode); + props.Add("digits", Digits); + props.Add("pauseMs", PauseMs); + props.Add("privacyMode", PrivacyMode); IDictionary command = new Dictionary(); - command.Add("SendDigits",props); + command.Add("SendDigits", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendDigits); - } - - /// - /// Returns true if SendDigits instances are equal - /// - /// Instance of SendDigits to be compared - /// Boolean - public bool Equals(SendDigits input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.Digits == input.Digits || - (this.Digits != null && - this.Digits.Equals(input.Digits)) - ) && base.Equals(input) && - ( - this.PauseMs == input.PauseMs || - this.PauseMs.Equals(input.PauseMs) - ) && base.Equals(input) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Digits != null) - { - hashCode = (hashCode * 59) + this.Digits.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PauseMs.GetHashCode(); - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -222,14 +154,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/SendDigitsAllOf.cs b/src/freeclimb/Model/SendDigitsAllOf.cs deleted file mode 100644 index ad81e71a..00000000 --- a/src/freeclimb/Model/SendDigitsAllOf.cs +++ /dev/null @@ -1,183 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// SendDigitsAllOf - /// - [DataContract(Name = "SendDigits_allOf")] - public partial class SendDigitsAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SendDigitsAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// 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. (required). - /// Pause between digits in milliseconds. Valid values are 100-1000 milliseconds and will be adjusted by FreeClimb to satisfy the constraint.. - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance.. - public SendDigitsAllOf(string digits = default(string), int pauseMs = default(int), bool privacyMode = default(bool)) - { - // to ensure "digits" is required (not null) - if (digits == null) { - throw new ArgumentNullException("digits is a required property for SendDigitsAllOf and cannot be null"); - } - this.Digits = digits; - this.PauseMs = pauseMs; - this.PrivacyMode = privacyMode; - } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "digits", IsRequired = true, EmitDefaultValue = false)] - public string Digits { get; set; } - - /// - /// Pause between digits in milliseconds. Valid values are 100-1000 milliseconds and will be adjusted by FreeClimb to satisfy the constraint. - /// - /// Pause between digits in milliseconds. Valid values are 100-1000 milliseconds and will be adjusted by FreeClimb to satisfy the constraint. - [DataMember(Name = "pauseMs", EmitDefaultValue = false)] - public int PauseMs { get; set; } - - /// - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance. - /// - /// Parameter `privacyMode` will not log the `text` as required by PCI compliance. - [DataMember(Name = "privacyMode", EmitDefaultValue = true)] - public bool PrivacyMode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SendDigitsAllOf {\n"); - sb.Append(" Digits: ").Append(Digits).Append("\n"); - sb.Append(" PauseMs: ").Append(PauseMs).Append("\n"); - sb.Append(" PrivacyMode: ").Append(PrivacyMode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the SendDigitsAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("digits", Digits); - props.Add("pauseMs", PauseMs); - props.Add("privacyMode", PrivacyMode); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SendDigitsAllOf); - } - - /// - /// Returns true if SendDigitsAllOf instances are equal - /// - /// Instance of SendDigitsAllOf to be compared - /// Boolean - public bool Equals(SendDigitsAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Digits == input.Digits || - (this.Digits != null && - this.Digits.Equals(input.Digits)) - ) && - ( - this.PauseMs == input.PauseMs || - this.PauseMs.Equals(input.PauseMs) - ) && - ( - this.PrivacyMode == input.PrivacyMode || - this.PrivacyMode.Equals(input.PrivacyMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Digits != null) - { - hashCode = (hashCode * 59) + this.Digits.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PauseMs.GetHashCode(); - hashCode = (hashCode * 59) + this.PrivacyMode.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/SetDTMFPassThrough.cs b/src/freeclimb/Model/SetDTMFPassThrough.cs index 2e16d0aa..e3fcce86 100644 --- a/src/freeclimb/Model/SetDTMFPassThrough.cs +++ b/src/freeclimb/Model/SetDTMFPassThrough.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,40 +33,18 @@ namespace freeclimb.Model /// [DataContract(Name = "SetDTMFPassThrough")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class SetDTMFPassThrough : PerclCommand, IEquatable, IValidatableObject + public partial class SetDTMFPassThrough : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// /// Specifying `false` mutes the Participant's dtmf audio.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "SetDTMFPassThrough"). - public SetDTMFPassThrough(bool dtmfPassThrough = default(bool), string command = "SetDTMFPassThrough") : base(command) + public SetDTMFPassThrough( + bool dtmfPassThrough = default(bool), + string command = @"SetDTMFPassThrough" + ) + : base(command) { this.DtmfPassThrough = dtmfPassThrough; } @@ -108,66 +86,26 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the SetDTMFPassThrough instance. + /// Retrieve the KVP Dictionary for the SetDTMFPassThrough instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("dtmfPassThrough", DtmfPassThrough); + props.Add("dtmfPassThrough", DtmfPassThrough); IDictionary command = new Dictionary(); - command.Add("SetDTMFPassThrough",props); + command.Add("SetDTMFPassThrough", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetDTMFPassThrough); - } - - /// - /// Returns true if SetDTMFPassThrough instances are equal - /// - /// Instance of SetDTMFPassThrough to be compared - /// Boolean - public bool Equals(SetDTMFPassThrough input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.DtmfPassThrough == input.DtmfPassThrough || - this.DtmfPassThrough.Equals(input.DtmfPassThrough) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.DtmfPassThrough.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -177,14 +115,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/SetDTMFPassThroughAllOf.cs b/src/freeclimb/Model/SetDTMFPassThroughAllOf.cs deleted file mode 100644 index 6fdd6d58..00000000 --- a/src/freeclimb/Model/SetDTMFPassThroughAllOf.cs +++ /dev/null @@ -1,138 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// SetDTMFPassThroughAllOf - /// - [DataContract(Name = "SetDTMFPassThrough_allOf")] - public partial class SetDTMFPassThroughAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Specifying `false` mutes the Participant's dtmf audio.. - public SetDTMFPassThroughAllOf(bool dtmfPassThrough = default(bool)) - { - this.DtmfPassThrough = dtmfPassThrough; - } - - /// - /// Specifying `false` mutes the Participant's dtmf audio. - /// - /// Specifying `false` mutes the Participant's dtmf audio. - [DataMember(Name = "dtmfPassThrough", EmitDefaultValue = true)] - public bool DtmfPassThrough { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SetDTMFPassThroughAllOf {\n"); - sb.Append(" DtmfPassThrough: ").Append(DtmfPassThrough).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the SetDTMFPassThroughAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("dtmfPassThrough", DtmfPassThrough); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetDTMFPassThroughAllOf); - } - - /// - /// Returns true if SetDTMFPassThroughAllOf instances are equal - /// - /// Instance of SetDTMFPassThroughAllOf to be compared - /// Boolean - public bool Equals(SetDTMFPassThroughAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.DtmfPassThrough == input.DtmfPassThrough || - this.DtmfPassThrough.Equals(input.DtmfPassThrough) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.DtmfPassThrough.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/SetListen.cs b/src/freeclimb/Model/SetListen.cs index 9e64b62a..222305d4 100644 --- a/src/freeclimb/Model/SetListen.cs +++ b/src/freeclimb/Model/SetListen.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,40 +33,15 @@ namespace freeclimb.Model /// [DataContract(Name = "SetListen")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class SetListen : PerclCommand, IEquatable, IValidatableObject + public partial class SetListen : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// /// Specifying `false` will silence the Conference for this Participant.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "SetListen"). - public SetListen(bool listen = default(bool), string command = "SetListen") : base(command) + public SetListen(bool listen = default(bool), string command = @"SetListen") + : base(command) { this.Listen = listen; } @@ -108,66 +83,26 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the SetListen instance. + /// Retrieve the KVP Dictionary for the SetListen instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("listen", Listen); + props.Add("listen", Listen); IDictionary command = new Dictionary(); - command.Add("SetListen",props); + command.Add("SetListen", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetListen); - } - - /// - /// Returns true if SetListen instances are equal - /// - /// Instance of SetListen to be compared - /// Boolean - public bool Equals(SetListen input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.Listen == input.Listen || - this.Listen.Equals(input.Listen) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.Listen.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -177,14 +112,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/SetListenAllOf.cs b/src/freeclimb/Model/SetListenAllOf.cs deleted file mode 100644 index c7feb130..00000000 --- a/src/freeclimb/Model/SetListenAllOf.cs +++ /dev/null @@ -1,138 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// SetListenAllOf - /// - [DataContract(Name = "SetListen_allOf")] - public partial class SetListenAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Specifying `false` will silence the Conference for this Participant.. - public SetListenAllOf(bool listen = default(bool)) - { - this.Listen = listen; - } - - /// - /// Specifying `false` will silence the Conference for this Participant. - /// - /// Specifying `false` will silence the Conference for this Participant. - [DataMember(Name = "listen", EmitDefaultValue = true)] - public bool Listen { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SetListenAllOf {\n"); - sb.Append(" Listen: ").Append(Listen).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the SetListenAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("listen", Listen); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetListenAllOf); - } - - /// - /// Returns true if SetListenAllOf instances are equal - /// - /// Instance of SetListenAllOf to be compared - /// Boolean - public bool Equals(SetListenAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Listen == input.Listen || - this.Listen.Equals(input.Listen) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Listen.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/SetTalk.cs b/src/freeclimb/Model/SetTalk.cs index 2999b884..f1a97526 100644 --- a/src/freeclimb/Model/SetTalk.cs +++ b/src/freeclimb/Model/SetTalk.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,40 +33,15 @@ namespace freeclimb.Model /// [DataContract(Name = "SetTalk")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class SetTalk : PerclCommand, IEquatable, IValidatableObject + public partial class SetTalk : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// /// Specifying `false` mutes the Participant.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "SetTalk"). - public SetTalk(bool talk = default(bool), string command = "SetTalk") : base(command) + public SetTalk(bool talk = default(bool), string command = @"SetTalk") + : base(command) { this.Talk = talk; } @@ -108,66 +83,26 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the SetTalk instance. + /// Retrieve the KVP Dictionary for the SetTalk instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("talk", Talk); + props.Add("talk", Talk); IDictionary command = new Dictionary(); - command.Add("SetTalk",props); + command.Add("SetTalk", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetTalk); - } - - /// - /// Returns true if SetTalk instances are equal - /// - /// Instance of SetTalk to be compared - /// Boolean - public bool Equals(SetTalk input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.Talk == input.Talk || - this.Talk.Equals(input.Talk) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - hashCode = (hashCode * 59) + this.Talk.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -177,14 +112,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/SetTalkAllOf.cs b/src/freeclimb/Model/SetTalkAllOf.cs deleted file mode 100644 index 95360430..00000000 --- a/src/freeclimb/Model/SetTalkAllOf.cs +++ /dev/null @@ -1,138 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// SetTalkAllOf - /// - [DataContract(Name = "SetTalk_allOf")] - public partial class SetTalkAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Specifying `false` mutes the Participant.. - public SetTalkAllOf(bool talk = default(bool)) - { - this.Talk = talk; - } - - /// - /// Specifying `false` mutes the Participant. - /// - /// Specifying `false` mutes the Participant. - [DataMember(Name = "talk", EmitDefaultValue = true)] - public bool Talk { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SetTalkAllOf {\n"); - sb.Append(" Talk: ").Append(Talk).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the SetTalkAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("talk", Talk); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetTalkAllOf); - } - - /// - /// Returns true if SetTalkAllOf instances are equal - /// - /// Instance of SetTalkAllOf to be compared - /// Boolean - public bool Equals(SetTalkAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Talk == input.Talk || - this.Talk.Equals(input.Talk) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Talk.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/Sms.cs b/src/freeclimb/Model/Sms.cs index 444d96da..b71d97ec 100644 --- a/src/freeclimb/Model/Sms.cs +++ b/src/freeclimb/Model/Sms.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,39 +33,14 @@ namespace freeclimb.Model /// [DataContract(Name = "Sms")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class Sms : PerclCommand, IEquatable, IValidatableObject + public partial class Sms : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected Sms() { } + /// /// Initializes a new instance of the class. /// @@ -74,23 +49,42 @@ protected Sms() { } /// Text contained in the message (maximum 160 characters). (required). /// 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.. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "Sms"). - public Sms(string to = default(string), string from = default(string), string text = default(string), string notificationUrl = default(string), string command = "Sms") : base(command) + public Sms( + string to = default(string), + string from = default(string), + string text = default(string), + string notificationUrl = default(string), + string command = @"Sms" + ) + : base(command) { // to ensure "to" is required (not null) - if (to == null) { - throw new ArgumentNullException("to is a required property for Sms and cannot be null"); + if (to == null) + { + throw new ArgumentNullException( + "to is a required property for Sms and cannot be null" + ); } this.To = to; + // to ensure "from" is required (not null) - if (from == null) { - throw new ArgumentNullException("from is a required property for Sms and cannot be null"); + if (from == null) + { + throw new ArgumentNullException( + "from is a required property for Sms and cannot be null" + ); } this.From = from; + // to ensure "text" is required (not null) - if (text == null) { - throw new ArgumentNullException("text is a required property for Sms and cannot be null"); + if (text == null) + { + throw new ArgumentNullException( + "text is a required property for Sms and cannot be null" + ); } this.Text = text; + this.NotificationUrl = notificationUrl; } @@ -98,21 +92,21 @@ protected Sms() { } /// 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). /// /// 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). - [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] public string To { get; set; } /// /// E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb. /// /// E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = true)] public string From { get; set; } /// /// Text contained in the message (maximum 160 characters). /// /// Text contained in the message (maximum 160 characters). - [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] public string Text { get; set; } /// @@ -155,100 +149,29 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the Sms instance. + /// Retrieve the KVP Dictionary for the Sms instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("to", To); - props.Add("from", From); - props.Add("text", Text); - props.Add("notificationUrl", NotificationUrl); + props.Add("to", To); + props.Add("from", From); + props.Add("text", Text); + props.Add("notificationUrl", NotificationUrl); IDictionary command = new Dictionary(); - command.Add("Sms",props); + command.Add("Sms", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Sms); - } - - /// - /// Returns true if Sms instances are equal - /// - /// Instance of Sms to be compared - /// Boolean - public bool Equals(Sms input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.To == input.To || - (this.To != null && - this.To.Equals(input.To)) - ) && base.Equals(input) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && base.Equals(input) && - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ) && base.Equals(input) && - ( - this.NotificationUrl == input.NotificationUrl || - (this.NotificationUrl != null && - this.NotificationUrl.Equals(input.NotificationUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.To != null) - { - hashCode = (hashCode * 59) + this.To.GetHashCode(); - } - if (this.From != null) - { - hashCode = (hashCode * 59) + this.From.GetHashCode(); - } - if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } - if (this.NotificationUrl != null) - { - hashCode = (hashCode * 59) + this.NotificationUrl.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -258,14 +181,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/SmsAllOf.cs b/src/freeclimb/Model/SmsAllOf.cs deleted file mode 100644 index d72e7bea..00000000 --- a/src/freeclimb/Model/SmsAllOf.cs +++ /dev/null @@ -1,219 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// SmsAllOf - /// - [DataContract(Name = "Sms_allOf")] - public partial class SmsAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SmsAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// 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). (required). - /// E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb. (required). - /// Text contained in the message (maximum 160 characters). (required). - /// 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.. - public SmsAllOf(string to = default(string), string from = default(string), string text = default(string), string notificationUrl = default(string)) - { - // to ensure "to" is required (not null) - if (to == null) { - throw new ArgumentNullException("to is a required property for SmsAllOf and cannot be null"); - } - this.To = to; - // to ensure "from" is required (not null) - if (from == null) { - throw new ArgumentNullException("from is a required property for SmsAllOf and cannot be null"); - } - this.From = from; - // to ensure "text" is required (not null) - if (text == null) { - throw new ArgumentNullException("text is a required property for SmsAllOf and cannot be null"); - } - this.Text = text; - this.NotificationUrl = notificationUrl; - } - - /// - /// 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). - /// - /// 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). - [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = false)] - public string To { get; set; } - - /// - /// E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb. - /// - /// E.164 representation of the phone number to use as the sender. This must be an incoming phone number you have purchased from FreeClimb. - [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = false)] - public string From { get; set; } - - /// - /// Text contained in the message (maximum 160 characters). - /// - /// Text contained in the message (maximum 160 characters). - [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = false)] - public string Text { get; set; } - - /// - /// 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. - /// - /// 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. - [DataMember(Name = "notificationUrl", EmitDefaultValue = false)] - public string NotificationUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SmsAllOf {\n"); - sb.Append(" To: ").Append(To).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append(" NotificationUrl: ").Append(NotificationUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the SmsAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("to", To); - props.Add("from", From); - props.Add("text", Text); - props.Add("notificationUrl", NotificationUrl); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SmsAllOf); - } - - /// - /// Returns true if SmsAllOf instances are equal - /// - /// Instance of SmsAllOf to be compared - /// Boolean - public bool Equals(SmsAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.To == input.To || - (this.To != null && - this.To.Equals(input.To)) - ) && - ( - this.From == input.From || - (this.From != null && - this.From.Equals(input.From)) - ) && - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ) && - ( - this.NotificationUrl == input.NotificationUrl || - (this.NotificationUrl != null && - this.NotificationUrl.Equals(input.NotificationUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.To != null) - { - hashCode = (hashCode * 59) + this.To.GetHashCode(); - } - if (this.From != null) - { - hashCode = (hashCode * 59) + this.From.GetHashCode(); - } - if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } - if (this.NotificationUrl != null) - { - hashCode = (hashCode * 59) + this.NotificationUrl.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/StartRecordCall.cs b/src/freeclimb/Model/StartRecordCall.cs index 30d1e9b0..849399cf 100644 --- a/src/freeclimb/Model/StartRecordCall.cs +++ b/src/freeclimb/Model/StartRecordCall.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,41 +33,14 @@ namespace freeclimb.Model /// [DataContract(Name = "StartRecordCall")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class StartRecordCall : PerclCommand, IEquatable, IValidatableObject + public partial class StartRecordCall : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "StartRecordCall"). - public StartRecordCall(string command = "StartRecordCall") : base(command) - { - } + public StartRecordCall(string command = @"StartRecordCall") + : base(command) { } /// /// Returns the string presentation of the object @@ -98,60 +71,25 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the StartRecordCall instance. + /// Retrieve the KVP Dictionary for the StartRecordCall instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); IDictionary command = new Dictionary(); - command.Add("StartRecordCall",props); + command.Add("StartRecordCall", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StartRecordCall); - } - - /// - /// Returns true if StartRecordCall instances are equal - /// - /// Instance of StartRecordCall to be compared - /// Boolean - public bool Equals(StartRecordCall input) - { - if (input == null) - { - return false; - } - return base.Equals(input); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -161,14 +99,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/TFN.cs b/src/freeclimb/Model/TFN.cs index bb0485d8..85c54ade 100644 --- a/src/freeclimb/Model/TFN.cs +++ b/src/freeclimb/Model/TFN.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,13 +31,14 @@ namespace freeclimb.Model /// TollFree Campaign details for this number /// [DataContract(Name = "TFN")] - public partial class TFN : IEquatable, IValidatableObject + public partial class TFN : IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected TFN() { } + /// /// Initializes a new instance of the class. /// @@ -45,8 +46,11 @@ protected TFN() { } public TFN(string campaignId = default(string)) { // to ensure "campaignId" is required (not null) - if (campaignId == null) { - throw new ArgumentNullException("campaignId is a required property for TFN and cannot be null"); + if (campaignId == null) + { + throw new ArgumentNullException( + "campaignId is a required property for TFN and cannot be null" + ); } this.CampaignId = campaignId; } @@ -55,7 +59,7 @@ protected TFN() { } /// alphanumeric identifier for the TollFree campaign associated with this number /// /// alphanumeric identifier for the TollFree campaign associated with this number - [DataMember(Name = "campaignId", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "campaignId", IsRequired = true, EmitDefaultValue = true)] public string CampaignId { get; set; } /// @@ -77,75 +81,33 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the TFN instance. + /// Retrieve the KVP Dictionary for the TFN instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("campaignId", CampaignId); + props.Add("campaignId", CampaignId); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TFN); - } - - /// - /// Returns true if TFN instances are equal - /// - /// Instance of TFN to be compared - /// Boolean - public bool Equals(TFN input) - { - if (input == null) - { - return false; - } - return - ( - this.CampaignId == input.CampaignId || - (this.CampaignId != null && - this.CampaignId.Equals(input.CampaignId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CampaignId != null) - { - hashCode = (hashCode * 59) + this.CampaignId.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/TerminateConference.cs b/src/freeclimb/Model/TerminateConference.cs index 1846ff8b..fee9507e 100644 --- a/src/freeclimb/Model/TerminateConference.cs +++ b/src/freeclimb/Model/TerminateConference.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,41 +33,14 @@ namespace freeclimb.Model /// [DataContract(Name = "TerminateConference")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class TerminateConference : PerclCommand, IEquatable, IValidatableObject + public partial class TerminateConference : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "TerminateConference"). - public TerminateConference(string command = "TerminateConference") : base(command) - { - } + public TerminateConference(string command = @"TerminateConference") + : base(command) { } /// /// Returns the string presentation of the object @@ -98,60 +71,25 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the TerminateConference instance. + /// Retrieve the KVP Dictionary for the TerminateConference instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); IDictionary command = new Dictionary(); - command.Add("TerminateConference",props); + command.Add("TerminateConference", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminateConference); - } - - /// - /// Returns true if TerminateConference instances are equal - /// - /// Instance of TerminateConference to be compared - /// Boolean - public bool Equals(TerminateConference input) - { - if (input == null) - { - return false; - } - return base.Equals(input); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -161,14 +99,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/TranscribeUtterance.cs b/src/freeclimb/Model/TranscribeUtterance.cs index 9a992efe..a85a51b4 100644 --- a/src/freeclimb/Model/TranscribeUtterance.cs +++ b/src/freeclimb/Model/TranscribeUtterance.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,39 +33,14 @@ namespace freeclimb.Model /// [DataContract(Name = "TranscribeUtterance")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class TranscribeUtterance : PerclCommand, IEquatable, IValidatableObject + public partial class TranscribeUtterance : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected TranscribeUtterance() { } + /// /// Initializes a new instance of the class. /// @@ -76,24 +51,41 @@ protected TranscribeUtterance() { } /// privacyForRecording (default to false). /// prompts. /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "TranscribeUtterance"). - public TranscribeUtterance(string actionUrl = default(string), bool playBeep = false, TranscribeUtteranceAllOfRecord record = default(TranscribeUtteranceAllOfRecord), bool privacyForLogging = false, bool privacyForRecording = false, List prompts = default(List), string command = "TranscribeUtterance") : base(command) + public TranscribeUtterance( + string actionUrl = default(string), + bool playBeep = false, + TranscribeUtteranceRecord record = default(TranscribeUtteranceRecord), + bool privacyForLogging = false, + bool privacyForRecording = false, + List prompts = default(List), + string command = @"TranscribeUtterance" + ) + : base(command) { // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for TranscribeUtterance and cannot be null"); + if (actionUrl == null) + { + throw new ArgumentNullException( + "actionUrl is a required property for TranscribeUtterance and cannot be null" + ); } this.ActionUrl = actionUrl; + this.PlayBeep = playBeep; + this.Record = record; + this.PrivacyForLogging = privacyForLogging; + this.PrivacyForRecording = privacyForRecording; + this.Prompts = prompts; } /// /// Gets or Sets ActionUrl /// - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = true)] public string ActionUrl { get; set; } /// @@ -106,7 +98,7 @@ protected TranscribeUtterance() { } /// Gets or Sets Record /// [DataMember(Name = "record", EmitDefaultValue = false)] - public TranscribeUtteranceAllOfRecord Record { get; set; } + public TranscribeUtteranceRecord Record { get; set; } /// /// Gets or Sets PrivacyForLogging @@ -124,7 +116,7 @@ protected TranscribeUtterance() { } /// Gets or Sets Prompts /// [DataMember(Name = "prompts", EmitDefaultValue = false)] - public List Prompts { get; set; } + public List Prompts { get; set; } /// /// Returns the string presentation of the object @@ -161,114 +153,36 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the TranscribeUtterance instance. + /// Retrieve the KVP Dictionary for the TranscribeUtterance instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - props.Add("playBeep", PlayBeep); - props.Add("record", Record); - props.Add("privacyForLogging", PrivacyForLogging); - props.Add("privacyForRecording", PrivacyForRecording); + props.Add("actionUrl", ActionUrl); + props.Add("playBeep", PlayBeep); + props.Add("record", Record); + props.Add("privacyForLogging", PrivacyForLogging); + props.Add("privacyForRecording", PrivacyForRecording); List nested = new List(); foreach (var item in Prompts) { nested.Add(item); } - props.Add("prompts", nested); + props.Add("prompts", nested); IDictionary command = new Dictionary(); - command.Add("TranscribeUtterance",props); + command.Add("TranscribeUtterance", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TranscribeUtterance); - } - - /// - /// Returns true if TranscribeUtterance instances are equal - /// - /// Instance of TranscribeUtterance to be compared - /// Boolean - public bool Equals(TranscribeUtterance input) - { - if (input == null) - { - return false; - } - return base.Equals(input) && - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && base.Equals(input) && - ( - this.PlayBeep == input.PlayBeep || - this.PlayBeep.Equals(input.PlayBeep) - ) && base.Equals(input) && - ( - this.Record == input.Record || - (this.Record != null && - this.Record.Equals(input.Record)) - ) && base.Equals(input) && - ( - this.PrivacyForLogging == input.PrivacyForLogging || - this.PrivacyForLogging.Equals(input.PrivacyForLogging) - ) && base.Equals(input) && - ( - this.PrivacyForRecording == input.PrivacyForRecording || - this.PrivacyForRecording.Equals(input.PrivacyForRecording) - ) && base.Equals(input) && - ( - this.Prompts == input.Prompts || - this.Prompts != null && - input.Prompts != null && - this.Prompts.SequenceEqual(input.Prompts) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PlayBeep.GetHashCode(); - if (this.Record != null) - { - hashCode = (hashCode * 59) + this.Record.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PrivacyForLogging.GetHashCode(); - hashCode = (hashCode * 59) + this.PrivacyForRecording.GetHashCode(); - if (this.Prompts != null) - { - hashCode = (hashCode * 59) + this.Prompts.GetHashCode(); - } - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -278,14 +192,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/TranscribeUtteranceAllOf.cs b/src/freeclimb/Model/TranscribeUtteranceAllOf.cs deleted file mode 100644 index bec589a3..00000000 --- a/src/freeclimb/Model/TranscribeUtteranceAllOf.cs +++ /dev/null @@ -1,239 +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. - * - * The version of the OpenAPI document: 1.0.0 - * Contact: support@freeclimb.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; - -namespace freeclimb.Model -{ - /// - /// 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. - /// - [DataContract(Name = "TranscribeUtterance_allOf")] - public partial class TranscribeUtteranceAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TranscribeUtteranceAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// actionUrl (required). - /// playBeep (default to false). - /// record. - /// privacyForLogging (default to false). - /// privacyForRecording (default to false). - /// prompts. - public TranscribeUtteranceAllOf(string actionUrl = default(string), bool playBeep = false, TranscribeUtteranceAllOfRecord record = default(TranscribeUtteranceAllOfRecord), bool privacyForLogging = false, bool privacyForRecording = false, List prompts = default(List)) - { - // to ensure "actionUrl" is required (not null) - if (actionUrl == null) { - throw new ArgumentNullException("actionUrl is a required property for TranscribeUtteranceAllOf and cannot be null"); - } - this.ActionUrl = actionUrl; - this.PlayBeep = playBeep; - this.Record = record; - this.PrivacyForLogging = privacyForLogging; - this.PrivacyForRecording = privacyForRecording; - this.Prompts = prompts; - } - - /// - /// Gets or Sets ActionUrl - /// - [DataMember(Name = "actionUrl", IsRequired = true, EmitDefaultValue = false)] - public string ActionUrl { get; set; } - - /// - /// Gets or Sets PlayBeep - /// - [DataMember(Name = "playBeep", EmitDefaultValue = true)] - public bool PlayBeep { get; set; } - - /// - /// Gets or Sets Record - /// - [DataMember(Name = "record", EmitDefaultValue = false)] - public TranscribeUtteranceAllOfRecord Record { get; set; } - - /// - /// Gets or Sets PrivacyForLogging - /// - [DataMember(Name = "privacyForLogging", EmitDefaultValue = true)] - public bool PrivacyForLogging { get; set; } - - /// - /// Gets or Sets PrivacyForRecording - /// - [DataMember(Name = "privacyForRecording", EmitDefaultValue = true)] - public bool PrivacyForRecording { get; set; } - - /// - /// Gets or Sets Prompts - /// - [DataMember(Name = "prompts", EmitDefaultValue = false)] - public List Prompts { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TranscribeUtteranceAllOf {\n"); - sb.Append(" ActionUrl: ").Append(ActionUrl).Append("\n"); - sb.Append(" PlayBeep: ").Append(PlayBeep).Append("\n"); - sb.Append(" Record: ").Append(Record).Append("\n"); - sb.Append(" PrivacyForLogging: ").Append(PrivacyForLogging).Append("\n"); - sb.Append(" PrivacyForRecording: ").Append(PrivacyForRecording).Append("\n"); - sb.Append(" Prompts: ").Append(Prompts).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Retrieve the KVP Dictionary for the TranscribeUtteranceAllOf instance. - /// - /// KVP Dictionary - public virtual IDictionary ToKvp() - { - IDictionary props = new Dictionary(); - props.Add("actionUrl", ActionUrl); - props.Add("playBeep", PlayBeep); - props.Add("record", Record); - props.Add("privacyForLogging", PrivacyForLogging); - props.Add("privacyForRecording", PrivacyForRecording); - List nested = new List(); - foreach (var item in Prompts) - { - nested.Add(item); - } - props.Add("prompts", nested); - return props; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TranscribeUtteranceAllOf); - } - - /// - /// Returns true if TranscribeUtteranceAllOf instances are equal - /// - /// Instance of TranscribeUtteranceAllOf to be compared - /// Boolean - public bool Equals(TranscribeUtteranceAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.ActionUrl == input.ActionUrl || - (this.ActionUrl != null && - this.ActionUrl.Equals(input.ActionUrl)) - ) && - ( - this.PlayBeep == input.PlayBeep || - this.PlayBeep.Equals(input.PlayBeep) - ) && - ( - this.Record == input.Record || - (this.Record != null && - this.Record.Equals(input.Record)) - ) && - ( - this.PrivacyForLogging == input.PrivacyForLogging || - this.PrivacyForLogging.Equals(input.PrivacyForLogging) - ) && - ( - this.PrivacyForRecording == input.PrivacyForRecording || - this.PrivacyForRecording.Equals(input.PrivacyForRecording) - ) && - ( - this.Prompts == input.Prompts || - this.Prompts != null && - input.Prompts != null && - this.Prompts.SequenceEqual(input.Prompts) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActionUrl != null) - { - hashCode = (hashCode * 59) + this.ActionUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PlayBeep.GetHashCode(); - if (this.Record != null) - { - hashCode = (hashCode * 59) + this.Record.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PrivacyForLogging.GetHashCode(); - hashCode = (hashCode * 59) + this.PrivacyForRecording.GetHashCode(); - if (this.Prompts != null) - { - hashCode = (hashCode * 59) + this.Prompts.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/freeclimb/Model/TranscribeUtteranceAllOfRecord.cs b/src/freeclimb/Model/TranscribeUtteranceRecord.cs similarity index 53% rename from src/freeclimb/Model/TranscribeUtteranceAllOfRecord.cs rename to src/freeclimb/Model/TranscribeUtteranceRecord.cs index b6725f6c..7911375b 100644 --- a/src/freeclimb/Model/TranscribeUtteranceAllOfRecord.cs +++ b/src/freeclimb/Model/TranscribeUtteranceRecord.cs @@ -13,36 +13,42 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { /// - /// TranscribeUtteranceAllOfRecord + /// TranscribeUtteranceRecord /// - [DataContract(Name = "TranscribeUtterance_allOf_record")] - public partial class TranscribeUtteranceAllOfRecord : IEquatable, IValidatableObject + [DataContract(Name = "TranscribeUtteranceRecord")] + public partial class TranscribeUtteranceRecord : IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// saveRecording (default to false). /// maxLengthSec (default to 60). /// rcrdTerminationSilenceTimeMs. - public TranscribeUtteranceAllOfRecord(bool saveRecording = false, int maxLengthSec = 60, int rcrdTerminationSilenceTimeMs = default(int)) + public TranscribeUtteranceRecord( + bool saveRecording = false, + int maxLengthSec = 60, + int rcrdTerminationSilenceTimeMs = default(int) + ) { this.SaveRecording = saveRecording; + this.MaxLengthSec = maxLengthSec; + this.RcrdTerminationSilenceTimeMs = rcrdTerminationSilenceTimeMs; } @@ -71,10 +77,12 @@ public partial class TranscribeUtteranceAllOfRecord : IEquatableJSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the TranscribeUtteranceAllOfRecord instance. + /// Retrieve the KVP Dictionary for the TranscribeUtteranceRecord instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("saveRecording", SaveRecording); - props.Add("maxLengthSec", MaxLengthSec); - props.Add("rcrdTerminationSilenceTimeMs", RcrdTerminationSilenceTimeMs); + props.Add("saveRecording", SaveRecording); + props.Add("maxLengthSec", MaxLengthSec); + props.Add("rcrdTerminationSilenceTimeMs", RcrdTerminationSilenceTimeMs); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TranscribeUtteranceAllOfRecord); - } - - /// - /// Returns true if TranscribeUtteranceAllOfRecord instances are equal - /// - /// Instance of TranscribeUtteranceAllOfRecord to be compared - /// Boolean - public bool Equals(TranscribeUtteranceAllOfRecord input) - { - if (input == null) - { - return false; - } - return - ( - this.SaveRecording == input.SaveRecording || - this.SaveRecording.Equals(input.SaveRecording) - ) && - ( - this.MaxLengthSec == input.MaxLengthSec || - this.MaxLengthSec.Equals(input.MaxLengthSec) - ) && - ( - this.RcrdTerminationSilenceTimeMs == input.RcrdTerminationSilenceTimeMs || - this.RcrdTerminationSilenceTimeMs.Equals(input.RcrdTerminationSilenceTimeMs) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.SaveRecording.GetHashCode(); - hashCode = (hashCode * 59) + this.MaxLengthSec.GetHashCode(); - hashCode = (hashCode * 59) + this.RcrdTerminationSilenceTimeMs.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { // MaxLengthSec (int) maximum if (this.MaxLengthSec > (int)60) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MaxLengthSec, must be a value less than or equal to 60.", new [] { "MaxLengthSec" }); + yield return new ValidationResult( + "Invalid value for MaxLengthSec, must be a value less than or equal to 60.", + new[] { "MaxLengthSec" } + ); } // MaxLengthSec (int) minimum if (this.MaxLengthSec < (int)1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MaxLengthSec, must be a value greater than or equal to 1.", new [] { "MaxLengthSec" }); + yield return new ValidationResult( + "Invalid value for MaxLengthSec, must be a value greater than or equal to 1.", + new[] { "MaxLengthSec" } + ); } // RcrdTerminationSilenceTimeMs (int) maximum if (this.RcrdTerminationSilenceTimeMs > (int)3000) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RcrdTerminationSilenceTimeMs, must be a value less than or equal to 3000.", new [] { "RcrdTerminationSilenceTimeMs" }); + yield return new ValidationResult( + "Invalid value for RcrdTerminationSilenceTimeMs, must be a value less than or equal to 3000.", + new[] { "RcrdTerminationSilenceTimeMs" } + ); } // RcrdTerminationSilenceTimeMs (int) minimum - if (this.RcrdTerminationSilenceTimeMs < (int)0) + if (this.RcrdTerminationSilenceTimeMs < (int)1) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RcrdTerminationSilenceTimeMs, must be a value greater than or equal to 0.", new [] { "RcrdTerminationSilenceTimeMs" }); + yield return new ValidationResult( + "Invalid value for RcrdTerminationSilenceTimeMs, must be a value greater than or equal to 1.", + new[] { "RcrdTerminationSilenceTimeMs" } + ); } yield break; } } - } diff --git a/src/freeclimb/Model/TranscribeWebhook.cs b/src/freeclimb/Model/TranscribeWebhook.cs new file mode 100644 index 00000000..68bc2b0e --- /dev/null +++ b/src/freeclimb/Model/TranscribeWebhook.cs @@ -0,0 +1,420 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json.Serialization; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// TranscribeWebhook + /// + [DataContract(Name = "TranscribeWebhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + public partial class TranscribeWebhook : Webhook, IValidatableObject + { + /// + /// Gets or Sets TermReason + /// + [DataMember(Name = "termReason", EmitDefaultValue = false)] + public TranscribeTermReason? TermReason { get; set; } + + /// + /// Gets or Sets RecordTermReason + /// + [DataMember(Name = "recordTermReason", EmitDefaultValue = false)] + public RecordUtteranceTermReason? RecordTermReason { get; set; } + + /// + /// Gets or Sets BargeInReason + /// + [DataMember(Name = "bargeInReason", EmitDefaultValue = false)] + public BargeInReason? BargeInReason { get; set; } + + /// + /// Gets or Sets TranscribeReason + /// + [DataMember(Name = "transcribeReason", EmitDefaultValue = false)] + public TranscribeReason? TranscribeReason { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// The context or reason why this request is being made. Will be transcribe - The TranscribeUtterance command has completed and its actionUrl is being invoked. (default to "TranscribeWebhook"). + /// Account ID associated with your account.. + /// Unique identifier for this Call, generated by FreeClimb. + /// Phone number of the party that initiated the Call (in E.164 format).. + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format).. + /// 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.. + /// 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.. + /// The size of the recording in bytes.. + /// The media type of the recording.. + /// The duration of the recorded audio in milliseconds.. + /// termReason. + /// recordTermReason. + /// If recordTermReason is digit, this will be the digit that was pressed. Otherwise it will be null.. + /// 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.. + /// 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. + /// bargedInPromptNo. + /// duration in ms bargedInPromptNo prompt was executing until barge-in occurred.. + /// bargedInPromptLoopNo. + /// epoch time in ms. + /// 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.. + /// transcribeReason. + /// The duration of the audio being transcribed in milliseconds. + public TranscribeWebhook( + string requestType = @"TranscribeWebhook", + string accountId = default(string), + string callId = default(string), + string from = default(string), + string to = default(string), + string recordingId = default(string), + string recordingUrl = default(string), + int recordingSize = default(int), + string recordingFormat = default(string), + int recordingDurationMs = default(int), + TranscribeTermReason? termReason = default(TranscribeTermReason?), + RecordUtteranceTermReason? recordTermReason = default(RecordUtteranceTermReason?), + string digit = default(string), + bool privacyForLogging = default(bool), + bool privacyForRecording = default(bool), + BargeInReason? bargeInReason = default(BargeInReason?), + int bargedInPromptNo = default(int), + int bargedInPromptMs = default(int), + int bargedInPromptLoopNo = default(int), + int bargeInTimeMs = default(int), + string transcript = default(string), + TranscribeReason? transcribeReason = default(TranscribeReason?), + int transcriptionDurationMs = default(int) + ) + : base() + { + base.RequestType = requestType; + + this.AccountId = accountId; + + this.CallId = callId; + + this.From = from; + + this.To = to; + + this.RecordingId = recordingId; + + this.RecordingUrl = recordingUrl; + + this.RecordingSize = recordingSize; + + this.RecordingFormat = recordingFormat; + + this.RecordingDurationMs = recordingDurationMs; + + this.TermReason = termReason; + + this.RecordTermReason = recordTermReason; + + this.Digit = digit; + + this.PrivacyForLogging = privacyForLogging; + + this.PrivacyForRecording = privacyForRecording; + + this.BargeInReason = bargeInReason; + + this.BargedInPromptNo = bargedInPromptNo; + + this.BargedInPromptMs = bargedInPromptMs; + + this.BargedInPromptLoopNo = bargedInPromptLoopNo; + + this.BargeInTimeMs = bargeInTimeMs; + + this.Transcript = transcript; + + this.TranscribeReason = transcribeReason; + + this.TranscriptionDurationMs = transcriptionDurationMs; + } + + private static readonly JsonSerializerSettings _serializerSettings = + new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy { OverrideSpecifiedNames = false }, + }, + }; + + /// + /// Deserializes json payload into instance TranscribeWebhook + /// + /// + /// instanceof RemoveFromQueueNotificationWebhook + public static TranscribeWebhook Deserialize(string jsonPayload) + { + return (TranscribeWebhook) + JsonConvert.DeserializeObject( + jsonPayload, + typeof(TranscribeWebhook), + _serializerSettings + ); + } + + /// + /// Account ID associated with your account. + /// + /// Account ID associated with your account. + [DataMember(Name = "accountId", EmitDefaultValue = false)] + public string AccountId { get; set; } + + /// + /// Unique identifier for this Call, generated by FreeClimb + /// + /// Unique identifier for this Call, generated by FreeClimb + [DataMember(Name = "callId", EmitDefaultValue = false)] + public string CallId { get; set; } + + /// + /// Phone number of the party that initiated the Call (in E.164 format). + /// + /// Phone number of the party that initiated the Call (in E.164 format). + [DataMember(Name = "from", EmitDefaultValue = false)] + public string From { get; set; } + + /// + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format). + /// + /// Phone number provisioned to the customer and to which this Call is directed (in E.164 format). + [DataMember(Name = "to", EmitDefaultValue = false)] + public string To { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "recordingId", EmitDefaultValue = true)] + public string RecordingId { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "recordingUrl", EmitDefaultValue = true)] + public string RecordingUrl { get; set; } + + /// + /// The size of the recording in bytes. + /// + /// The size of the recording in bytes. + [DataMember(Name = "recordingSize", EmitDefaultValue = false)] + public int RecordingSize { get; set; } + + /// + /// The media type of the recording. + /// + /// The media type of the recording. + [DataMember(Name = "recordingFormat", EmitDefaultValue = true)] + public string RecordingFormat { get; set; } + + /// + /// The duration of the recorded audio in milliseconds. + /// + /// The duration of the recorded audio in milliseconds. + [DataMember(Name = "recordingDurationMs", EmitDefaultValue = false)] + public int RecordingDurationMs { get; set; } + + /// + /// If recordTermReason is digit, this will be the digit that was pressed. Otherwise it will be null. + /// + /// If recordTermReason is digit, this will be the digit that was pressed. Otherwise it will be null. + [DataMember(Name = "digit", EmitDefaultValue = true)] + public string Digit { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "privacyForLogging", EmitDefaultValue = true)] + public bool PrivacyForLogging { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "privacyForRecording", EmitDefaultValue = true)] + public bool PrivacyForRecording { get; set; } + + /// + /// Gets or Sets BargedInPromptNo + /// + [DataMember(Name = "bargedInPromptNo", EmitDefaultValue = false)] + public int BargedInPromptNo { get; set; } + + /// + /// duration in ms bargedInPromptNo prompt was executing until barge-in occurred. + /// + /// duration in ms bargedInPromptNo prompt was executing until barge-in occurred. + [DataMember(Name = "bargedInPromptMs", EmitDefaultValue = false)] + public int BargedInPromptMs { get; set; } + + /// + /// Gets or Sets BargedInPromptLoopNo + /// + [DataMember(Name = "bargedInPromptLoopNo", EmitDefaultValue = false)] + public int BargedInPromptLoopNo { get; set; } + + /// + /// epoch time in ms + /// + /// epoch time in ms + [DataMember(Name = "bargeInTimeMs", EmitDefaultValue = false)] + public int BargeInTimeMs { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "transcript", EmitDefaultValue = true)] + public string Transcript { get; set; } + + /// + /// The duration of the audio being transcribed in milliseconds + /// + /// The duration of the audio being transcribed in milliseconds + [DataMember(Name = "transcriptionDurationMs", EmitDefaultValue = false)] + public int TranscriptionDurationMs { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TranscribeWebhook {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append(" AccountId: ").Append(AccountId).Append("\n"); + sb.Append(" CallId: ").Append(CallId).Append("\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" RecordingId: ").Append(RecordingId).Append("\n"); + sb.Append(" RecordingUrl: ").Append(RecordingUrl).Append("\n"); + sb.Append(" RecordingSize: ").Append(RecordingSize).Append("\n"); + sb.Append(" RecordingFormat: ").Append(RecordingFormat).Append("\n"); + sb.Append(" RecordingDurationMs: ").Append(RecordingDurationMs).Append("\n"); + sb.Append(" TermReason: ").Append(TermReason).Append("\n"); + sb.Append(" RecordTermReason: ").Append(RecordTermReason).Append("\n"); + sb.Append(" Digit: ").Append(Digit).Append("\n"); + sb.Append(" PrivacyForLogging: ").Append(PrivacyForLogging).Append("\n"); + sb.Append(" PrivacyForRecording: ").Append(PrivacyForRecording).Append("\n"); + sb.Append(" BargeInReason: ").Append(BargeInReason).Append("\n"); + sb.Append(" BargedInPromptNo: ").Append(BargedInPromptNo).Append("\n"); + sb.Append(" BargedInPromptMs: ").Append(BargedInPromptMs).Append("\n"); + sb.Append(" BargedInPromptLoopNo: ").Append(BargedInPromptLoopNo).Append("\n"); + sb.Append(" BargeInTimeMs: ").Append(BargeInTimeMs).Append("\n"); + sb.Append(" Transcript: ").Append(Transcript).Append("\n"); + sb.Append(" TranscribeReason: ").Append(TranscribeReason).Append("\n"); + sb.Append(" TranscriptionDurationMs: ").Append(TranscriptionDurationMs).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the TranscribeWebhook instance. + /// + /// KVP Dictionary + public override IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + props.Add("accountId", AccountId); + props.Add("callId", CallId); + props.Add("from", From); + props.Add("to", To); + props.Add("recordingId", RecordingId); + props.Add("recordingUrl", RecordingUrl); + props.Add("recordingSize", RecordingSize); + props.Add("recordingFormat", RecordingFormat); + props.Add("recordingDurationMs", RecordingDurationMs); + props.Add("termReason", TermReason); + props.Add("recordTermReason", RecordTermReason); + props.Add("digit", Digit); + props.Add("privacyForLogging", PrivacyForLogging); + props.Add("privacyForRecording", PrivacyForRecording); + props.Add("bargeInReason", BargeInReason); + props.Add("bargedInPromptNo", BargedInPromptNo); + props.Add("bargedInPromptMs", BargedInPromptMs); + props.Add("bargedInPromptLoopNo", BargedInPromptLoopNo); + props.Add("bargeInTimeMs", BargeInTimeMs); + props.Add("transcript", Transcript); + props.Add("transcribeReason", TranscribeReason); + props.Add("transcriptionDurationMs", TranscriptionDurationMs); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; + } + } +} diff --git a/src/freeclimb/Model/Unpark.cs b/src/freeclimb/Model/Unpark.cs index 21501d78..d2340507 100644 --- a/src/freeclimb/Model/Unpark.cs +++ b/src/freeclimb/Model/Unpark.cs @@ -13,18 +13,18 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -33,41 +33,14 @@ namespace freeclimb.Model /// [DataContract(Name = "Unpark")] [JsonConverter(typeof(JsonSubtypes), "Command")] - [JsonSubtypes.KnownSubType(typeof(AddToConference), "AddToConference")] - [JsonSubtypes.KnownSubType(typeof(CreateConference), "CreateConference")] - [JsonSubtypes.KnownSubType(typeof(Dequeue), "Dequeue")] - [JsonSubtypes.KnownSubType(typeof(Enqueue), "Enqueue")] - [JsonSubtypes.KnownSubType(typeof(GetDigits), "GetDigits")] - [JsonSubtypes.KnownSubType(typeof(GetSpeech), "GetSpeech")] - [JsonSubtypes.KnownSubType(typeof(Hangup), "Hangup")] - [JsonSubtypes.KnownSubType(typeof(OutDial), "OutDial")] - [JsonSubtypes.KnownSubType(typeof(Park), "Park")] - [JsonSubtypes.KnownSubType(typeof(Pause), "Pause")] - [JsonSubtypes.KnownSubType(typeof(Play), "Play")] - [JsonSubtypes.KnownSubType(typeof(PlayEarlyMedia), "PlayEarlyMedia")] - [JsonSubtypes.KnownSubType(typeof(RecordUtterance), "RecordUtterance")] - [JsonSubtypes.KnownSubType(typeof(Redirect), "Redirect")] - [JsonSubtypes.KnownSubType(typeof(Reject), "Reject")] - [JsonSubtypes.KnownSubType(typeof(RemoveFromConference), "RemoveFromConference")] - [JsonSubtypes.KnownSubType(typeof(Say), "Say")] - [JsonSubtypes.KnownSubType(typeof(SendDigits), "SendDigits")] - [JsonSubtypes.KnownSubType(typeof(SetDTMFPassThrough), "SetDTMFPassThrough")] - [JsonSubtypes.KnownSubType(typeof(SetListen), "SetListen")] - [JsonSubtypes.KnownSubType(typeof(SetTalk), "SetTalk")] - [JsonSubtypes.KnownSubType(typeof(Sms), "Sms")] - [JsonSubtypes.KnownSubType(typeof(StartRecordCall), "StartRecordCall")] - [JsonSubtypes.KnownSubType(typeof(TerminateConference), "TerminateConference")] - [JsonSubtypes.KnownSubType(typeof(TranscribeUtterance), "TranscribeUtterance")] - [JsonSubtypes.KnownSubType(typeof(Unpark), "Unpark")] - public partial class Unpark : PerclCommand, IEquatable, IValidatableObject + public partial class Unpark : PerclCommand, IValidatableObject { /// /// Initializes a new instance of the class. /// /// Name of PerCL Command (this is automatically derived from mapping configuration and should not be manually supplied in any arguments) (default to "Unpark"). - public Unpark(string command = "Unpark") : base(command) - { - } + public Unpark(string command = @"Unpark") + : base(command) { } /// /// Returns the string presentation of the object @@ -98,60 +71,25 @@ public override string ToJson() } /// - /// Retrieve the KVP Dictionary for the Unpark instance. + /// Retrieve the KVP Dictionary for the Unpark instance. /// /// KVP Dictionary public override IDictionary ToKvp() { IDictionary props = new Dictionary(); IDictionary command = new Dictionary(); - command.Add("Unpark",props); + command.Add("Unpark", props); return command; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Unpark); - } - - /// - /// Returns true if Unpark instances are equal - /// - /// Instance of Unpark to be compared - /// Boolean - public bool Equals(Unpark input) - { - if (input == null) - { - return false; - } - return base.Equals(input); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public override IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { return this.BaseValidate(validationContext); } @@ -161,14 +99,13 @@ public override int GetHashCode() /// /// Validation context /// Validation Result - protected override IEnumerable BaseValidate(ValidationContext validationContext) + protected IEnumerable BaseValidate(ValidationContext validationContext) { - foreach (var x in BaseValidate(validationContext)) + foreach (var x in base.BaseValidate(validationContext)) { yield return x; } yield break; } } - } diff --git a/src/freeclimb/Model/UpdateCallRequest.cs b/src/freeclimb/Model/UpdateCallRequest.cs index a34f5106..915f57cc 100644 --- a/src/freeclimb/Model/UpdateCallRequest.cs +++ b/src/freeclimb/Model/UpdateCallRequest.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,19 +31,20 @@ namespace freeclimb.Model /// UpdateCallRequest /// [DataContract(Name = "UpdateCallRequest")] - public partial class UpdateCallRequest : IEquatable, IValidatableObject + public partial class UpdateCallRequest : IValidatableObject { - /// /// Gets or Sets Status /// - [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] public UpdateCallRequestStatus Status { get; set; } + /// /// Initializes a new instance of the class. /// [JsonConstructorAttribute] protected UpdateCallRequest() { } + /// /// Initializes a new instance of the class. /// @@ -72,71 +73,33 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the UpdateCallRequest instance. + /// Retrieve the KVP Dictionary for the UpdateCallRequest instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("status", Status); + props.Add("status", Status); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateCallRequest); - } - - /// - /// Returns true if UpdateCallRequest instances are equal - /// - /// Instance of UpdateCallRequest to be compared - /// Boolean - public bool Equals(UpdateCallRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/UpdateConferenceParticipantRequest.cs b/src/freeclimb/Model/UpdateConferenceParticipantRequest.cs index 99e5489c..4b344d5b 100644 --- a/src/freeclimb/Model/UpdateConferenceParticipantRequest.cs +++ b/src/freeclimb/Model/UpdateConferenceParticipantRequest.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,7 +31,7 @@ namespace freeclimb.Model /// UpdateConferenceParticipantRequest /// [DataContract(Name = "UpdateConferenceParticipantRequest")] - public partial class UpdateConferenceParticipantRequest : IEquatable, IValidatableObject + public partial class UpdateConferenceParticipantRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -39,10 +39,16 @@ public partial class UpdateConferenceParticipantRequest : IEquatable(Optional) Default is `true`. Setting to `false` mutes the Participant. FreeClimb returns an error and ignores any other value.. /// (Optional) Default is `true`. Setting to `false` silences the Conference for this Participant. FreeClimb returns an error and ignores any other value.. /// (Optional) Default is `true`. Setting to `false` mutes dtmf audio for this Participant. FreeClimb returns an error and ignores any other value.. - public UpdateConferenceParticipantRequest(bool talk = default(bool), bool listen = default(bool), bool dtmfPassThrough = default(bool)) + public UpdateConferenceParticipantRequest( + bool talk = default(bool), + bool listen = default(bool), + bool dtmfPassThrough = default(bool) + ) { this.Talk = talk; + this.Listen = listen; + this.DtmfPassThrough = dtmfPassThrough; } @@ -88,83 +94,35 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the UpdateConferenceParticipantRequest instance. + /// Retrieve the KVP Dictionary for the UpdateConferenceParticipantRequest instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("talk", Talk); - props.Add("listen", Listen); - props.Add("dtmfPassThrough", DtmfPassThrough); + props.Add("talk", Talk); + props.Add("listen", Listen); + props.Add("dtmfPassThrough", DtmfPassThrough); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateConferenceParticipantRequest); - } - - /// - /// Returns true if UpdateConferenceParticipantRequest instances are equal - /// - /// Instance of UpdateConferenceParticipantRequest to be compared - /// Boolean - public bool Equals(UpdateConferenceParticipantRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Talk == input.Talk || - this.Talk.Equals(input.Talk) - ) && - ( - this.Listen == input.Listen || - this.Listen.Equals(input.Listen) - ) && - ( - this.DtmfPassThrough == input.DtmfPassThrough || - this.DtmfPassThrough.Equals(input.DtmfPassThrough) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Talk.GetHashCode(); - hashCode = (hashCode * 59) + this.Listen.GetHashCode(); - hashCode = (hashCode * 59) + this.DtmfPassThrough.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/UpdateConferenceRequest.cs b/src/freeclimb/Model/UpdateConferenceRequest.cs index 17739fdf..f1e348cf 100644 --- a/src/freeclimb/Model/UpdateConferenceRequest.cs +++ b/src/freeclimb/Model/UpdateConferenceRequest.cs @@ -13,17 +13,17 @@ using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.IO; +using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; +using freeclimb.Enums; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; -using freeclimb.Enums; namespace freeclimb.Model { @@ -31,9 +31,8 @@ namespace freeclimb.Model /// UpdateConferenceRequest /// [DataContract(Name = "UpdateConferenceRequest")] - public partial class UpdateConferenceRequest : IEquatable, IValidatableObject + public partial class UpdateConferenceRequest : IValidatableObject { - /// /// Gets or Sets PlayBeep /// @@ -45,16 +44,23 @@ public partial class UpdateConferenceRequest : IEquatable [DataMember(Name = "status", EmitDefaultValue = false)] public UpdateConferenceRequestStatus? Status { get; set; } + /// /// Initializes a new instance of the class. /// /// Description for this conference. Maximum 64 characters.. /// playBeep. /// status. - public UpdateConferenceRequest(string alias = default(string), PlayBeep? playBeep = default(PlayBeep?), UpdateConferenceRequestStatus? status = default(UpdateConferenceRequestStatus?)) + public UpdateConferenceRequest( + string alias = default(string), + PlayBeep? playBeep = default(PlayBeep?), + UpdateConferenceRequestStatus? status = default(UpdateConferenceRequestStatus?) + ) { this.Alias = alias; + this.PlayBeep = playBeep; + this.Status = status; } @@ -86,87 +92,35 @@ public override string ToString() /// JSON string presentation of the object public virtual string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); } /// - /// Retrieve the KVP Dictionary for the UpdateConferenceRequest instance. + /// Retrieve the KVP Dictionary for the UpdateConferenceRequest instance. /// /// KVP Dictionary public virtual IDictionary ToKvp() { IDictionary props = new Dictionary(); - props.Add("alias", Alias); - props.Add("playBeep", PlayBeep); - props.Add("status", Status); + props.Add("alias", Alias); + props.Add("playBeep", PlayBeep); + props.Add("status", Status); return props; } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateConferenceRequest); - } - - /// - /// Returns true if UpdateConferenceRequest instances are equal - /// - /// Instance of UpdateConferenceRequest to be compared - /// Boolean - public bool Equals(UpdateConferenceRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.PlayBeep == input.PlayBeep || - this.PlayBeep.Equals(input.PlayBeep) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PlayBeep.GetHashCode(); - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance /// /// Validation context /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) { yield break; } } - } diff --git a/src/freeclimb/Model/Webhook.cs b/src/freeclimb/Model/Webhook.cs new file mode 100644 index 00000000..c16c1214 --- /dev/null +++ b/src/freeclimb/Model/Webhook.cs @@ -0,0 +1,144 @@ +/* + * FreeClimb API + * + * FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST 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://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using freeclimb.Enums; +using JsonSubTypes; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = freeclimb.Client.OpenAPIDateConverter; + +namespace freeclimb.Model +{ + /// + /// Webhook + /// + [DataContract(Name = "Webhook")] + [JsonConverter(typeof(JsonSubtypes), "RequestType")] + [JsonSubtypes.KnownSubType( + typeof(AddToConferenceNotificationWebhook), + "addToConferenceNotification" + )] + [JsonSubtypes.KnownSubType(typeof(AddToQueueNotificationWebhook), "addToQueueNotification")] + [JsonSubtypes.KnownSubType(typeof(CallControlWebhook), "callControl")] + [JsonSubtypes.KnownSubType(typeof(CallStatusWebhook), "callStatus")] + [JsonSubtypes.KnownSubType( + typeof(ConferenceRecordingStatusWebhook), + "conferenceRecordingStatus" + )] + [JsonSubtypes.KnownSubType(typeof(ConferenceStatusWebhook), "conferenceStatus")] + [JsonSubtypes.KnownSubType(typeof(CreateConferenceWebhook), "createConference")] + [JsonSubtypes.KnownSubType(typeof(DequeueWebhook), "dequeue")] + [JsonSubtypes.KnownSubType(typeof(GetDigitsWebhook), "getDigits")] + [JsonSubtypes.KnownSubType(typeof(GetSpeechWebhook), "getSpeech")] + [JsonSubtypes.KnownSubType(typeof(InboundCallWebhook), "inboundCall")] + [JsonSubtypes.KnownSubType(typeof(LeaveConferenceWebhook), "leaveConference")] + [JsonSubtypes.KnownSubType(typeof(MachineDetectedWebhook), "machineDetected")] + [JsonSubtypes.KnownSubType(typeof(MessageDeliveryWebhook), "messageDelivery")] + [JsonSubtypes.KnownSubType(typeof(MessageStatusWebhook), "messageStatus")] + [JsonSubtypes.KnownSubType(typeof(OutDialApiConnectWebhook), "outDialApiConnect")] + [JsonSubtypes.KnownSubType(typeof(OutDialConnectWebhook), "outDialConnect")] + [JsonSubtypes.KnownSubType(typeof(OutDialStartWebhook), "outDialStart")] + [JsonSubtypes.KnownSubType(typeof(QueueWaitWebhook), "queueWait")] + [JsonSubtypes.KnownSubType(typeof(RecordWebhook), "record")] + [JsonSubtypes.KnownSubType(typeof(RedirectWebhook), "redirect")] + [JsonSubtypes.KnownSubType( + typeof(RemoveFromQueueNotificationWebhook), + "removeFromQueueNotification" + )] + [JsonSubtypes.KnownSubType(typeof(TranscribeWebhook), "transcribe")] + public partial class Webhook : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Type of webhook request. + public Webhook(string requestType = default(string)) + { + this.RequestType = requestType; + } + + /// + /// Type of webhook request + /// + /// Type of webhook request + [DataMember(Name = "requestType", EmitDefaultValue = false)] + public string RequestType { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Webhook {\n"); + sb.Append(" RequestType: ").Append(RequestType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject( + this, + Newtonsoft.Json.Formatting.Indented + ); + } + + /// + /// Retrieve the KVP Dictionary for the Webhook instance. + /// + /// KVP Dictionary + public virtual IDictionary ToKvp() + { + IDictionary props = new Dictionary(); + props.Add("requestType", RequestType); + return props; + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate( + ValidationContext validationContext + ) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/src/freeclimb/Utils/IPagination.cs b/src/freeclimb/Utils/IPagination.cs index d0169b73..8acb58ad 100644 --- a/src/freeclimb/Utils/IPagination.cs +++ b/src/freeclimb/Utils/IPagination.cs @@ -2,14 +2,14 @@ namespace freeclimb.Utils { - public interface IPagination - { - int? Total { get; set; } - int? Start { get; set; } - int? End { get; set; } - int? Page { get; set; } - int? NumPages { get; set; } - int? PageSize { get; set; } - string? NextPageUri { get; set; } - } -} \ No newline at end of file + public interface IPagination + { + int? Total { get; set; } + int? Start { get; set; } + int? End { get; set; } + int? Page { get; set; } + int? NumPages { get; set; } + int? PageSize { get; set; } + string? NextPageUri { get; set; } + } +} diff --git a/src/freeclimb/Utils/RequestVerifier.cs b/src/freeclimb/Utils/RequestVerifier.cs index f290aea6..e374f305 100644 --- a/src/freeclimb/Utils/RequestVerifier.cs +++ b/src/freeclimb/Utils/RequestVerifier.cs @@ -8,7 +8,13 @@ namespace freeclimb.Utils public class RequestVerifier { public const int DEFAULT_TOLERANCE = 5 * 60 * 1000; - public static void verifyRequestSignature(String requestBody, String requestHeader, String signingSecret, int tolerance = DEFAULT_TOLERANCE) + + public static void verifyRequestSignature( + String requestBody, + String requestHeader, + String signingSecret, + int tolerance = DEFAULT_TOLERANCE + ) { RequestVerifier verifier = new RequestVerifier(); verifier.checkRequestBody(requestBody); @@ -51,6 +57,7 @@ private void checkSigningSecret(String signingSecret) throw new Exception("Signing secret cannot be empty or null"); } } + private void checkTolerance(int tolerance) { if (tolerance <= 0 || tolerance >= int.MaxValue) @@ -64,15 +71,29 @@ private void verifyTolerance(SignatureInformation info, int tolerance) int currentTime = info.getCurrentUnixTime(); if (!info.isRequestTimeValid(tolerance)) { - throw new Exception(String.Format("Request time exceeded tolerance threshold. Request: {0}, CurrentTime: {1}, tolerance: {2}", info.requestTimestamp, currentTime, tolerance)); + throw new Exception( + String.Format( + "Request time exceeded tolerance threshold. Request: {0}, CurrentTime: {1}, tolerance: {2}", + info.requestTimestamp, + currentTime, + tolerance + ) + ); } } - private void verifySignature(SignatureInformation info, String requestBody, String signingSecret) + + private void verifySignature( + SignatureInformation info, + String requestBody, + String signingSecret + ) { if (!info.isSignatureSafe(requestBody, signingSecret)) { - throw new 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"); + throw new 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" + ); } } } -} \ No newline at end of file +} diff --git a/src/freeclimb/Utils/SignatureInformation.cs b/src/freeclimb/Utils/SignatureInformation.cs index 18ccb993..4a4569c4 100644 --- a/src/freeclimb/Utils/SignatureInformation.cs +++ b/src/freeclimb/Utils/SignatureInformation.cs @@ -12,6 +12,7 @@ public class SignatureInformation { public int requestTimestamp; public List signatures; + /// /// This is the Signature Information constructor, this takes the requestHeader and parses it into the attribute values /// @@ -35,6 +36,7 @@ public SignatureInformation(string requestHeader) } signatures = constructorSignatures; } + /// /// This is the timestamp validity function, this checks if the request timestamp is valid /// @@ -45,6 +47,7 @@ public Boolean isRequestTimeValid(int tolerance) var currentUnixTimestamp = getCurrentUnixTime(); return currentUnixTimestamp < (requestTimestamp + tolerance); } + /// /// This is the signature validity function, this checks if the request timestamp is valid /// diff --git a/src/freeclimb/freeclimb.csproj b/src/freeclimb/freeclimb.csproj index 8f23fe22..079ba5d4 100644 --- a/src/freeclimb/freeclimb.csproj +++ b/src/freeclimb/freeclimb.csproj @@ -2,7 +2,7 @@ false - net6.0 + net8.0 freeclimb freeclimb Library @@ -12,20 +12,24 @@ A library generated from a OpenAPI doc No Copyright freeclimb - 4.10.0 + 5.0.0 bin\$(Configuration)\$(TargetFramework)\freeclimb.xml - https://github.com/freeclimbapi/csharp-sdk.git + https://github.com/freeclimbapi/csharp-sdk.git git Minor update + annotations + false - - - - - - + + + + + + + + diff --git a/yarn.lock b/yarn.lock index b8d243ad..72e96e6c 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,19 @@ 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: + 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" + +jsonpath-plus@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz#7ad94e147b3ed42f7939c315d2b9ce490c5a3899" + integrity sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA== liquid-json@0.3.1: version "0.3.1" @@ -816,13 +830,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 +878,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 +893,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 +1000,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 +1013,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 +1084,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 +1183,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 +1195,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 +1292,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"